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

WP_REST_Site_Health_Controller::get_item_schema() public WP 5.6.0

Gets the schema for each site health test.

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

Хуков нет.

Возвращает

Массив. The test schema.

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

$WP_REST_Site_Health_Controller = new WP_REST_Site_Health_Controller();
$WP_REST_Site_Health_Controller->get_item_schema();

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

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

Код WP_REST_Site_Health_Controller::get_item_schema() WP 5.6.2

<?php
public function get_item_schema() {
	if ( $this->schema ) {
		return $this->schema;
	}

	$this->schema = array(
		'$schema'    => 'http://json-schema.org/draft-04/schema#',
		'title'      => 'wp-site-health-test',
		'type'       => 'object',
		'properties' => array(
			'test'        => array(
				'type'        => 'string',
				'description' => __( 'The name of the test being run.' ),
				'readonly'    => true,
			),
			'label'       => array(
				'type'        => 'string',
				'description' => __( 'A label describing the test.' ),
				'readonly'    => true,
			),
			'status'      => array(
				'type'        => 'string',
				'description' => __( 'The status of the test.' ),
				'enum'        => array( 'good', 'recommended', 'critical' ),
				'readonly'    => true,
			),
			'badge'       => array(
				'type'        => 'object',
				'description' => __( 'The category this test is grouped in.' ),
				'properties'  => array(
					'label' => array(
						'type'     => 'string',
						'readonly' => true,
					),
					'color' => array(
						'type'     => 'string',
						'enum'     => array( 'blue', 'orange', 'red', 'green', 'purple', 'gray' ),
						'readonly' => true,
					),
				),
				'readonly'    => true,
			),
			'description' => array(
				'type'        => 'string',
				'description' => __( 'A more descriptive explanation of what the test looks for, and why it is important for the user.' ),
				'readonly'    => true,
			),
			'actions'     => array(
				'type'        => 'string',
				'description' => __( 'HTML containing an action to direct the user to where they can resolve the issue.' ),
				'readonly'    => true,
			),
		),
	);

	return $this->schema;
}