[wp-trac] [WordPress Trac] #18832: wp_get_archives should allow for Ascending and Descending ordering

WordPress Trac wp-trac at lists.automattic.com
Sat Oct 1 22:03:30 UTC 2011


#18832: wp_get_archives should allow for Ascending and Descending ordering
-------------------------+------------------------------
 Reporter:  tar.gz       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:  3.3
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------
Changes (by tar.gz):

 * version:   => 3.3


Comment:

 Following Scribu's encouragement I just submitted my first patch :)

 Be aware that this edit was complete guesswork on my part. I simply
 replaced the hardcoded DESC with a $order variable.

 I tested this on a blank WP 3.3 install with the twentyeleven theme.
 {{{wp_get_archives}}} now accepts

 {{{'order' => 'ASC'}}}

 and it's working for yearly, monthly, weekly, daily archives.

 It does not work for {{{postbypost}}} - replacing DESC with $order (at
 line 1001) results in no output.

 I could live with that, since the ASC option makes most sense with the
 yearly/monthly archives.

 As one could expect, the change does not affect the alphabetic sorting
 with {{{alpha}}}.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18832#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list