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.


Top ↑

Source

File: wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.