wp-includes/rest-api/endpoints/class-wp-rest-abilities-v1-list-controller.php:336Retrieves the query params for collections.
array<string,One hook fires while WP_REST_Abilities_V1_List_Controller::get_collection_params() runs, in this order:
Filters REST API collection parameters for the abilities controller.
public function get_collection_params(): array { $query_params = array( 'context' => $this->get_context_param( array( 'default' => 'view' ) ), 'page' => array( 'description' => __( 'Current page of the collection.' ), 'type' => 'integer', 'default' => 1, 'minimum' => 1, ), 'per_page' => array( 'description' => __( 'Maximum number of items to be returned in result set.' ), 'type' => 'integer', 'default' => 50, 'minimum' => 1, 'maximum' => 100, ), 'category' => array( 'description' => __( 'Limit results to abilities in specific ability category.' ), 'type' => 'string', 'sanitize_callback' => 'sanitize_key', 'validate_callback' => 'rest_validate_request_arg', ), 'namespace' => array( 'description' => __( 'Limit results to abilities in a specific namespace.' ), 'type' => 'string', 'sanitize_callback' => 'sanitize_key', 'validate_callback' => 'rest_validate_request_arg', ), 'meta' => array( 'description' => __( 'Limit results to abilities matching all of the given meta fields.' ), 'type' => 'object', 'properties' => array( // show_in_rest is omitted on purpose. It is forced on and cannot be filtered by a caller. 'annotations' => array( 'description' => __( 'Limit results to abilities matching the given behavioral annotations.' ), 'type' => 'object', 'properties' => array( 'readonly' => array( 'description' => __( 'Whether the ability does not modify its environment.' ), 'type' => array( 'boolean', 'null' ), ), 'destructive' => array( 'description' => __( 'Whether the ability may perform destructive updates to its environment.' ), 'type' => array( 'boolean', 'null' ), ), 'idempotent' => array( 'description' => __( 'Whether repeated calls with the same arguments have no additional effect.' ), 'type' => array( 'boolean', 'null' ), ), ), 'additionalProperties' => true, ), ), 'additionalProperties' => true, ), ); /** * Filters REST API collection parameters for the abilities controller. * * Use this to declare the schema type of a custom meta key. A declared * type lets REST coerce a query-string value, for example "true" to a * boolean, before the meta filter matches it. * * @since 7.1.0 * * @param array $query_params JSON Schema-formatted collection parameters. */ return apply_filters( 'rest_abilities_collection_params', $query_params ); }Introduced in 6.9.0. Unchanged from 6.9.7 through 7.1.0.
Signature, return type and hooks compared across 3 parsed releases.
src/wp-includes/rest-api/endpoints/class-wp-rest-abilities-v1-list-controller.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.