apply_filters( 'rest_pre_echo_response', array $result, WP_REST_Server $server, WP_REST_Request $request )

Filters the REST API response.


Description

Allows modification of the response data after inserting embedded data (if any) and before echoing the response data.


Parameters

$result

Response data to send to the client.

$server

Server instance.

$request

Request used to generate the response.


Source

File: wp-includes/rest-api/class-wp-rest-server.php

View on GitHub



Changelog

Changelog
Version Description
4.8.1 Introduced.