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

Yoast\WP\SEO\Routes

Configuration_Workout_Route::register_routes() public Yoast 1.0

Registers routes with WordPress.

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

Хуков нет.

Возвращает

null. Ничего.

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

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

Код Configuration_Workout_Route::register_routes() Yoast 17.9

public function register_routes() {
	$site_representation_route = [
		'methods'             => 'POST',
		'callback'            => [ $this, 'set_site_representation' ],
		'permission_callback' => [ $this, 'can_manage_options' ],
		'args'                => [
			'company_or_person' => [
				'type'     => 'string',
				'enum'     => [
					'company',
					'person',
				],
				'required' => true,
			],
			'company_name' => [
				'type'     => 'string',
			],
			'company_logo' => [
				'type'     => 'string',
			],
			'company_logo_id' => [
				'type'     => 'integer',
			],
			'person_logo' => [
				'type'     => 'string',
			],
			'person_logo_id' => [
				'type'     => 'integer',
			],
			'company_or_person_user_id' => [
				'type'     => 'integer',
			],
			'description' => [
				'type'     => 'string',
			],
		],
	];

	\register_rest_route( Main::API_V1_NAMESPACE, Workouts_Route::WORKOUTS_ROUTE . self::SITE_REPRESENTATION_ROUTE, $site_representation_route );

	$social_profiles_route = [
		'methods'             => 'POST',
		'callback'            => [ $this, 'set_social_profiles' ],
		'permission_callback' => [ $this, 'can_manage_options' ],
		'args'                => [
			'facebook_site' => [
				'type'     => 'string',
			],
			'twitter_site' => [
				'type'     => 'string',
			],
			'instagram_url' => [
				'type'     => 'string',
			],
			'linkedin_url' => [
				'type'     => 'string',
			],
			'myspace_url' => [
				'type'     => 'string',
			],
			'pinterest_url' => [
				'type'     => 'string',
			],
			'youtube_url' => [
				'type'     => 'string',
			],
			'wikipedia_url' => [
				'type'     => 'string',
			],
		],
	];

	\register_rest_route( Main::API_V1_NAMESPACE, Workouts_Route::WORKOUTS_ROUTE . self::SOCIAL_PROFILES_ROUTE, $social_profiles_route );

	$enable_tracking_route = [
		'methods'             => 'POST',
		'callback'            => [ $this, 'set_enable_tracking' ],
		'permission_callback' => [ $this, 'can_manage_options' ],
		'args'                => [
			'tracking' => [
				'type'     => 'boolean',
				'required' => true,
			],
		],
	];

	\register_rest_route( Main::API_V1_NAMESPACE, Workouts_Route::WORKOUTS_ROUTE . self::ENABLE_TRACKING_ROUTE, $enable_tracking_route );
}