[wp-trac] [WordPress Trac] #13729: Post Query should be able to order by specific order passed in "post__in"

WordPress Trac wp-trac at lists.automattic.com
Fri Jul 8 02:23:04 UTC 2011


#13729: Post Query should be able to order by specific order passed in "post__in"
-----------------------------------+-----------------------------
 Reporter:  jakemgold              |       Owner:  ryan
     Type:  enhancement            |      Status:  closed
 Priority:  normal                 |   Milestone:  Future Release
Component:  Query                  |     Version:  3.2
 Severity:  minor                  |  Resolution:  fixed
 Keywords:  2nd-opinion has-patch  |
-----------------------------------+-----------------------------

Comment (by jakemgold):

 Finally submitted a patch... fairly easy to test since there's no need for
 multiple orderby paramaters when you're ordering by ID (given that it's
 unique, there should never be a secondary orderby need).

 Only questionable area has to do with "order" argument. Since the query is
 explicitly provided IDs, I've simply left out "order". If they want it in
 reverse order, they could theoretically just enter them in reverse order.
 We could tack it back on, but it will be a bit tricky, since the expected
 order is ASC (the order supplied), which is the opposite of the "default"
 WordPress sets earlier (DESC).

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


More information about the wp-trac mailing list