WordPress.org

Make WordPress Core

Ticket #11017: 11017.patch

File 11017.patch, 1.1 KB (added by ramiy, 4 years ago)

patch based on some other function...

  • author-template.php

     
    249249        $defaults = array( 
    250250                'optioncount' => false, 'exclude_admin' => true, 
    251251                'show_fullname' => false, 'hide_empty' => true, 
     252                'sort_column' => 'display_name', 'sort_order' => 'ASC', 
    252253                'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 
    253254                'style' => 'list', 'html' => true 
    254255        ); 
     
    258259        $return = ''; 
    259260 
    260261        /** @todo Move select to get_authors(). */ 
    261         $authors = $wpdb->get_results("SELECT ID, user_nicename from $wpdb->users " . ($exclude_admin ? "WHERE user_login <> 'admin' " : '') . "ORDER BY display_name"); 
     262        $authors = $wpdb->get_results("SELECT ID, user_nicename from $wpdb->users " . ($exclude_admin ? "WHERE user_login <> 'admin' " : '') . "ORDER BY " . $sort_column . " " . $sort_order ;); 
    262263 
    263264        $author_count = array(); 
    264265        foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM $wpdb->posts WHERE post_type = 'post' AND " . get_private_posts_cap_sql( 'post' ) . " GROUP BY post_author") as $row) {