A WordPress-centric search engine for devs and theme authors



rest_post_dispatch ›

Since4.5.0
Deprecatedn/a
apply_filters( 'rest_post_dispatch', rest_ensure_response( $result )
Parameters: (3)
  • (WP_HTTP_Response) $result Result to send to the client. Usually a WP_REST_Response.
    Required: Yes
  • (WP_REST_Server) $this Server instance.
    Required: Yes
  • (WP_REST_Request) $request Request used to generate the response.
    Required: Yes
Defined at:
Codex:

Filters the API response.

Allows modification of the response before returning.





Source

$result = apply_filters( 'rest_post_dispatch', rest_ensure_response( $result ), $this, $request );