WP_REST_Navigation_Fallback_Controller::register_routes()publicWP 6.3.0

Registers the controllers routes.

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

Хуков нет.

Возвращает

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

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

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

Список изменений

С версии 6.3.0 Введена.

Код WP_REST_Navigation_Fallback_Controller::register_routes() WP 6.7.1

public function register_routes() {

	// Lists a single nav item based on the given id or slug.
	register_rest_route(
		$this->namespace,
		'/' . $this->rest_base,
		array(
			array(
				'methods'             => WP_REST_Server::READABLE,
				'callback'            => array( $this, 'get_item' ),
				'permission_callback' => array( $this, 'get_item_permissions_check' ),
				'args'                => $this->get_endpoint_args_for_item_schema( WP_REST_Server::READABLE ),
			),
			'schema' => array( $this, 'get_item_schema' ),
		)
	);
}