Filter hook 'rest_pre_echo_response'

in WP Core File wp-includes/rest-api/class-wp-rest-server.php at line 538

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.
			 */