[wp-trac] [WordPress Trac] #45084: WP_Term_Query multiple 'orderby' support

WordPress Trac noreply at wordpress.org
Thu Oct 11 16:15:36 UTC 2018


#45084: WP_Term_Query multiple 'orderby' support
-------------------------+-------------------------------------------------
 Reporter:  keraweb      |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Query        |    Version:  trunk
 Severity:  normal       |   Keywords:  dev-feedback needs-unit-tests
  Focuses:               |  needs-codex
-------------------------+-------------------------------------------------
 Just like in the regular WP_Query it would be awesome if it supported
 multiple orderby values (array or space separated).

 I'm currently busy with a patch but the I would like some feedback and
 help with creating unit tests.

 Examples:
 {{{#!php
 <?php
 get_terms(
    'orderby' => 'meta_value name',
    'order' => 'ASC',
 );
 }}}

 {{{#!php
 <?php
 get_terms(
    'orderby' => array(
       'meta_value' => 'ASC',
       'name'       => 'ASC',
    ),
 );
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45084>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list