[wp-trac] [WordPress Trac] #26963: wp_get_object_terms using wrong orderby statement

WordPress Trac noreply at wordpress.org
Thu Jan 30 14:52:55 UTC 2014


#26963: wp_get_object_terms using wrong orderby statement
-------------------------------+-----------------------------
 Reporter:  danielvonmitschke  |      Owner:
     Type:  defect (bug)       |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Taxonomy           |    Version:  3.8
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 Tested on 3.8.1

 In wp-includes/taxonomy.php it says:

 Line 2002:
 {{{
         if ( 'count' == $orderby )
                 $orderby = 'tt.count';
         else if ( 'name' == $orderby )
                 $orderby = 't.name';
         else if ( 'slug' == $orderby )
                 $orderby = 't.slug';
         else if ( 'term_group' == $orderby )
                 $orderby = 't.term_group';
         else if ( 'term_order' == $orderby )
                 $orderby = 'tr.term_order';
         else if ( 'none' == $orderby ) {
                 $orderby = '';
                 $order = '';
         } else {
                 $orderby = 't.term_id';
         }
 }}}

 Line: 2010
 {{{
         else if ( 'term_order' == $orderby )
                 $orderby = 'tr.term_order';

 }}}


 From my understanding the ''term_order == $orderby'' statement should be
 set on the ''terms'' table and not on the ''term_relationsships'' table
 (identical to the other orderby statements).

 {{{
         else if ( 'term_order' == $orderby )
                 $orderby = 't.term_order';
 }}}

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


More information about the wp-trac mailing list