Ticket #14448: 14448.patch

File 14448.patch, 773 bytes (added by SergeyBiryukov, 18 months ago)
  • wp-includes/taxonomy.php

     
    13391339                case 'names': 
    13401340                        $selects = array('t.term_id', 'tt.parent', 'tt.count', 't.name'); 
    13411341                        break; 
     1342                case 'slugs': 
     1343                        $selects = array('t.term_id', 'tt.parent', 'tt.count', 't.slug'); 
     1344                        break; 
    13421345                case 'count': 
    13431346                        $orderby = ''; 
    13441347                        $order = ''; 
     
    14161419                while ( $term = array_shift($terms) ) 
    14171420                        $_terms[] = $term->name; 
    14181421                $terms = $_terms; 
     1422        } elseif ( 'slugs' == $fields ) { 
     1423                while ( $term = array_shift($terms) ) 
     1424                        $_terms[] = $term->slug; 
     1425                $terms = $_terms; 
    14191426        } 
    14201427 
    14211428        if ( 0 < $number && intval(@count($terms)) > $number ) {