Yoast\WP\SEO\Routes

Integrations_Route::register_routes()publicYoast 1.0

Registers routes with WordPress.

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

Хуков нет.

Возвращает

null. Ничего.

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

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

Код Integrations_Route::register_routes() Yoast 19.7.1

public function register_routes() {
	$set_semrush_active_route = [
		'methods'             => 'POST',
		'callback'            => [ $this, 'set_semrush_active' ],
		'permission_callback' => [ $this, 'can_manage_options' ],
		'args'                => [
			'active' => [
				'type'     => 'boolean',
				'required' => true,
			],
		],
	];
	\register_rest_route( Main::API_V1_NAMESPACE, self::INTEGRATIONS_ROUTE . self::SET_SEMRUSH_ACTIVE_ROUTE, $set_semrush_active_route );

	$set_wincher_active_route = [
		'methods'             => 'POST',
		'callback'            => [ $this, 'set_wincher_active' ],
		'permission_callback' => [ $this, 'can_manage_options' ],
		'args'                => [
			'active' => [
				'type'     => 'boolean',
				'required' => true,
			],
		],
	];
	\register_rest_route( Main::API_V1_NAMESPACE, self::INTEGRATIONS_ROUTE . self::SET_WINCHER_ACTIVE_ROUTE, $set_wincher_active_route );

	$set_ryte_active_route = [
		'methods'             => 'POST',
		'callback'            => [ $this, 'set_ryte_active' ],
		'permission_callback' => [ $this, 'can_manage_options' ],
		'args'                => [
			'active' => [
				'type'     => 'boolean',
				'required' => true,
			],
		],
	];
	\register_rest_route( Main::API_V1_NAMESPACE, self::INTEGRATIONS_ROUTE . self::SET_RYTE_ACTIVE_ROUTE, $set_ryte_active_route );

	$set_wordproof_active_route = [
		'methods'             => 'POST',
		'callback'            => [ $this, 'set_wordproof_active' ],
		'permission_callback' => [ $this, 'can_manage_options' ],
		'args'                => [
			'active' => [
				'type'     => 'boolean',
				'required' => true,
			],
		],
	];
	\register_rest_route( Main::API_V1_NAMESPACE, self::INTEGRATIONS_ROUTE . self::SET_WORDPROOF_ACTIVE_ROUTE, $set_wordproof_active_route );

	$set_zapier_active_route = [
		'methods'             => 'POST',
		'callback'            => [ $this, 'set_zapier_active' ],
		'permission_callback' => [ $this, 'can_manage_options' ],
		'args'                => [
			'active' => [
				'type'     => 'boolean',
				'required' => true,
			],
		],
	];
	\register_rest_route( Main::API_V1_NAMESPACE, self::INTEGRATIONS_ROUTE . self::SET_ZAPIER_ACTIVE_ROUTE, $set_zapier_active_route );

	$set_algolia_active_route = [
		'methods'             => 'POST',
		'callback'            => [ $this, 'set_algolia_active' ],
		'permission_callback' => [ $this, 'can_manage_options' ],
		'args'                => [
			'active' => [
				'type'     => 'boolean',
				'required' => true,
			],
		],
	];
	\register_rest_route( Main::API_V1_NAMESPACE, self::INTEGRATIONS_ROUTE . self::SET_ALGOLIA_ACTIVE_ROUTE, $set_algolia_active_route );
}