Make WordPress Core


Ignore:
Timestamp:
12/06/2015 08:56:11 PM (10 years ago)
Author:
boonebgorges
Message:

Show user_login in Dashboard user dropdowns.

User dropdowns in wp-admin have traditionally shown the users' display names.
However, this causes ambiguity when users share display names. To correct this,
we now show the unique user_login in parentheses after the display name.

The new display_name_with_login value for the show parameter of
wp_dropdown_users() enables this functionality. The default value of show
has not been changed, for backward compatibility, but all instances of
wp_dropdown_users() in core wp-admin have been switched.

This changeset also reduces some duplicated logic when assembling a user list
when include_selected is true.

Props krogsgard, boonebgorges.
Fixes #31251.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/meta-boxes.php

    r35609 r35790  
    743743        'name' => 'post_author_override',
    744744        'selected' => empty($post->ID) ? $user_ID : $post->post_author,
    745         'include_selected' => true
     745        'include_selected' => true,
     746        'show' => 'display_name_with_login',
    746747    ) );
    747748}
Note: See TracChangeset for help on using the changeset viewer.