diff --git a/wp-includes/user.php b/wp-includes/user.php index 38a4a6337..77c605c72 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -412,7 +412,7 @@ class WP_User_Query { // sorting if ( in_array( $qv['orderby'], array('email', 'url', 'registered') ) ) { $orderby = 'user_' . $qv['orderby']; - } elseif ( 'name' == $qv['orderby'] ) { + } elseif ( 'name' == $qv['orderby'] || 'display_name' == $qv['orderby'] ) { $orderby = 'display_name'; } elseif ( 'post_count' == $qv['orderby'] ) { $where = get_posts_by_author_sql('post'); @@ -928,15 +928,13 @@ function setup_userdata($for_user_id = '') { * The available arguments are as follows: *
    *
  1. show_option_all - Text to show all and whether HTML option exists.
  2. - *
  3. show_option_none - Text for show none and whether HTML option exists. - *
  4. - *
  5. orderby - SQL order by clause for what order the users appear. Default is - * 'display_name'.
  6. + *
  7. show_option_none - Text for show none and whether HTML option exists.
  8. + *
  9. orderby - SQL order by clause for what order the users appear. Default is 'display_name'.
  10. *
  11. order - Default is 'ASC'. Can also be 'DESC'.
  12. *
  13. include - User IDs to include.
  14. *
  15. exclude - User IDs to exclude.
  16. *
  17. multi - Default is 'false'. Whether to skip the ID attribute on the 'select' element. A 'true' value is overridden when id argument is set.
  18. - *
  19. show - Default is 'display_name'. User table column to display. If the selected item is empty then the user_login will be displayed in parentesis
  20. + *
  21. show - Default is 'display_name'. User table column to display. If the selected item is empty then the user_login will be displayed in parentheses
  22. *
  23. echo - Default is '1'. Whether to display or retrieve content.
  24. *
  25. selected - Which User ID is selected.
  26. *
  27. name - Default is 'user'. Name attribute of select element.
  28. @@ -967,7 +965,7 @@ function wp_dropdown_users( $args = '' ) { $r = wp_parse_args( $args, $defaults ); extract( $r, EXTR_SKIP ); - $users = get_users( wp_array_slice_assoc( $args, array( 'blog_id', 'include', 'exclude', 'orderby', 'order' ) ) ); + $users = get_users( wp_array_slice_assoc( $r, array( 'blog_id', 'include', 'exclude', 'orderby', 'order' ) ) ); $output = ''; if ( !empty($users) ) {