Used By
Used By | Description |
---|---|
wp-includes/rest-api/class-wp-rest-server.php: WP_REST_Server::dispatch() | Matches the request to a callback and call it. |
Filters the pre-calculated result of a REST dispatch request.
Allow hijacking the request before dispatching by returning a non-empty. The returned value will be used to serve the request instead.
(mixed) Response to replace the requested version with. Can be anything a normal endpoint can return, or null to not hijack the request.
(WP_REST_Server) Server instance.
(WP_REST_Request) Request used to generate the response.
Version | Description |
---|---|
4.4.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_pre_dispatch