On this page
apply_filters( 'rest_dispatch_request', mixed $dispatch_result, WP_REST_Request $request, string $route, array $handler )
Filters the REST API dispatch request result.
Description
Allow plugins to override dispatching the request.
Parameters
$dispatch_resultmixed-
Dispatch result, will be used if not empty.
$requestWP_REST_Request-
Request used to generate the response.
$routestring-
Route matched for the request.
$handlerarray-
Route handler used for the request.
Source
File: wp-includes/rest-api/class-wp-rest-server.php. View all references
$dispatch_result = apply_filters( 'rest_dispatch_request', null, $request, $route, $handler );
Related
Used By
| Used By | Description |
|---|---|
| WP_REST_Server::respond_to_request() wp-includes/rest-api/class-wp-rest-server.php | Dispatches the request to the callback handler. |
Changelog
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_dispatch_request