On this page
apply_filters( 'rest_envelope_response', array $envelope, WP_REST_Response $response )
Filters the enveloped form of a REST API response.
Parameters
$envelopearray-
Envelope data.
bodyarrayResponse data.statusintThe 3-digit HTTP status code.headersarrayMap of header name to header value.
$responseWP_REST_Response-
Original response data.
Source
File: wp-includes/rest-api/class-wp-rest-server.php. View all references
$envelope = apply_filters( 'rest_envelope_response', $envelope, $response );
Related
Used By
| Used By | Description |
|---|---|
| WP_REST_Server::envelope_response() wp-includes/rest-api/class-wp-rest-server.php | Wraps the response in an envelope. |
Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_envelope_response