Ticket #11017: 11017.patch
| File 11017.patch, 1.1 KB (added by , 17 years ago) |
|---|
-
author-template.php
249 249 $defaults = array( 250 250 'optioncount' => false, 'exclude_admin' => true, 251 251 'show_fullname' => false, 'hide_empty' => true, 252 'sort_column' => 'display_name', 'sort_order' => 'ASC', 252 253 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 253 254 'style' => 'list', 'html' => true 254 255 ); … … 258 259 $return = ''; 259 260 260 261 /** @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 ;); 262 263 263 264 $author_count = array(); 264 265 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) {