Automattic\WooCommerce\Admin\API
OnboardingThemes::get_item_schema
Get the schema, conforming to JSON Schema.
Method of the class: OnboardingThemes{}
No Hooks.
Returns
Array.
Usage
$OnboardingThemes = new OnboardingThemes(); $OnboardingThemes->get_item_schema();
OnboardingThemes::get_item_schema() OnboardingThemes::get item schema code WC 10.8.1
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 );
}