WordPress.org

Make WordPress Core

Ticket #7539: 7539.diff

File 7539.diff, 877 bytes (added by DD32, 5 years ago)
  • wp-includes/taxonomy.php

     
    522522 * 
    523523 * The list of arguments that $args can contain, which will overwrite the defaults: 
    524524 * 
    525  * orderby - Default is 'name'. Can be name, count, or nothing (will use 
    526  * term_id). 
     525 * orderby - Default is 'name'. Can be name, count, term_group, slug or nothing  
     526 * (will use term_id), Passing a custom value other than these will cause it to 
     527 * order based on the custom value. 
    527528 * 
    528529 * order - Default is ASC. Can use DESC. 
    529530 * 
     
    661662                $orderby = 't.slug'; 
    662663        else if ( 'term_group' == $orderby ) 
    663664                $orderby = 't.term_group'; 
    664         else 
     665        else if ( empty($orderby) || 'id' == $orderby ) 
    665666                $orderby = 't.term_id'; 
    666667 
    667668        $where = '';