WordPress at Your Fingertips
filter is not described

rest_dispatch_request filter-hook . WP 4.4.0

Filters the REST API dispatch request result.

Allow plugins to override dispatching the request.


add_filter( 'rest_dispatch_request', 'filter_function_name_9245', 10, 4 );
function filter_function_name_9245( $dispatch_result, $request, $route, $handler ){
	// filter...

	return $dispatch_result;
Dispatch result, will be used if not empty.
Request used to generate the response.
Route matched for the request.
Route handler used for the request.


Since 4.4.0 Introduced.
Since 4.5.0 Added $route and $handler parameters.

Where the hook is called

wp-includes/rest-api/class-wp-rest-server.php 1134
$dispatch_result = apply_filters( 'rest_dispatch_request', null, $request, $route, $handler );

Where in WP core the hook is used WordPress

Usage not found.