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.
Method of the class: WP_REST_View_Config_Controller{}
No Hooks.
Returns
array. Schema for a combined layout object.
Usage
// protected - for code of main (parent) or child class $result = $this->get_combined_layout_schema();
Changelog
| Since 7.1.0 | Introduced. |
WP_REST_View_Config_Controller::get_combined_layout_schema() WP REST View Config Controller::get combined layout schema code 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']
),
);
}