[wp-trac] [WordPress Trac] #10703: Logarithmic scale for tag cloud tag size

WordPress Trac wp-trac at lists.automattic.com
Mon Aug 31 08:00:52 UTC 2009


#10703: Logarithmic scale for tag cloud tag size
-------------------------+--------------------------------------------------
 Reporter:  kometbomb    |       Owner:                 
     Type:  enhancement  |      Status:  new            
 Priority:  normal       |   Milestone:  Unassigned     
Component:  Template     |     Version:  2.8.4          
 Severity:  normal       |    Keywords:  tag cloud, tags
-------------------------+--------------------------------------------------
 The tag clouds generated by wp_tag_cloud() tend to work poorly if there's
 one or two dominant tags, i.e. the tag could has very many small tags and
 one or two huge tags. This can be avoided by not resizing the tags by the
 normalized absolute post count but by the normalized log10 of the count.
 This makes the offending "peak" tags smaller.

 Here's a patch that adds a new boolean arg for wp_tag_cloud() called
 'logarithmic'. The default is false which makes wp_tag_cloud() generate
 the same cloud as before, setting the arg to true makes wp_tag_cloud()
 generate a tag cloud with the tag sizes based on log10.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10703>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list