WordPress at a glance
function is not described

WP_REST_Plugins_Controller::get_collection_params() public WP 5.5.0

Retrieves the query params for the collections.

{} It's a method of the class: WP_REST_Plugins_Controller{}

No Hooks.

Return

Array. Query parameters for the collection.

Usage

$WP_REST_Plugins_Controller = new WP_REST_Plugins_Controller();
$WP_REST_Plugins_Controller->get_collection_params();

Changelog

Since 5.5.0 Introduced.

Code of WP_REST_Plugins_Controller::get_collection_params() WP 5.5.1

<?php
public function get_collection_params() {
	$query_params = parent::get_collection_params();

	$query_params['context']['default'] = 'view';

	$query_params['status'] = array(
		'description' => __( 'Limits results to plugins with the given status.' ),
		'type'        => 'array',
		'items'       => array(
			'type' => 'string',
			'enum' => is_multisite() ? array( 'inactive', 'active', 'network-active' ) : array( 'inactive', 'active' ),
		),
	);

	unset( $query_params['page'], $query_params['per_page'] );

	return $query_params;
}