WP_REST_Response::set_matched_route()publicWP 4.4.0

Sets the route (regex for path) that caused the response.

Метод класса: WP_REST_Response{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WP_REST_Response = new WP_REST_Response();
$WP_REST_Response->set_matched_route( $route );
$route(строка) (обязательный)
Route name.

Список изменений

С версии 4.4.0 Введена.

Код WP_REST_Response::set_matched_route() WP 6.5.2

public function set_matched_route( $route ) {
	$this->matched_route = $route;
}