rest_pattern_directory_collection_params хук-фильтрWP 5.8.0

Filter collection parameters for the block pattern directory controller.

Использование

add_filter( 'rest_pattern_directory_collection_params', 'wp_kama_rest_pattern_directory_collection_params_filter' );

/**
 * Function for `rest_pattern_directory_collection_params` filter-hook.
 * 
 * @param array $query_params JSON Schema-formatted collection parameters.
 *
 * @return array
 */
function wp_kama_rest_pattern_directory_collection_params_filter( $query_params ){

	// filter...
	return $query_params;
}
$query_params(массив)
JSON Schema-formatted collection parameters.

Список изменений

С версии 5.8.0 Введена.

Где вызывается хук

WP_REST_Pattern_Directory_Controller::get_collection_params()
rest_pattern_directory_collection_params
wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php 376
return apply_filters( 'rest_pattern_directory_collection_params', $query_params );

Где используется хук в WordPress

Использование не найдено.