Filters whether the REST API request has already been served.
Allow sending the request manually – by returning true, the API result will not be sent to the client.
$servedbool
$resultWP_HTTP_Response
WP_REST_Response.$requestWP_REST_Request
$serverWP_REST_Server
$served = apply_filters( 'rest_pre_serve_request', false, $result, $request, $this );
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_pre_serve_request