rest_filter_response_fields


rest_filter_response_fields ( $response, $server, $request )

Parameters:
  • (WP_REST_Response) response Current response being served.
  • (WP_REST_Server) server ResponseHandler instance (usually WP_REST_Server).
  • (WP_REST_Request) request The request that was used to make current response.
Returns:
  • (WP_REST_Response) Response to be served, trimmed down to contain a subset of fields.
Defined at:

Description

Filters the API response to include only a white-listed set of response object fields.

Related Functions

rest_filter_response_by_context, register_rest_field, rest_ensure_response, sanitize_post_field, _wp_post_revision_fields

Top Google Results

User discussions

wpseek mobile