WP_REST_View_Config_Controller::get_combined_layout_schema
Returns a combined layout schema that accepts properties from all view types.
This is useful for contexts where the view type is not known ahead of time (e.g. the view override in a view list item), so all possible layout properties must be accepted.
Метод класса: WP_REST_View_Config_Controller{}
Хуков нет.
Возвращает
array. Schema for a combined layout object.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_combined_layout_schema();
Список изменений
| С версии 7.1.0 | Введена. |
Код WP_REST_View_Config_Controller::get_combined_layout_schema() WP REST View Config Controller::get combined layout schema WP 7.1.2
protected function get_combined_layout_schema() {
return array(
'type' => 'object',
'properties' => array_merge(
$this->get_table_layout_schema()['properties'],
$this->get_grid_layout_schema()['properties'],
$this->get_list_layout_schema()['properties']
),
);
}