Automattic\WooCommerce\Admin\API

Settings::save_items_schema()publicWC 1.0

Get the schema, conforming to JSON Schema.

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

Хуков нет.

Возвращает

Массив.

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

$Settings = new Settings();
$Settings->save_items_schema();

Код Settings::save_items_schema() WC 9.8.2

public function save_items_schema() {
	$schema = array(
		'$schema'    => 'http://json-schema.org/draft-04/schema#',
		'title'      => 'options',
		'type'       => 'object',
		'properties' => array(
			'options' => array(
				'type'        => 'array',
				'description' => __( 'Array of options with associated values.', 'woocommerce' ),
				'context'     => array( 'view' ),
				'readonly'    => true,
			),
			'tab'     => array(
				'type'        => 'string',
				'description' => __( 'Settings tab.', 'woocommerce' ),
				'context'     => array( 'view', 'edit' ),
				'default'     => 'general',
			),
			'section' => array(
				'type'        => 'string',
				'description' => __( 'Settings section.', 'woocommerce' ),
				'context'     => array( 'view', 'edit' ),
				'default'     => '',
			),
		),
	);

	return $schema;
}