A WordPress-centric search engine for devs and theme authors



rest_prepare_{$this->post_type} ›

Since4.7.0
Deprecatedn/a
apply_filters( "rest_prepare_{$this->post_type}", $response, $post, $request )
Parameters: (3)
  • (WP_REST_Response) $response The response object.
    Required: Yes
  • (WP_Post) $post Post object.
    Required: Yes
  • (WP_REST_Request) $request Request object.
    Required: Yes
Defined at:
Codex:

Filters the post data for a response.

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





Source

return apply_filters( "rest_prepare_{$this->post_type}", $response, $post, $request );