WP_REST_View_Config_Controller::get_grid_layout_schema(): array

In this article

Returns the layout schema for grid-type views (ViewGrid, ViewPickerGrid).

Return

array Schema for a grid layout object.

Source

protected function get_grid_layout_schema() {
	return array(
		'type'       => 'object',
		'properties' => array(
			'badgeFields' => array(
				'type'  => 'array',
				'items' => array(
					'type' => 'string',
				),
			),
			'previewSize' => array(
				'type' => 'number',
			),
			'density'     => array(
				'type' => 'string',
				'enum' => array( 'compact', 'balanced', 'comfortable' ),
			),
		),
	);
}

Changelog

VersionDescription
7.1.0Introduced.

User Contributed Notes

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