-
Notifications
You must be signed in to change notification settings - Fork 12
Action Reference
This is a list of action hooks available in the AFB Instant Articles Plugin.
For more information regarding filters and action hooks, see Plugin API @ Wordpress Codex
This action is called at the bottom of the <header> element in every instant article
You use this hook by having your function echo output or by having it perform background tasks. Your functions shouldn't return, and shouldn't take any parameters.
Parameters: None
Usage:
<?php add_action( 'afbia_article_header', 'your_function_name' ); ?>
This action is called at the bottom of the <body> element right before the <footer> in every instant article
You use this hook by having your function echo output or by having it perform background tasks. Your functions shouldn't return anything.
Parameters:
- $post_id
Usage:
<?php add_action( 'afbia_article_body', 'your_function_name' ); ?>
Example:
function your_body_function($id) {
echo '
<figure class="op-tracker">
<iframe>
<!-- Include full analytics code here -->
</iframe>
</figure>
';
}
add_action( 'afbia_article_body', 'your_body_function', 10, 1);
This action is called at the bottom of the <footer> element in every instant article
You use this hook by having your function echo output or by having it perform background tasks. Your functions shouldn't return, and shouldn't take any parameters.
Parameters: None
Usage:
<?php add_action( 'afbia_article_footer', 'your_function_name' ); ?>
The allfacebook instant articles plugin for WordPress is made possible by allfacebook.de, Luehrsen // Heinrich and many awesome contributors.