Automattic\WooCommerce\Admin\API

Themes::get_item_schema()publicWC 1.0

Get the schema, conforming to JSON Schema.

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

Хуков нет.

Возвращает

Массив.

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

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

Код Themes::get_item_schema() WC 8.7.0

public function get_item_schema() {
	$schema = array(
		'$schema'    => 'http://json-schema.org/draft-04/schema#',
		'title'      => 'upload_theme',
		'type'       => 'object',
		'properties' => array(
			'status'  => array(
				'description' => __( 'Theme installation status.', 'woocommerce' ),
				'type'        => 'string',
				'context'     => array( 'view', 'edit' ),
				'readonly'    => true,
			),
			'message' => array(
				'description' => __( 'Theme installation message.', 'woocommerce' ),
				'type'        => 'string',
				'context'     => array( 'view', 'edit' ),
				'readonly'    => true,
			),
			'theme'   => array(
				'description' => __( 'Uploaded theme.', 'woocommerce' ),
				'type'        => 'object',
				'context'     => array( 'view', 'edit' ),
				'readonly'    => true,
			),
		),
	);

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