Yoast\WP\SEO\Routes
Indexables_Head_Route::get_head() public Yoast 1.0
Gets the head of a page for a given URL.
{} Это метод класса: Indexables_Head_Route{}
Хуков нет.
Возвращает
WP_REST_Response. The response.
Использование
$Indexables_Head_Route = new Indexables_Head_Route(); $Indexables_Head_Route->get_head( $request );
- $request(WP_REST_Request) (обязательный)
- The request. This request should have a url param set.
Код Indexables_Head_Route::get_head() Indexables Head Route::get head Yoast 15.6.2
public function get_head( WP_REST_Request $request ) {
$url = \esc_url_raw( $request['url'] );
$data = $this->head_action->for_url( $url );
return new WP_REST_Response( $data, $data->status );
}