Ticket #17025: 17025.12.display_name.diff
File 17025.12.display_name.diff, 3.8 KB (added by , 2 years ago) |
---|
-
src/wp-admin/includes/class-wp-ms-users-list-table.php
302 302 */ 303 303 public function column_name( $user ) { 304 304 if ( $user->first_name && $user->last_name ) { 305 echo "$user->first_name $user->last_name"; 305 printf( 306 /* translators: 1: User's first name, 2: Last name. */ 307 _x( '%1$s %2$s', 'Display name based on first name and last name' ), 308 $user->first_name, 309 $user->last_name 310 ); 306 311 } elseif ( $user->first_name ) { 307 312 echo $user->first_name; 308 313 } elseif ( $user->last_name ) { -
src/wp-admin/includes/class-wp-users-list-table.php
568 568 break; 569 569 case 'name': 570 570 if ( $user_object->first_name && $user_object->last_name ) { 571 $r .= "$user_object->first_name $user_object->last_name"; 571 $r .= sprintf( 572 /* translators: 1: User's first name, 2: Last name. */ 573 _x( '%1$s %2$s', 'Display name based on first name and last name' ), 574 $user_object->first_name, 575 $user_object->last_name 576 ); 572 577 } elseif ( $user_object->first_name ) { 573 578 $r .= $user_object->first_name; 574 579 } elseif ( $user_object->last_name ) { -
src/wp-includes/author-template.php
476 476 } 477 477 478 478 if ( $args['show_fullname'] && $author->first_name && $author->last_name ) { 479 480 $full_name = $author->first_name . ' ' . $author->last_name; 481 482 /** 483 * Filters the author's full name. 484 * 485 * @since 6.1.0 486 * 487 * @param string $full_name Full Name of the author. Default: The author's first name 488 * and last name, separated by a space. 489 * @param object $author Author object. 490 */ 491 $name = apply_filters( 'wp_list_author_full_name', $full_name, $author ); 492 479 $name = sprintf( 480 /* translators: 1: User's first name, 2: Last name. */ 481 _x( '%1$s %2$s', 'Display name based on first name and last name' ), 482 $author->first_name, 483 $author->last_name 484 ); 493 485 } else { 494 486 $name = $author->display_name; 495 487 } -
src/wp-includes/user.php
827 827 } 828 828 829 829 if ( $args['show_fullname'] && '' !== $user->first_name && '' !== $user->last_name ) { 830 $name = "$user->first_name $user->last_name"; 830 $name = sprintf( 831 /* translators: 1: User's first name, 2: Last name. */ 832 _x( '%1$s %2$s', 'Display name based on first name and last name' ), 833 $user->first_name, 834 $user->last_name 835 ); 831 836 } else { 832 837 $name = $user->display_name; 833 838 } … … 2242 2247 if ( $update ) { 2243 2248 $display_name = $user_login; 2244 2249 } elseif ( $meta['first_name'] && $meta['last_name'] ) { 2245 /* translators: 1: User's first name, 2: Last name. */ 2246 $display_name = sprintf( _x( '%1$s %2$s', 'Display name based on first name and last name' ), $meta['first_name'], $meta['last_name'] ); 2250 $display_name = sprintf( 2251 /* translators: 1: User's first name, 2: Last name. */ 2252 _x( '%1$s %2$s', 'Display name based on first name and last name' ), 2253 $meta['first_name'], 2254 $meta['last_name'] 2255 ); 2247 2256 } elseif ( $meta['first_name'] ) { 2248 2257 $display_name = $meta['first_name']; 2249 2258 } elseif ( $meta['last_name'] ) {