WordPress开发者和主题制作者的搜索引擎



rest_prepare_{$this->post_type} ›

Since4.7.0
已弃用n/a
apply_filters( "rest_prepare_{$this->post_type}", $response, $post, $request )
参数: (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
定义在:
文档:

Filters the post data for a response.

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





源码

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