WP_REST_Response::set_matched_route()
Sets the route (regex for path) that caused the response.
Method of the class: WP_REST_Response{}
No Hooks.
Return
null
. Ничего (null).
Usage
$WP_REST_Response = new WP_REST_Response(); $WP_REST_Response->set_matched_route( $route );
- $route(string) (required)
- Route name.
Changelog
Since 4.4.0 | Introduced. |
WP_REST_Response::set_matched_route() WP REST Response::set matched route code WP 6.4.1
public function set_matched_route( $route ) { $this->matched_route = $route; }