mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Administration: In user list tables, display a dash instead of a blank space and add "Unknown" as a screen reader text when the user's first name and last name are blank.
Props Girishpanchal, yahil. Fixes #40628. Built from https://develop.svn.wordpress.org/trunk@40956 git-svn-id: http://core.svn.wordpress.org/trunk@40806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d08982bdbc
commit
25e94961b4
@ -258,7 +258,11 @@ class WP_MS_Users_List_Table extends WP_List_Table {
|
||||
* @param WP_User $user The current WP_User object.
|
||||
*/
|
||||
public function column_name( $user ) {
|
||||
echo "$user->first_name $user->last_name";
|
||||
if ( $user->first_name && $user->last_name ) {
|
||||
echo "$user->first_name $user->last_name";
|
||||
} else {
|
||||
echo '<span aria-hidden="true">—</span><span class="screen-reader-text">' . _x( 'Unknown', 'name' ) . '</span>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -471,7 +471,11 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
$r .= "$avatar $edit";
|
||||
break;
|
||||
case 'name':
|
||||
$r .= "$user_object->first_name $user_object->last_name";
|
||||
if ( $user_object->first_name && $user_object->last_name ) {
|
||||
$r .= "$user_object->first_name $user_object->last_name";
|
||||
} else {
|
||||
$r .= '<span aria-hidden="true">—</span><span class="screen-reader-text">' . _x( 'Unknown', 'name' ) . '</span>';
|
||||
}
|
||||
break;
|
||||
case 'email':
|
||||
$r .= "<a href='" . esc_url( "mailto:$email" ) . "'>$email</a>";
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.9-alpha-40955';
|
||||
$wp_version = '4.9-alpha-40956';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user