[wp-trac] [WordPress Trac] #13797: get_terms orderby none bug
WordPress Trac
wp-trac at lists.automattic.com
Wed Jun 9 16:21:06 UTC 2010
#13797: get_terms orderby none bug
--------------------------+-------------------------------------------------
Reporter: thomask | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: Taxonomy | Version: 3.0
Severity: trivial | Keywords: has-patch
--------------------------+-------------------------------------------------
get_terms returns nothing when using urderby 'none' as per
http://codex.wordpress.org/Function_Reference/get_terms
it should sort terms by id
the problem is this code in taxonomy.php
{{{
880 else if ( 'none' == $_orderby )
881 $orderby = '';
882 elseif ( empty($_orderby) || 'id' == $_orderby )
883 $orderby = 't.term_id';
}}}
easiest repair would be probably
{{{
880 --- delete ---
881 --- delete ---
882 elseif ( empty($_orderby) || 'none' == $_orderby || 'id' ==
$_orderby )
883 $orderby = 't.term_id';
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13797>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list