-
Notifications
You must be signed in to change notification settings - Fork 13
Filter Reference
This is a list of filter hooks available in the AFB Instant Articles Plugin.
For more information regarding filters and action hooks, see Plugin API @ Wordpress Codex
This filter is used to filter the content of the op-kicker
element after it is set with the default content (= category).
You can use afbia_kicker
to replace the kicker text or modify it.
Parameters:
- $kicker
- $post_id
Usage:
<?php add_filter( 'afbia_kicker', 'filter_function_name' ) ?>
Example:
function your_kicker_filter( $kicker, $post_id ) {
$kicker = "NEW KICKER TEXT";
return $kicker;
}
add_filter( 'afbia_kicker', 'your_kicker_filter', 10, 2 );
This filter is used to filter the content of the instant article after it is retrieved from the database and before it is returned to the feed.
You can use afbia_content
to replace the main article text or modify it.
Parameters:
- $content
Usage:
<?php add_filter( 'afbia_content', 'your_function_name' ); ?>
This filter is used to filter the content of the address
element after it is set with the default content (= author).
You can use afbia_author
to replace the author or modify it.
Parameters:
- $author
- $post_id
Usage:
<?php add_filter( 'afbia_author', 'your_function_name' ); ?>
This filter is used to filter the title attriute of the address
element after it is set with the default content.
You can use afbia_author_role
to replace the author role or modify it.
Parameters:
- $author_role
- $post_id
Usage:
<?php add_filter( 'afbia_author_role', 'your_function_name' ); ?>
The allfacebook instant articles plugin for WordPress is made possible by allfacebook.de, Luehrsen // Heinrich and many awesome contributors.