WP_REST_Font_Collections_Controller::get_collection_paramspublicWP 6.5.0

Retrieves the search params for the font collections.

Method of the class: WP_REST_Font_Collections_Controller{}

Returns

Array. Collection parameters.

Usage

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

Changelog

Since 6.5.0 Introduced.

WP_REST_Font_Collections_Controller::get_collection_params() code WP 7.0

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

	$query_params['context'] = $this->get_context_param( array( 'default' => 'view' ) );

	unset( $query_params['search'] );

	/**
	 * Filters REST API collection parameters for the font collections controller.
	 *
	 * @since 6.5.0
	 *
	 * @param array $query_params JSON Schema-formatted collection parameters.
	 */
	return apply_filters( 'rest_font_collections_collection_params', $query_params );
}