There was an error while loading. Please reload this page.
Filter the post.
Allows plugins to filter the post object as returned by \WP_REST_Controller::get_post().
\WP_REST_Controller::get_post()
add_filter( 'rest_the_post', function( WP_Post $post_obj = null, int|WP_Post $post ) { // Your code here. return null; }, 10, 2 );
WP_Post|null
$post_obj
get_post()
int|WP_Post
$post
apply_filters( 'rest_the_post', $post_obj, $post )
← All Hooks