Description
Filters the REST API response. Allows modification of the response data after inserting embedded data (if any) and before echoing the response data.
Occurrences
Filename | Line Number |
---|---|
wp-includes/rest-api/class-wp-rest-server.php | 538 |
Parameters
Type | Name | Description |
---|---|---|
array | $result | Response data to send to the client. |
WP_REST_Server | $server | Server instance. |
WP_REST_Request | $request | Request used to generate the response. |
PHP Doc
/**
* Filters the REST API response.
*
* Allows modification of the response data after inserting
* embedded data (if any) and before echoing the response data.
*
* @since 4.8.1
*
* @param array $result Response data to send to the client.
* @param WP_REST_Server $server Server instance.
* @param WP_REST_Request $request Request used to generate the response.
*/