WC_REST_System_Status_Tools_V2_Controller::get_item_schema()
Get the system status tools schema, conforming to JSON Schema.
Метод класса: WC_REST_System_Status_Tools_V2_Controller{}
Хуков нет.
Возвращает
Массив
.
Использование
$WC_REST_System_Status_Tools_V2_Controller = new WC_REST_System_Status_Tools_V2_Controller(); $WC_REST_System_Status_Tools_V2_Controller->get_item_schema();
Код WC_REST_System_Status_Tools_V2_Controller::get_item_schema() WC REST System Status Tools V2 Controller::get item schema WC 7.7.0
public function get_item_schema() { $schema = array( '$schema' => 'http://json-schema.org/draft-04/schema#', 'title' => 'system_status_tool', 'type' => 'object', 'properties' => array( 'id' => array( 'description' => __( 'A unique identifier for the tool.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'arg_options' => array( 'sanitize_callback' => 'sanitize_title', ), ), 'name' => array( 'description' => __( 'Tool name.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'arg_options' => array( 'sanitize_callback' => 'sanitize_text_field', ), ), 'action' => array( 'description' => __( 'What running the tool will do.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'arg_options' => array( 'sanitize_callback' => 'sanitize_text_field', ), ), 'description' => array( 'description' => __( 'Tool description.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'arg_options' => array( 'sanitize_callback' => 'sanitize_text_field', ), ), 'success' => array( 'description' => __( 'Did the tool run successfully?', 'woocommerce' ), 'type' => 'boolean', 'context' => array( 'edit' ), ), 'message' => array( 'description' => __( 'Tool return message.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'edit' ), 'arg_options' => array( 'sanitize_callback' => 'sanitize_text_field', ), ), ), ); return $this->add_additional_fields_schema( $schema ); }