WP_REST_View_Config_Controller::get_combined_layout_schema(): array

In this article

Returns a combined layout schema that accepts properties from all view types.

Description

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.

Return

array Schema for a combined layout object.

Source

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']
		),
	);
}

Changelog

VersionDescription
7.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.