Filters the generated output of a tag cloud.
Description
The filter is only evaluated if a true value is passed to the $filter argument in wp_generate_tag_cloud() .
See also
Parameters
$returnstring[]|string- String containing the generated HTML tag cloud output or an array of tag links if the
'format'argument equals'array'. $tagsWP_Term[]- An array of terms used in the tag cloud.
$argsarray- An array of wp_generate_tag_cloud() arguments.
More Arguments from wp_generate_tag_cloud( … $args )
Array or string of arguments for generating a tag cloud.
smallestintSmallest font size used to display tags. Paired with the value of$unit, to determine CSS text size unit. Default 8 (pt).largestintLargest font size used to display tags. Paired with the value of$unit, to determine CSS text size unit. Default 22 (pt).unitstringCSS text size unit to use with the$smallestand$largestvalues. Accepts any valid CSS text size unit. Default'pt'.numberintThe number of tags to return. Accepts any positive integer or zero to return all.
Default 0.formatstringFormat to display the tag cloud in. Accepts'flat'(tags separated with spaces),'list'(tags displayed in an unordered list), or'array'(returns an array).
Default'flat'.separatorstringHTML or text to separate the tags. Default "n" (newline).orderbystringValue to order tags by. Accepts'name'or'count'.
Default'name'. The 'tag_cloud_sort' filter can also affect how tags are sorted.orderstringHow to order the tags. Accepts'ASC'(ascending),'DESC'(descending), or'RAND'(random). Default'ASC'.filterint|boolWhether to enable filtering of the final output via 'wp_generate_tag_cloud'. Default 1.topic_count_textarrayNooped plural text from _n_noop() to supply to tag counts. Default null.topic_count_text_callbackcallableCallback used to generate nooped plural text for tag counts based on the count. Default null.topic_count_scale_callbackcallableCallback used to determine the tag count scaling value. Default default_topic_count_scale() .show_countbool|intWhether to display the tag counts. Default 0. Accepts 0, 1, or their bool equivalents.
Source
return apply_filters( 'wp_generate_tag_cloud', $return, $tags, $args );
Changelog
| Version | Description |
|---|---|
| 2.3.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.