Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#4129 closed enhancement (fixed)

Tag Clouds

Reported by: mdawaffe Owned by: mdawaffe
Milestone: 2.2 Priority: normal
Severity: normal Version: 2.2
Component: Template Keywords: tags has-patch
Focuses: Cc:


#3723 introduces tags to WP core. Here's a port of bbPress tag cloud generating functions.

wp_generate_tag_cloud( $tags, $args )

Feed it prefetched tags (get_tags()) and some arguments that determine the sizes of the fonts in the cloud. Generic function that can accept whatever tags you throw into it (related tags, tags found on posts in category X, tags that start with Q, least used tags, whatever).

wp_tag_cloud( $args )

Grabs top tags and feeds them to wp_generate_tag_cloud().

wp_parse_args( $args, $defaults )

Helper function ryan and I would like to see fully adopted for 2.3.

Tweaks get_tags().

Small bug and use of wp_parse_args().

Attachments (1)

4129.diff (5.3 KB) - added by mdawaffe 15 years ago.

Download all attachments as: .zip

Change History (3)

15 years ago

#1 @mdawaffe
15 years ago

  • Owner changed from anonymous to mdawaffe
  • Status changed from new to assigned

Forgot to mention wp_generate_tag_cloud() can output a whitespace separated list, a UL/LI list, or a raw array of links.

#2 @ryan
15 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [5234]) Tag clouds from mdawaffe. fixes #4129

Note: See TracTickets for help on using tickets.