WP_REST_Icons_Controller::get_collection_params(): array

In this article

Retrieves the query params for the icons collection.

Return

array Collection parameters.

Source

public function get_collection_params() {
	$query_params                       = parent::get_collection_params();
	$query_params['context']['default'] = 'view';
	$query_params['collection']         = array(
		'description' => __( 'Limit results to icons belonging to the given collection slug.' ),
		'type'        => 'string',
		'pattern'     => '^[a-z0-9]([a-z0-9_-]*[a-z0-9])?$',
	);
	return $query_params;
}

Changelog

VersionDescription
7.1.0Added the collection parameter.
7.0.0Introduced.

User Contributed Notes

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