tag_cloud_sort хук-фильтрWP 2.8.0

Filters how the items in a tag cloud are sorted.

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

add_filter( 'tag_cloud_sort', 'wp_kama_tag_cloud_sort_filter', 10, 2 );

/**
 * Function for `tag_cloud_sort` filter-hook.
 * 
 * @param WP_Term[] $tags Ordered array of terms.
 * @param array     $args An array of tag cloud arguments.
 *
 * @return WP_Term[]
 */
function wp_kama_tag_cloud_sort_filter( $tags, $args ){

	// filter...
	return $tags;
}
$tags(WP_Term[])
Ordered array of terms.
$args(массив)
An array of tag cloud arguments.

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

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

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

wp_generate_tag_cloud()
tag_cloud_sort
wp-includes/category-template.php 900
$tags_sorted = apply_filters( 'tag_cloud_sort', $tags, $args );

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

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