[wp-trac] [WordPress Trac] #8609: Tag cloud order priority is broken

WordPress Trac wp-trac at lists.automattic.com
Sun Dec 14 01:35:39 GMT 2008

#8609: Tag cloud order priority is broken
 Reporter:  brh      |       Owner:  anonymous
     Type:  defect   |      Status:  new      
 Priority:  normal   |   Milestone:  2.8      
Component:  General  |     Version:  2.7      
 Severity:  normal   |    Keywords:           
 If you specify the order parameter (ASC or DESC) for wp_tag_cloud, you get
 the opposite ordering you asked for.

 On line 654 of category-template.php, there's some code that looks like

         if ( 'DESC' == $order )
                 $tags = array_reverse( $tags, true );

 But up at line 560, the query that gets the tags always uses DESC. So
 reversing it gets an ascending order. Line 654 should be changed to "if (
 'ASC' == $order )". Beyond that, having ASC as a default for ordering
 something on frequency is kind of odd, don't you think?

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

More information about the wp-trac mailing list