Uses
Uses | Description |
---|---|
wp-includes/rest-api.php: rest_get_server() | Retrieves the current REST server instance. |
wp-includes/rest-api.php: rest_ensure_request() | Ensures request arguments are a request object (for consistency). |
Do a REST request.
Used primarily to route internal requests through WP_REST_Server.
(WP_REST_Request|string) (Required) Request.
(WP_REST_Response) REST response.
File: wp-includes/rest-api.php
function rest_do_request( $request ) { $request = rest_ensure_request( $request ); return rest_get_server()->dispatch( $request ); }
Version | Description |
---|---|
4.4.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/rest_do_request