Merge pull request #13747 from woocommerce/fix/rest-api-settings-schema

[REST API] Fixed settings schema.
This commit is contained in:
Mike Jolley 2017-03-24 10:26:59 +00:00 committed by GitHub
commit 285a49b7e0
1 changed files with 29 additions and 34 deletions

View File

@ -198,37 +198,32 @@ class WC_REST_Settings_Controller extends WC_REST_Controller {
'id' => array(
'description' => __( 'A unique identifier that can be used to link settings together.', 'woocommerce' ),
'type' => 'string',
'arg_options' => array(
'sanitize_callback' => 'sanitize_title',
),
'context' => array( 'view' ),
'readonly' => true,
),
'label' => array(
'description' => __( 'A human readable label for the setting used in interfaces.', 'woocommerce' ),
'type' => 'string',
'arg_options' => array(
'sanitize_callback' => 'sanitize_text_field',
),
'context' => array( 'view' ),
'readonly' => true,
),
'description' => array(
'description' => __( 'A human readable description for the setting used in interfaces.', 'woocommerce' ),
'type' => 'string',
'arg_options' => array(
'sanitize_callback' => 'sanitize_text_field',
),
'context' => array( 'view' ),
'readonly' => true,
),
'parent_id' => array(
'description' => __( 'ID of parent grouping.', 'woocommerce' ),
'type' => 'string',
'arg_options' => array(
'sanitize_callback' => 'sanitize_text_field',
),
'context' => array( 'view' ),
'readonly' => true,
),
'sub_groups' => array(
'description' => __( 'IDs for settings sub groups.', 'woocommerce' ),
'type' => 'string',
'arg_options' => array(
'sanitize_callback' => 'sanitize_text_field',
),
'context' => array( 'view' ),
'readonly' => true,
),
),
);