wpseek.com
A WordPress-centric search engine for devs and theme authors



rest_do_request › WordPress Function

Since4.4.0
Deprecatedn/a
rest_do_request ( $request )
Parameters:
  • (WP_REST_Request|string) $request Request.
    Required: Yes
Returns:
  • (WP_REST_Response) REST response.
Defined at:
Codex:

Do a REST request.

Used primarily to route internal requests through WP_REST_Server.


Source

function rest_do_request( $request ) {
	$request = rest_ensure_request( $request );
	return rest_get_server()->dispatch( $request );
}