Make WordPress Core

Opened 17 years ago

Closed 16 years ago

#7504 closed defect (bug) (fixed)

wp_tag_cloud does not honor largest and smallest options

Reported by: edoardo's profile Edoardo Owned by:
Milestone: 2.7 Priority: normal
Severity: normal Version: 2.6
Component: General Keywords: has-patch commit
Focuses: Cc:

Description

<?php wp_tag_cloud('format=list&smallest=10&largest=10'); ?>

When you have an unevenly distributed amount of tags (quite the ordinary situation) that template tag does not produce an equal font sized list as expected.

Attachments (1)

7504.diff (512 bytes) - added by scohoust 17 years ago.

Download all attachments as: .zip

Change History (7)

#1 @scohoust
17 years ago

It looks like there is always meant to be at least 1 unit a difference between the largest and smallest. The attached seems to fix it, whether it is indeed a bug. Alternatively, you could change the unit to be something where a difference of 1 isn't noticeable.

@scohoust
17 years ago

#2 @westi
17 years ago

  • Keywords has-patch added
  • Milestone changed from 2.6.1 to 2.6.2

2.6.1 has been released, moving to 2.6.2 milestone

#3 follow-up: @Edoardo
17 years ago

The patch provided does indeed fix the issue however I think that the line following the changed one must be changed too in order to set $font_spread to 0 (not 1) if the $font_spread is negative.

#4 in reply to: ↑ 3 @scohoust
17 years ago

Replying to Edoardo:

The patch provided does indeed fix the issue however I think that the line following the changed one must be changed too in order to set $font_spread to 0 (not 1) if the $font_spread is negative.

That would work, although $font_spread only becomes negative when someone sets the smallest font greater than the larger font, hopefully pretty rare.

#5 @jacobsantos
16 years ago

  • Keywords commit added

#6 @ryan
16 years ago

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

(In [9952]) Honor largest and smallest options when they are the same. Props scohoust. fixes #7504

Note: See TracTickets for help on using tickets.