rest_do_request( WP_REST_Request|string $request )
Do a REST request.
Description
Used primarily to route internal requests through WP_REST_Server.
Parameters
- $request
-
(Required) Request.
Return
(WP_REST_Response) REST response.
Source
File: wp-includes/rest-api.php
function rest_do_request( $request ) {
$request = rest_ensure_request( $request );
return rest_get_server()->dispatch( $request );
}
Changelog
Version | Description |
---|---|
WP-4.4.0 | Introduced. |