WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#11612 closed enhancement (fixed)

Expand the Tag cloud widget to support non-tag taxonomies

Reported by: dd32 Owned by: dd32
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.9
Component: Widgets Keywords: has-patch tested
Focuses: Cc:

Description (last modified by dd32)

Attached patch adds a 'Taxonomy' field to the options for the Tag Cloud widget.

Currently on a default install it allows selecting of 'Categories' or 'Post Tags', If you define a custom taxonomy, it'll be available for that as well.

Attachments (3)

11612.diff (2.0 KB) - added by dd32 5 years ago.
11612.2.diff (2.1 KB) - added by dd32 5 years ago.
Adds extra is_taxonomy() validation
11612.3.diff (2.1 KB) - added by scribu 5 years ago.
Cleaner code

Download all attachments as: .zip

Change History (9)

@dd325 years ago

@dd325 years ago

Adds extra is_taxonomy() validation

comment:1 @dd325 years ago

  • Description modified (diff)

@scribu5 years ago

Cleaner code

comment:2 @scribu5 years ago

  • Keywords tested added

A much needed addition.

Patch looks good. I've made a separate method for retrieving the current taxonomy.

comment:3 @hakre5 years ago

  • Version changed from 3.0 to 2.9

How about seeing it committed into trunk? Is there anything speaking against having that in?

Custom taxonomy related tickets: #9269, #10207

comment:4 @nacin5 years ago

  • Owner changed from azaozz to dd32
  • Status changed from new to assigned

comment:5 @dd325 years ago

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

(In [13276]) Allow the Tag Cloud Widget to support non-tag taxonomies. Props Sivel. Fixes #11612

comment:6 @dd325 years ago

Changed a few things here and there, Mainly related to the default title, It defaults to the Taxonomy Label if its left empty (Or 'Tags' for the Post Tags tax.)

I also added a 'show_tagcloud' option to the taxonomy registration process, Defaults to 'show_ui' which defaults to 'public', Allows plugins to specify that they dont want their plugin to be listed in the tag clouds.

Note: See TracTickets for help on using tickets.