Filters the enveloped form of a REST API response.
$envelopearray$bodyarray
$statusint
$headersarray
$responseWP_REST_Responsewp-includes/rest-api/class-wp-rest-server.php:887WP_REST_Server::envelope_response() * @type array $body Response data. * @type int $status The 3-digit HTTP status code. * @type array $headers Map of header name to header value. * } * @param WP_REST_Response $response Original response data. */ $envelope = apply_filters( 'rest_envelope_response', $envelope, $response ); // Ensure it's still a response and return. return rest_ensure_response( $envelope ); } /**Introduced in 4.4.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.