Make WordPress Core

Opened 13 years ago

Closed 11 years ago

#5645 closed defect (bug) (duplicate)

wp_tag_cloud with smallest = largest not working correctly

Reported by: SidBhatt Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:


One would expect that if you want to create a tag cloud with all links having the same constant font size, you would call wp_tag_cloud with the same value for both 'smallest' and 'largest'. [e.g wp_tag_cloud('smallest=1&largest=1&unit=em')]

The expected result would be that all links have font size equal to smallest (and largest). Instead, wp_tag_cloud still creates links of different sizes; in fact the resulting font-size can turn out to be higher than the value of 'largest'.

I'm attaching a simple patch (using rev 6597). There are other tickets with related issues of adding more options, styles etc, but their patches involve more extensive changes with new parameters etc. My patch only addresses the issue of the value of smallest and largest being equal and does not overhaul anything. Backwards compatible with existing calls to wp_tag_cloud, and tested.

Attachments (1)

const_cloud_size.diff (715 bytes) - added by SidBhatt 13 years ago.
Patch for handing case smallest = largest in wp_tag_cloud

Download all attachments as: .zip

Change History (2)

13 years ago

Patch for handing case smallest = largest in wp_tag_cloud

#1 @scohoust
11 years ago

  • Keywords has-patch tested removed
  • Milestone 2.9 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Patched from #7504

Note: See TracTickets for help on using tickets.