WordPress at a glance
filter is not described

rest_prepare_(post_type) filter-hook . WP 4.7.0

Filters the post data for a response.

The dynamic portion of the hook name, $this->post_type, refers to the post type slug.


add_filter( 'rest_prepare_(post_type)', 'filter_function_name_520', 10, 3 );
function filter_function_name_520( $response, $post, $request ){
	// filter...

	return $response;
The response object.
Post object.
Request object.

Where the hook is called

wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php 1661
return apply_filters( "rest_prepare_{$this->post_type}", $response, $post, $request );

Where the hook is used (in WP core)

Использование не найдено.