Ticket #15791: 15791.v2.diff
| File 15791.v2.diff, 2.2 KB (added by , 15 years ago) |
|---|
-
wp-includes/user.php
412 412 // sorting 413 413 if ( in_array( $qv['orderby'], array('email', 'url', 'registered') ) ) { 414 414 $orderby = 'user_' . $qv['orderby']; 415 } elseif ( 'name' == $qv['orderby'] ) {415 } elseif ( 'name' == $qv['orderby'] || 'display_name' == $qv['orderby'] ) { 416 416 $orderby = 'display_name'; 417 417 } elseif ( 'post_count' == $qv['orderby'] ) { 418 418 $where = get_posts_by_author_sql('post'); … … 928 928 * The available arguments are as follows: 929 929 * <ol> 930 930 * <li>show_option_all - Text to show all and whether HTML option exists.</li> 931 * <li>show_option_none - Text for show none and whether HTML option exists. 932 * </li> 933 * <li>orderby - SQL order by clause for what order the users appear. Default is 934 * 'display_name'.</li> 931 * <li>show_option_none - Text for show none and whether HTML option exists.</li> 932 * <li>orderby - SQL order by clause for what order the users appear. Default is 'display_name'.</li> 935 933 * <li>order - Default is 'ASC'. Can also be 'DESC'.</li> 936 934 * <li>include - User IDs to include.</li> 937 935 * <li>exclude - User IDs to exclude.</li> 938 936 * <li>multi - Default is 'false'. Whether to skip the ID attribute on the 'select' element. A 'true' value is overridden when id argument is set.</li> 939 * <li>show - Default is 'display_name'. User table column to display. If the selected item is empty then the user_login will be displayed in parent esis</li>937 * <li>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</li> 940 938 * <li>echo - Default is '1'. Whether to display or retrieve content.</li> 941 939 * <li>selected - Which User ID is selected.</li> 942 940 * <li>name - Default is 'user'. Name attribute of select element.</li> … … 967 965 $r = wp_parse_args( $args, $defaults ); 968 966 extract( $r, EXTR_SKIP ); 969 967 970 $users = get_users( wp_array_slice_assoc( $ args, array( 'blog_id', 'include', 'exclude', 'orderby', 'order' ) ) );968 $users = get_users( wp_array_slice_assoc( $r, array( 'blog_id', 'include', 'exclude', 'orderby', 'order' ) ) ); 971 969 972 970 $output = ''; 973 971 if ( !empty($users) ) {