WC_REST_General_Settings_V4_Controller::get_field_schema
Get the schema for individual setting fields.
Метод класса: WC_REST_General_Settings_V4_Controller{}
Хуков нет.
Возвращает
Массив.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_field_schema();
Код WC_REST_General_Settings_V4_Controller::get_field_schema() WC REST General Settings V4 Controller::get field schema WC 10.3.4
private function get_field_schema() {
return array(
'type' => 'object',
'properties' => array(
'id' => array(
'description' => __( 'Setting field ID.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
),
'label' => array(
'description' => __( 'Setting field label.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
),
'type' => array(
'description' => __( 'Setting field type.', 'woocommerce' ),
'type' => 'string',
'enum' => array( 'text', 'number', 'select', 'multiselect', 'checkbox' ),
'context' => array( 'view', 'edit' ),
),
'options' => array(
'description' => __( 'Available options for select/multiselect fields.', 'woocommerce' ),
'type' => 'object',
'context' => array( 'view', 'edit' ),
),
'desc' => array(
'description' => __( 'Description for the setting field.', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
),
),
);
}