rest_filter_response_by_context
rest_filter_response_by_context ( $response_data, $schema, $context )
Parameters:- (array|object) response_data The response data to modify.
- (array) schema The schema for the endpoint used to filter the response.
- (string) context The requested context.
Returns:- (array|object) The filtered response data.
Defined at:Change Log: - Introduced in WordPress: 5.5.0
- Deprecated in WordPress: —
Description
Filters the response to remove any fields not available in the given context.