wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



rest_prepare_{$this->post_type} › WordPress Filter Hooks

Seit4.7.0
Veraltetn/v
apply_filters( "rest_prepare_{$this->post_type}", $response, $post, $request )
Parameter: (3)
  • (WP_REST_Response) $response The response object.
    Erforderlich: Ja
  • (WP_Post) $post Post object.
    Erforderlich: Ja
  • (WP_REST_Request) $request Request object.
    Erforderlich: Ja
Definiert in:
Codex:

Filters the post data for a REST API response.

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

Possible hook names include:

  • rest_prepare_post
  • rest_prepare_page
  • rest_prepare_attachment




Quellcode

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