rest_pattern_directory_collection_params WordPress Filter Hook
The rest_pattern_directory_collection_params hook allows you to modify the parameters that are used to query collections of WordPress posts. This hook is useful for customizing the behavior of post listing pages, such as the "All Posts" page or a custom post type archive.
apply_filters( 'rest_pattern_directory_collection_params', array $query_params ) #
Filter collection parameters for the block pattern directory controller.
Parameters
- $query_params
(array)JSON Schema-formatted collection parameters.
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php
Changelog
Version | Description |
---|---|
5.8.0 | Introduced. |