Automattic\WooCommerce\Admin\API

OnboardingThemes::get_item_schema()publicWC 1.0

Get the schema, conforming to JSON Schema.

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

Хуков нет.

Возвращает

Массив.

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

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

Код OnboardingThemes::get_item_schema() WC 8.7.0

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

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