Yoast\WP\SEO\Routes
Indexables_Head_Route::register_routes() public Yoast 1.0
Registers routes with WordPress.
{} Это метод класса: Indexables_Head_Route{}
Хуков нет.
Возвращает
null.
Использование
$Indexables_Head_Route = new Indexables_Head_Route(); $Indexables_Head_Route->register_routes();
Код Indexables_Head_Route::register_routes() Indexables Head Route::register routes Yoast 15.7
public function register_routes() {
$route_args = [
'methods' => 'GET',
'callback' => [ $this, 'get_head' ],
'permission_callback' => '__return_true',
'args' => [
'url' => [
'validate_callback' => [ $this, 'is_valid_url' ],
'required' => true,
],
],
];
\register_rest_route( Main::API_V1_NAMESPACE, self::HEAD_FOR_URL_ROUTE, $route_args );
}