wp_generate_tag_cloud filter-hookWP 2.3.0

Filters the generated output of a tag cloud.

The filter is only evaluated if a true value is passed to the $filter argument in wp_generate_tag_cloud().

Usage

add_filter( 'wp_generate_tag_cloud', 'wp_kama_generate_tag_cloud_filter', 10, 3 );

/**
 * Function for `wp_generate_tag_cloud` filter-hook.
 * 
 * @param string[]|string $return String containing the generated HTML tag cloud output or an array of tag links if the 'format' argument equals 'array'.
 * @param WP_Term[]       $tags   An array of terms used in the tag cloud.
 * @param array           $args   An array of wp_generate_tag_cloud() arguments.
 *
 * @return string[]|string
 */
function wp_kama_generate_tag_cloud_filter( $return, $tags, $args ){

	// filter...
	return $return;
}
$return(string[]|string)
String containing the generated HTML tag cloud output or an array of tag links if the 'format' argument equals 'array'.
$tags(WP_Term[])
An array of terms used in the tag cloud.
$args(array)
An array of wp_generate_tag_cloud() arguments.

Changelog

Since 2.3.0 Introduced.

Where the hook is called

wp_generate_tag_cloud()
wp_generate_tag_cloud
wp-includes/category-template.php 1045
return apply_filters( 'wp_generate_tag_cloud', $return, $tags, $args );

Where the hook is used in WordPress

Usage not found.