WP_REST_Template_Revisions_Controller::get_item_schema()publicWP 6.4.0

Retrieves the item's schema, conforming to JSON Schema.

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

Хуков нет.

Возвращает

Массив. Item schema data.

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

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

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

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

Код WP_REST_Template_Revisions_Controller::get_item_schema() WP 6.7.1

public function get_item_schema() {
	if ( $this->schema ) {
		return $this->add_additional_fields_schema( $this->schema );
	}

	$schema = $this->parent_controller->get_item_schema();

	$schema['properties']['parent'] = array(
		'description' => __( 'The ID for the parent of the revision.' ),
		'type'        => 'integer',
		'context'     => array( 'view', 'edit', 'embed' ),
	);

	$this->schema = $schema;

	return $this->add_additional_fields_schema( $this->schema );
}