WordPress.org

Make WordPress Core

Ticket #15791: 15791.diff

File 15791.diff, 2.2 KB (added by duck_, 7 years ago)
  • wp-includes/user.php

     
    928928 * The available arguments are as follows:
    929929 * <ol>
    930930 * <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 'name' (for display_name).</li>
    935933 * <li>order - Default is 'ASC'. Can also be 'DESC'.</li>
    936934 * <li>include - User IDs to include.</li>
    937935 * <li>exclude - User IDs to exclude.</li>
    938936 * <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 parentesis</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>
    940938 * <li>echo - Default is '1'. Whether to display or retrieve content.</li>
    941939 * <li>selected - Which User ID is selected.</li>
    942940 * <li>name - Default is 'user'. Name attribute of select element.</li>
     
    955953        global $wpdb;
    956954        $defaults = array(
    957955                'show_option_all' => '', 'show_option_none' => '',
    958                 'orderby' => 'display_name', 'order' => 'ASC',
     956                'orderby' => 'name', 'order' => 'ASC',
    959957                'include' => '', 'exclude' => '', 'multi' => 0,
    960958                'show' => 'display_name', 'echo' => 1,
    961959                'selected' => 0, 'name' => 'user', 'class' => '', 'blog_id' => $GLOBALS['blog_id'],
     
    967965        $r = wp_parse_args( $args, $defaults );
    968966        extract( $r, EXTR_SKIP );
    969967
    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' ) ) );
    971969
    972970        $output = '';
    973971        if ( !empty($users) ) {