WordPress.org

Make WordPress Core

Ticket #6952: may9-category-sorting.diff

File may9-category-sorting.diff, 438 bytes (added by jeremyclarke, 7 years ago)

add php alpha sorting to get_terms() in taxonomy.php

  • wp-includes/taxonomy.php

     
    713713                        } 
    714714                } 
    715715        } 
     716         
     717        // Resort by name in PHP in case SQL didn't (for non-latin alphabets) 
     718        if ( 'name' == $args['orderby'] )  
     719                usort( $terms, '_usort_terms_by_name' ); 
     720                 
     721                 
    716722        reset ( $terms ); 
    717723 
    718724        $cache[ $key ] = $terms;