the_post
Fires once the post data has been set up.
Usage
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).
Changelog
Since 2.8.0 | Introduced. |
Since 4.1.0 | Introduced $query parameter. |
Where the hook is called
the_post
wp-includes/class-wp-query.php 4755
do_action_ref_array( 'the_post', array( &$post, &$this ) );