Make WordPress Core

Opened 16 years ago

Closed 14 years ago

#5171 closed enhancement (duplicate)

Add parameters to "tag_cloud()" to bypass size variation, and to show frequency counts

Reported by: brh's profile brh Owned by: westi's profile westi
Milestone: Priority: normal
Severity: normal Version:
Component: Template Keywords: needs-patch
Focuses: Cc:

Description

I wanted to display a "tag cloud" using the tag_cloud() tag, but without any inline font-size tags, and with the frequency of the tag displayed beside the tag (like it can be with categories). You can see an example at http://brh.numbera.com/blog/. To do this I added the "varysize" and "showcounts" parameters to the tag.

Attachments (1)

category-template.php.diff (1.6 KB) - added by brh 16 years ago.
Patch against trunk (rev. 6206) to add these two parameters

Download all attachments as: .zip

Change History (11)

@brh
16 years ago

Patch against trunk (rev. 6206) to add these two parameters

#1 @foolswisdom
16 years ago

  • Milestone set to 2.4

#2 @westi
16 years ago

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

Accepting Ticket - I will review this and checkin.

#3 @westi
16 years ago

Note to self - See also #5131 and #5172

#4 @Otto42
16 years ago

I think the whole tag cloud function might need a rethink here. This is the first tag cloud function I've seen using inline styles instead of simply assigning weight and ID classes. Inline styles are generally bad form, and move presentation out of the theme and into the core, which is the wrong way to go.

I propose getting rid of the inline styles entirely, and adding some styles to the bundled themes, so as to show how it's done. I suggest tag-cloud-weight-X and tag-cloud-id-X classes.

Yeah, it'll break some things. So deprecate for a version if you feel it's needed, but 2.4 should clean this up a bit and ditch the style="whatever" entirely from the tag cloud.

#5 @AaronCampbell
15 years ago

+1 for the inline styles being a bad idea

#6 @ffemtcj
15 years ago

  • Milestone changed from 2.5 to 2.6

#7 follow-up: @brh
14 years ago

  • Milestone changed from 2.9 to 2.8

Any chance this could get fixed for 2.8 or 2.7.1? I was disappointed to see that the inline styles are still there in 2.7.

#8 in reply to: ↑ 7 @FFEMTcJ
14 years ago

Replying to brh:

Any chance this could get fixed for 2.8 or 2.7.1? I was disappointed to see that the inline styles are still there in 2.7.

Is the patch still valid?

#9 @Denis-de-Bernardy
14 years ago

  • Keywords needs-patch added; has-patch removed
  • Milestone changed from 2.8 to Future Release

broken patch

#10 @Denis-de-Bernardy
14 years ago

  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from assigned to closed

see #5172

Note: See TracTickets for help on using tickets.