Filters the REST API response.
$resultarray$serverWP_REST_Server$requestWP_REST_Requestwp-includes/rest-api/class-wp-rest-server.php:538WP_REST_Server::serve_request() * @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. */ $result = apply_filters( 'rest_pre_echo_response', $result, $this, $request ); // The 204 response shouldn't have a body. if ( 204 === $code || null === $result ) { return null; }Introduced in 4.8.1. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.