Title: WP_REST_Icon_Collections_Controller::get_collection_params
Published: August 20, 2026

---

# WP_REST_Icon_Collections_Controller::get_collection_params(): array

## In this article

 * [Return](https://developer.wordpress.org/reference/classes/wp_rest_icon_collections_controller/get_collection_params/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_rest_icon_collections_controller/get_collection_params/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_rest_icon_collections_controller/get_collection_params/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_rest_icon_collections_controller/get_collection_params/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_rest_icon_collections_controller/get_collection_params/?output_format=md#wp--skip-link--target)

Retrieves the query params for the icon collections collection.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_rest_icon_collections_controller/get_collection_params/?output_format=md#return)󠁿

 array Collection parameters.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_rest_icon_collections_controller/get_collection_params/?output_format=md#source)󠁿

    ```php
    public function get_collection_params() {
    	$query_params                       = parent::get_collection_params();
    	$query_params['context']['default'] = 'view';
    	return $query_params;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/rest-api/endpoints/class-wp-rest-icon-collections-controller.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-icon-collections-controller.php#L261)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-icon-collections-controller.php#L261-L265)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_rest_icon_collections_controller/get_collection_params/?output_format=md#related)󠁿

| Uses | Description | 
| [WP_REST_Controller::get_collection_params()](https://developer.wordpress.org/reference/classes/wp_rest_controller/get_collection_params/)`wp-includes/rest-api/endpoints/class-wp-rest-controller.php` |

Retrieves the query params for the collections.

  |

| Used by | Description | 
| [WP_REST_Icon_Collections_Controller::register_routes()](https://developer.wordpress.org/reference/classes/wp_rest_icon_collections_controller/register_routes/)`wp-includes/rest-api/endpoints/class-wp-rest-icon-collections-controller.php` |

Registers the routes for the objects of the controller.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_rest_icon_collections_controller/get_collection_params/?output_format=md#changelog)󠁿

| Version | Description | 
| [7.1.0](https://developer.wordpress.org/reference/since/7.1.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_rest_icon_collections_controller%2Fget_collection_params%2F)
before being able to contribute a note or feedback.