apply_filters( 'rest_dispatch_request', mixed $dispatch_result, WP_REST_Request $request, string $route, array $handler )

Filters the REST dispatch request result.

Description Description

Allow plugins to override dispatching the request.

Parameters Parameters


(mixed) Dispatch result, will be used if not empty.


(WP_REST_Request) Request used to generate the response.


(string) Route matched for the request.


(array) Route handler used for the request.

Top ↑

Source Source

File: wp-includes/rest-api/class-wp-rest-server.php

View on Trac

Top ↑

Changelog Changelog

Version Description
4.5.0 Added $route and $handler parameters.
4.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.