apply_filters( "rest_prepare_{$this->post_type}", WP_REST_Response $response, WP_Post $post, WP_REST_Request $request )

Filters the post data for a response.


Description

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


Parameters

$response

The response object.

$post

Post object.

$request

Request object.


Source

File: wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

View on GitHub



Changelog

Changelog
Version Description
WP-4.7.0 Introduced.