WP_REST_Block_Renderer_Controller::get_item_schema()
Retrieves block's output schema, conforming to JSON Schema.
Метод класса: WP_REST_Block_Renderer_Controller{}
Хуков нет.
Возвращает
Массив
. Item schema data.
Использование
$WP_REST_Block_Renderer_Controller = new WP_REST_Block_Renderer_Controller(); $WP_REST_Block_Renderer_Controller->get_item_schema();
Список изменений
С версии 5.0.0 | Введена. |
Код WP_REST_Block_Renderer_Controller::get_item_schema() WP REST Block Renderer Controller::get item schema WP 6.2.2
public function get_item_schema() { if ( $this->schema ) { return $this->schema; } $this->schema = array( '$schema' => 'http://json-schema.org/schema#', 'title' => 'rendered-block', 'type' => 'object', 'properties' => array( 'rendered' => array( 'description' => __( 'The rendered block.' ), 'type' => 'string', 'required' => true, 'context' => array( 'edit' ), ), ), ); return $this->schema; }