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

In this article

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

$resultarray
Response data to send to the client.
$serverWP_REST_Server
Server instance.
$requestWP_REST_Request
Request used to generate the response.

Source

$result = apply_filters( 'rest_pre_echo_response', $result, $this, $request );

Changelog

VersionDescription
4.8.1Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.