On this page
apply_filters( 'rest_json_encode_options', int $options, WP_REST_Request $request )
Filters the JSON encoding options used to send the REST API response.
Parameters
$optionsint-
JSON encoding options json_encode().
$requestWP_REST_Request-
Current request object.
Source
File: wp-includes/rest-api/class-wp-rest-server.php. View all references
return apply_filters( 'rest_json_encode_options', $options, $request );
Related
Used By
| Used By | Description |
|---|---|
| WP_REST_Server::get_json_encode_options() wp-includes/rest-api/class-wp-rest-server.php | Gets the encoding options passed to {@see wp_json_encode}. |
Changelog
| Version | Description |
|---|---|
| 6.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_json_encode_options