Make WordPress Core

Ticket #5645: const_cloud_size.diff

File const_cloud_size.diff, 715 bytes (added by SidBhatt, 19 years ago)

Patch for handing case smallest = largest in wp_tag_cloud

  • wp-includes/category-template.php

     
    377377                $tag_link = clean_url($tag_links[$tag]);
    378378                $tag = str_replace(' ', ' ', wp_specialchars( $tag ));
    379379                $a[] = "<a href='$tag_link' class='tag-link-$tag_id' title='" . attribute_escape( sprintf( __ngettext('%d topic','%d topics',$count), $count ) ) . "'$rel style='font-size: " .
    380                         ( $smallest + ( ( $count - $min_count ) * $font_step ) )
     380                        ($smallest == $largest ? $smallest : ( $smallest + ( ( $count - $min_count ) * $font_step ) ) )
    381381                        . "$unit;'>$tag</a>";
    382382        }
    383383