rest_themes_collection_params хук-фильтрWP 5.0.0

Filters REST API collection parameters for the themes controller.

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

add_filter( 'rest_themes_collection_params', 'wp_kama_rest_themes_collection_params_filter' );

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

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

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

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

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

WP_REST_Themes_Controller::get_collection_params()
rest_themes_collection_params
wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php 638
return apply_filters( 'rest_themes_collection_params', $query_params );

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

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