[wp-trac] [WordPress Trac] #18832: wp_get_archives should allow for Ascending and Descending ordering
WordPress Trac
wp-trac at lists.automattic.com
Mon Oct 3 20:16:05 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: has-patch |
-------------------------+------------------------------
Comment (by tar.gz):
As I said, my knowledge of the php syntax is rudimentary, so I'm not
entirely sure what the line of code above is doing.
If I integrate it into the function, it fixes the situation where 'order'
would be any value different from 'asc' or 'desc', *but* it spits out the
results in ASC order, while it would be more logical to keep it as the
default (DESC).
What about the following rule:
{{{
if ( 'ASC' != strtoupper( $order ) ) {
$order = 'DESC';
}
}}}
This will accept ASC (case insensitive), and anything else simply returns
DESC.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18832#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list