WP_REST_Global_Styles_Revisions_Controller::get_collection_params(): array

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().


Top ↑

Return

array Collection parameters.


Top ↑

Source

File: wp-includes/rest-api/endpoints/class-wp-rest-global-styles-revisions-controller.php. View all references

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;
}


Top ↑

Changelog

Changelog
Version Description
6.3.0 Introduced.

Top ↑

User Contributed Notes

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