Yoast\WP\SEO\Routes

Indexables_Head_Route::register_routes()publicYoast 1.0

Registers routes with WordPress.

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

Хуков нет.

Возвращает

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

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

$Indexables_Head_Route = new Indexables_Head_Route();
$Indexables_Head_Route->register_routes();

Код Indexables_Head_Route::register_routes() Yoast 22.4

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 );
}