diff --git wp-admin/includes/user.php wp-admin/includes/user.php
index 6bf826b..31acb14 100644
|
|
|
function edit_user( $user_id = 0 ) { |
| 90 | 90 | $user->$method = sanitize_text_field( $_POST[$method] ); |
| 91 | 91 | } |
| 92 | 92 | |
| | 93 | if ( isset( $_POST['locale'] ) ) { |
| | 94 | $locale = sanitize_text_field( $_POST['locale'] ); |
| | 95 | if ( ! in_array( $locale, get_available_languages(), true ) ) { |
| | 96 | $locale = ''; |
| | 97 | } |
| | 98 | |
| | 99 | $user->locale = ( '' === $locale ) ? 'en_US' : $locale; |
| | 100 | } |
| | 101 | |
| 93 | 102 | if ( $update ) { |
| 94 | 103 | $user->rich_editing = isset( $_POST['rich_editing'] ) && 'false' == $_POST['rich_editing'] ? 'false' : 'true'; |
| 95 | 104 | $user->admin_color = isset( $_POST['admin_color'] ) ? sanitize_text_field( $_POST['admin_color'] ) : 'fresh'; |
| 96 | 105 | $user->show_admin_bar_front = isset( $_POST['admin_bar_front'] ) ? 'true' : 'false'; |
| 97 | | $user->locale = ''; |
| 98 | | |
| 99 | | if ( isset( $_POST['locale'] ) ) { |
| 100 | | $locale = sanitize_text_field( $_POST['locale'] ); |
| 101 | | if ( ! in_array( $locale, get_available_languages(), true ) ) { |
| 102 | | $locale = ''; |
| 103 | | } |
| 104 | | |
| 105 | | $user->locale = ( '' === $locale ) ? 'en_US' : $locale; |
| 106 | | } |
| 107 | 106 | } |
| 108 | 107 | |
| 109 | 108 | $user->comment_shortcuts = isset( $_POST['comment_shortcuts'] ) && 'true' == $_POST['comment_shortcuts'] ? 'true' : ''; |
diff --git wp-admin/user-new.php wp-admin/user-new.php
index e039d71..5456947 100644
|
|
|
$new_user_ignore_pass = $creating && isset( $_POST['noconfirmation'] ) ? wp_unsl |
| 422 | 422 | <th scope="row"><label for="url"><?php _e('Website') ?></label></th> |
| 423 | 423 | <td><input name="url" type="url" id="url" class="code" value="<?php echo esc_attr( $new_user_uri ); ?>" /></td> |
| 424 | 424 | </tr> |
| | 425 | <?php |
| | 426 | $languages = get_available_languages(); |
| | 427 | if ( $languages ) : ?> |
| | 428 | <tr class="form-field"> |
| | 429 | <th scope="row"> |
| | 430 | <?php /* translators: The user language selection field label */ ?> |
| | 431 | <label for="locale"><?php _e( 'Language' ); ?></label> |
| | 432 | </th> |
| | 433 | <td> |
| | 434 | <?php |
| | 435 | $locale = get_locale(); |
| | 436 | |
| | 437 | if ( 'en_US' === $locale ) { |
| | 438 | $locale = false; |
| | 439 | } |
| | 440 | |
| | 441 | wp_dropdown_languages( array( |
| | 442 | 'name' => 'locale', |
| | 443 | 'id' => 'locale', |
| | 444 | 'selected' => $locale, |
| | 445 | 'languages' => $languages, |
| | 446 | 'show_available_translations' => false |
| | 447 | ) ); |
| | 448 | ?> |
| | 449 | </td> |
| | 450 | </tr> |
| | 451 | <?php |
| | 452 | endif; |
| | 453 | ?> |
| 425 | 454 | <tr class="form-field form-required user-pass1-wrap"> |
| 426 | 455 | <th scope="row"> |
| 427 | 456 | <label for="pass1"> |