WordPress at a glance
filter is not described

rest_dispatch_request filter-hook . WP 4.4.0

Filters the REST dispatch request result.

Allow plugins to override dispatching the request.


add_filter( 'rest_dispatch_request', 'filter_function_name_788', 10, 4 );
function filter_function_name_788( $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 940
$dispatch_result = apply_filters( 'rest_dispatch_request', null, $request, $route, $handler );

Where the hook is used (in WP core)

Usage not found!