WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Yoast\WP\SEO\Routes

SEMrush_Route::register_routes() public Yoast 1.0

Registers routes with WordPress.

{} Это метод класса: SEMrush_Route{}

Хуков нет.

Возвращает

null.

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

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

Код SEMrush_Route::register_routes() Yoast 15.6.2

<?php
public function register_routes() {
	$authentication_route_args = [
		'methods'             => 'POST',
		'callback'            => [ $this, 'authenticate' ],
		'permission_callback' => [ $this, 'can_use_semrush' ],
		'args'                => [
			'code' => [
				'validate_callback' => [ $this, 'has_valid_code' ],
				'required'          => true,
			],
		],
	];

	\register_rest_route( Main::API_V1_NAMESPACE, self::AUTHENTICATION_ROUTE, $authentication_route_args );

	$set_country_code_option_route_args = [
		'methods'             => 'POST',
		'callback'            => [ $this, 'set_country_code_option' ],
		'permission_callback' => [ $this, 'can_use_semrush' ],
		'args'                => [
			'country_code' => [
				'validate_callback' => [ $this, 'has_valid_country_code' ],
				'required'          => true,
			],
		],
	];

	\register_rest_route( Main::API_V1_NAMESPACE, self::COUNTRY_CODE_OPTION_ROUTE, $set_country_code_option_route_args );

	$related_keyphrases_route_args = [
		'methods'             => 'GET',
		'callback'            => [ $this, 'get_related_keyphrases' ],
		'permission_callback' => [ $this, 'can_use_semrush' ],
		'args'                => [
			'keyphrase' => [
				'validate_callback' => [ $this, 'has_valid_keyphrase' ],
				'required'          => true,
			],
			'country_code' => [
				'required' => true,
			],
		],
	];

	\register_rest_route( Main::API_V1_NAMESPACE, self::RELATED_KEYPHRASES_ROUTE, $related_keyphrases_route_args );
}