WordPress开发者和主题制作者的搜索引擎



rest_do_request ›

Since4.4.0
已弃用n/a
rest_do_request ( $request )
参数:
  • (WP_REST_Request|string) $request Request.
    Required: Yes
返回:
  • (WP_REST_Response) REST response.
定义在:
文档:

Do a REST request.

Used primarily to route internal requests through WP_REST_Server.



源码

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