Used By
Used By | Description |
---|---|
wp-includes/class-wp-query.php: WP_Query::setup_postdata() | Set up global post data. |
Fires once the post data has been set up.
The ‘the_post’ action hook allows developers to modify the post object immediately after being queried and setup.
The post object is passed to this hook by reference so there is no need to return a value.
function my_the_post_action( $post_object ) { // modify post object here } add_action( 'the_post', 'my_the_post_action' );
Version | Description |
---|---|
4.1.0 | Introduced $this parameter. |
2.8.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/the_post