WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
функция не описана

WC_REST_System_Status_Tools_V2_Controller::get_item_schema() public WC 1.0

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 4.7.1

<?php
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 );
}