diff --git a/src/wp-admin/user-edit.php b/src/wp-admin/user-edit.php
index 5bc91c9820..80cef618e5 100644
|
a
|
b
|
if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_c |
| 388 | 388 | </tr> |
| 389 | 389 | |
| 390 | 390 | <tr class="user-last-name-wrap"> |
| 391 | | <th><label for="other_name"><?php _e('Additional Names') ?></label></th> |
| 392 | | <td><input type="text" name="other_name" id="other_name" value="<?php echo esc_attr($profileuser->other_name) ?>" class="regular-text" /></td> |
| 393 | | </tr> |
| 394 | | |
| 395 | | |
| 396 | | <tr class="user-last-name-wrap"> |
| 397 | 391 | <th><label for="last_name"><?php _e('Last Name') ?></label></th> |
| 398 | 392 | <td><input type="text" name="last_name" id="last_name" value="<?php echo esc_attr($profileuser->last_name) ?>" class="regular-text" /></td> |
| 399 | 393 | </tr> |
| … |
… |
if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_c |
| 414 | 408 | |
| 415 | 409 | if ( !empty($profileuser->first_name) ) |
| 416 | 410 | $public_display['display_firstname'] = $profileuser->first_name; |
| 417 | | |
| 418 | | if ( !empty($profileuser->other_name) ) |
| 419 | | $public_display['display_othername'] = $profileuser->other_name; |
| 420 | | |
| | 411 | |
| 421 | 412 | if ( !empty($profileuser->last_name) ) |
| 422 | 413 | $public_display['display_lastname'] = $profileuser->last_name; |
| 423 | 414 | |
| 424 | 415 | if ( !empty($profileuser->first_name) && !empty($profileuser->last_name) ) { |
| 425 | 416 | $public_display['display_firstlast'] = $profileuser->first_name . ' ' . $profileuser->last_name; |
| 426 | 417 | $public_display['display_lastfirst'] = $profileuser->last_name . ' ' . $profileuser->first_name; |
| 427 | | $public_display['display_lastfirstother'] = $profileuser->last_name . ' ' . $profileuser->first_name . ' ' . $profileuser->other_name; |
| 428 | | $public_display['display_firstotherlast'] = $profileuser->first_name . ' ' . $profileuser->other_name . ' ' . $profileuser->last_name; |
| 429 | 418 | } |
| 430 | 419 | |
| 431 | 420 | if ( !in_array( $profileuser->display_name, $public_display ) ) // Only add this if it isn't duplicated elsewhere |
diff --git a/src/wp-admin/user-new.php b/src/wp-admin/user-new.php
index 269df53fa5..1ea39ba950 100644
|
a
|
b
|
$creating = isset( $_POST['createuser'] ); |
| 392 | 392 | |
| 393 | 393 | $new_user_login = $creating && isset( $_POST['user_login'] ) ? wp_unslash( $_POST['user_login'] ) : ''; |
| 394 | 394 | $new_user_firstname = $creating && isset( $_POST['first_name'] ) ? wp_unslash( $_POST['first_name'] ) : ''; |
| 395 | | $new_user_othername = $creating && isset( $_POST['other_name'] ) ? wp_unslash( $_POST['other_name'] ) : ''; |
| 396 | 395 | $new_user_lastname = $creating && isset( $_POST['last_name'] ) ? wp_unslash( $_POST['last_name'] ) : ''; |
| 397 | 396 | $new_user_email = $creating && isset( $_POST['email'] ) ? wp_unslash( $_POST['email'] ) : ''; |
| 398 | 397 | $new_user_uri = $creating && isset( $_POST['url'] ) ? wp_unslash( $_POST['url'] ) : ''; |
| … |
… |
$new_user_ignore_pass = $creating && isset( $_POST['noconfirmation'] ) ? wp_unsl |
| 415 | 414 | <th scope="row"><label for="first_name"><?php _e('First Name') ?> </label></th> |
| 416 | 415 | <td><input name="first_name" type="text" id="first_name" value="<?php echo esc_attr($new_user_firstname); ?>" /></td> |
| 417 | 416 | </tr> |
| 418 | | <tr class="form-field"> |
| 419 | | <th scope="row"><label for="other_name"><?php _e('Additional Names') ?> </label></th> |
| 420 | | <td><input name="other_name" type="text" id="other_name" value="<?php echo esc_attr($new_user_othername); ?>" /></td> |
| 421 | | </tr> |
| 422 | 417 | <tr class="form-field"> |
| 423 | 418 | <th scope="row"><label for="last_name"><?php _e('Last Name') ?> </label></th> |
| 424 | 419 | <td><input name="last_name" type="text" id="last_name" value="<?php echo esc_attr($new_user_lastname); ?>" /></td> |
diff --git a/tests/qunit/fixtures/wp-api-generated.js b/tests/qunit/fixtures/wp-api-generated.js
index 7cfafc6551..69e2375563 100644
|
a
|
b
|
mockedApiResponse.Schema = { |
| 2539 | 2539 | "description": "First name for the user.", |
| 2540 | 2540 | "type": "string" |
| 2541 | 2541 | }, |
| 2542 | | "other_name": { |
| 2543 | | "required": false, |
| 2544 | | "description": "Additional names for the user.", |
| 2545 | | "type": "string" |
| 2546 | | }, |
| 2547 | 2542 | "last_name": { |
| 2548 | 2543 | "required": false, |
| 2549 | 2544 | "description": "Last name for the user.", |
| … |
… |
mockedApiResponse.Schema = { |
| 2671 | 2666 | "description": "First name for the user.", |
| 2672 | 2667 | "type": "string" |
| 2673 | 2668 | }, |
| 2674 | | "other_name": { |
| 2675 | | "required": false, |
| 2676 | | "description": "Additional names for the user.", |
| 2677 | | "type": "string" |
| 2678 | | }, |
| 2679 | 2669 | "last_name": { |
| 2680 | 2670 | "required": false, |
| 2681 | 2671 | "description": "Last name for the user.", |
| … |
… |
mockedApiResponse.Schema = { |
| 2813 | 2803 | "description": "First name for the user.", |
| 2814 | 2804 | "type": "string" |
| 2815 | 2805 | }, |
| 2816 | | "other_name": { |
| 2817 | | "required": false, |
| 2818 | | "description": "Additional names for the user.", |
| 2819 | | "type": "string" |
| 2820 | | }, |
| 2821 | 2806 | "last_name": { |
| 2822 | 2807 | "required": false, |
| 2823 | 2808 | "description": "Last name for the user.", |