Make WordPress Core

Opened 18 years ago

Closed 12 years ago

Last modified 12 years ago

#5031 closed enhancement (maybelater)

Tag Cloud styles are hardcoded

Reported by: technosailor's profile technosailor Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.3
Component: Taxonomy Keywords: has-patch reporter-feedback
Focuses: Cc:

Description

We should provide a way for tag cloud styles to be set somewhere other than in the core code. Really should be the job of a theme, not the core. Yet, we are setting font-size manually. Why?

This has already come up as a problem prior to the 2.3 release. Suggest we at minimum make the styling hookable, and at most, give a css class that has relative meaning for the tag cloud.

Specifically, this would enable folks to have colored tag clouding as opposed to just font size.

Attachments (1)

tagcloud-class.diff (1.3 KB) - added by Otto42 18 years ago.
Tag Cloud - allows classes instead of styles.

Download all attachments as: .zip

Change History (15)

#1 @foolswisdom
18 years ago

  • Milestone changed from 2.3.1 to 2.4
  • Version set to 2.3

#2 @rob1n
18 years ago

I'm +1 for this and I believe this should be snuck into 2.3 as this would make tag clouds more to people's tastes -- it doesn't have to be size, could be color, etc.

#3 @technosailor
18 years ago

The code for creating gradient colors for such a routine strikes me as bloat. I tried to write some test code a variety of different ways and ended up ripping code from php.net instead. Even that is 'thick' code. My sample script for feedback:

http://pastebin.ca/706051

And the display:

http://technosailor.com/hextest.php

It's not WP code but could be integrated. The gradient code is more excessive than I'd prefer (and I think most devs would agree), but I toss it out there as an option. As I see it, we could just pass optional start_color and end_color vars into wp_generate_tag_cloud() with defaults of 000000 and 000000. That shouldn't spoil the status quo at all but would allow tag cloud "colors".

Thoughts?

#4 @Otto42
18 years ago

  • Keywords has-patch added

My thought is that it's being overthought here. The tag_cloud should have a clean ability, where it does nothing more than output relative CSS classes. Like tagcloud1, tagcloud2, tagcloud37, whatever. Then the theme can define whatever styles they want for each bit in their own CSS file.

Here, I'll attach a patch to explain. It allows you to eschew the use of inline styles in favor of classes instead.

@Otto42
18 years ago

Tag Cloud - allows classes instead of styles.

#5 follow-up: @Denis-de-Bernardy
16 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

yet another one... see #5157

#6 @Denis-de-Bernardy
16 years ago

  • Milestone 2.9 deleted

#7 in reply to: ↑ 5 @hakre
15 years ago

  • Milestone set to Future Release
  • Type changed from defect (bug) to enhancement

Replying to Denis-de-Bernardy:

yet another one... see #5157

Ups. #5157 is not a duplicate to this one.


Related: #12602, #12615

#8 @hakre
15 years ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened

#9 @hakre
15 years ago

Optionally because of backwards compability offer options on the widget how to style.

A: Classic (style attribute)

B: CSS-Classes (class attribute)

C: None (for those who like a list)

#10 @hakre
15 years ago

Related: #5172
Related: #8903

#11 @hakre
14 years ago

  • Keywords reporter-feedback dev-feedback added

Are patches (or updates to the existing one) welcome for this issue?

#12 @iseulde
12 years ago

  • Component changed from General to Taxonomy
  • Keywords close added

wontfix? No feedback in over three years...

#13 follow-up: @DrewAPicture
12 years ago

  • Keywords dev-feedback close removed
  • Milestone Future Release deleted
  • Resolution set to maybelater
  • Status changed from reopened to closed

#14 in reply to: ↑ 13 @iseulde
12 years ago

Actually this is a duplicate of #5172

Note: See TracTickets for help on using tickets.