[wp-trac] [WordPress Trac] #15031: order via meta_query

WordPress Trac wp-trac at lists.automattic.com
Wed Mar 9 11:43:51 UTC 2011


#15031: order via meta_query
--------------------------------------+-----------------------------
 Reporter:  aaroncampbell             |       Owner:  scribu
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  Future Release
Component:  Query                     |     Version:  3.1
 Severity:  normal                    |  Resolution:
 Keywords:  dev-feedback 2nd-opinion  |
--------------------------------------+-----------------------------
Changes (by pento):

 * cc: gary@… (added)


Comment:

 For 2, how about allowing `orderby` to take a string, or an array? It
 maintains backwards compatibility, but would also allow:

 {{{
 'orderby' => array(
   array(
     'meta_key' => 'bar',
     'order' => 'DESC',
   ),
   array(
     'key' => 'date',
     'order' => 'DESC',
   ),
   array(
     'meta_key' => 'foo',
     'order' => 'ASC',
   ),
 )
 }}}

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


More information about the wp-trac mailing list