the_post
Fires once the post data has been set up.
Использование
add_action( 'the_post', 'wp_kama_the_post_action' );
/**
* Function for `the_post` action-hook.
*
* @param WP_Post $post The Post object (passed by reference).
*
* @return void
*/
function wp_kama_the_post_action( $post ){
// action...
}
- $post(WP_Post)
- The Post object (passed by reference).
Список изменений
| С версии 2.8.0 | Введена. |
| С версии 4.1.0 | Introduced $query parameter. |
Где вызывается хук
the_post
wp-includes/class-wp-query.php 4865
do_action_ref_array( 'the_post', array( &$post, &$this ) );