WP_REST_View_Config_Controller::get_column_style_schemaprotectedWP 7.1.0

Returns the schema for the ColumnStyle type.

Method of the class: WP_REST_View_Config_Controller{}

No Hooks.

Returns

array. Schema for a column style object.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_column_style_schema();

Changelog

Since 7.1.0 Introduced.

WP_REST_View_Config_Controller::get_column_style_schema() code WP 7.1

protected function get_column_style_schema() {
	return array(
		'type'       => 'object',
		'properties' => array(
			'width'    => array(
				'type' => array( 'string', 'number' ),
			),
			'maxWidth' => array(
				'type' => array( 'string', 'number' ),
			),
			'minWidth' => array(
				'type' => array( 'string', 'number' ),
			),
			'align'    => array(
				'type' => 'string',
				'enum' => array( 'start', 'center', 'end' ),
			),
		),
	);
}