WP_REST_Global_Styles_Revisions_Controller::get_collection_params(): array

In this article

Retrieves the query params for collections.

Description

Inherits from WP_REST_Controller::get_collection_params(), also reflects changes to return value WP_REST_Revisions_Controller::get_collection_params().

Return

array Collection parameters.

Source

public function get_collection_params() {
	$collection_params                       = parent::get_collection_params();
	$collection_params['context']['default'] = 'view';
	$collection_params['offset']             = array(
		'description' => __( 'Offset the result set by a specific number of items.' ),
		'type'        => 'integer',
	);
	unset( $collection_params['search'] );
	unset( $collection_params['per_page']['default'] );

	return $collection_params;
}

Changelog

VersionDescription
6.3.0Introduced.

User Contributed Notes

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