wp_generate_tag_cloud


wp_generate_tag_cloud ( $tags, $args = '' )

Parameters:
  • (WP_Term[]) tags Array of WP_Term objects to generate the tag cloud for.
  • (string|array) args { Optional. Array or string of arguments for generating a tag cloud. @type int $smallest Smallest font size used to display tags. Paired with the value of `$unit`, to determine CSS text size unit. Default 8 (pt). @type int $largest Largest font size used to display tags. Paired with the value of `$unit`, to determine CSS text size unit. Default 22 (pt). @type string $unit CSS text size unit to use with the `$smallest` and `$largest` values. Accepts any valid CSS text size unit. Default 'pt'. @type int $number The number of tags to return. Accepts any positive integer or zero to return all. Default 0. @type string $format Format 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'. @type string $separator HTML or text to separate the tags. Default "\n" (newline). @type string $orderby Value to order tags by. Accepts 'name' or 'count'. Default 'name'. The {@see 'tag_cloud_sort'} filter can also affect how tags are sorted. @type string $order How to order the tags. Accepts 'ASC' (ascending), 'DESC' (descending), or 'RAND' (random). Default 'ASC'. @type int|bool $filter Whether to enable filtering of the final output via {@see 'wp_generate_tag_cloud'}. Default 1|true. @type string $topic_count_text Nooped plural text from _n_noop() to supply to tag counts. Default null. @type callable $topic_count_text_callback Callback used to generate nooped plural text for tag counts based on the count. Default null. @type callable $topic_count_scale_callback Callback used to determine the tag count scaling value. Default default_topic_count_scale(). @type bool|int $show_count Whether to display the tag counts. Default 0. Accepts 0, 1, or their bool equivalents. }
Returns:
  • (string|array) Tag cloud as a string or an array, depending on 'format' argument.
Defined at:
Change Log:
  • 4: .

Description

Generates a tag cloud (heatmap) from provided data.

Related Functions

wp_generate_uuid4, wp_generate_auth_cookie, wp_generate_password, wp_tag_cloud, wp_ajax_get_tagcloud

Top Google Results

User discussions

wpseek mobile