Description
Filters a post type returned from the REST API. Allows modification of the post type data right before it is returned.
Occurrences
Filename | Line Number |
---|---|
wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php | 279 |
Parameters
Type | Name | Description |
---|---|---|
WP_REST_Response | $response | The response object. |
WP_Post_Type | $post_type | The original post type object. |
WP_REST_Request | $request | Request used to generate the response. |
PHP Doc
/**
* Filters a post type returned from the REST API.
*
* Allows modification of the post type data right before it is returned.
*
* @since 4.7.0
*
* @param WP_REST_Response $response The response object.
* @param WP_Post_Type $post_type The original post type object.
* @param WP_REST_Request $request Request used to generate the response.
*/