Filters the pre-calculated result of a REST API dispatch request.
Allow hijacking the request before dispatching by returning a non-empty. The returned value will be used to serve the request instead.
$resultmixed
$serverWP_REST_Server
$requestWP_REST_Request
$result = apply_filters( 'rest_pre_dispatch', null, $this, $request );
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_pre_dispatch