- <input name="admin_password" type="password" id="pass1" size="25" value="" />
- <p><input name="admin_password2" type="password" id="pass2" size="25" value="" /></p>
- <div id="pass-strength-result"><?php _e('Strength indicator'); ?></div>
- <p><?php _e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ & ).'); ?></p>
+ <div class="">
+ <?php $initial_password = isset( $_POST['admin_password'] ) ? stripslashes( $_POST['admin_password'] ) : wp_generate_password( 18 ); ?>
+ <input type="password" name="admin_password" id="pass1" class="regular-text" autocomplete="off" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
+ <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-start-masked="<?php echo (int) isset( $_POST['admin_password'] ); ?>" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
+ <span class="dashicons dashicons-hidden"></span>
+ <span class="text"><?php _e( 'Hide' ); ?></span>
+ </button>
+ <div id="pass-strength-result" aria-live="polite"></div>
+ </div>
+ <p><span class="description important hide-if-no-js">
+ <strong><?php _e( 'Important:' ); ?></strong>
+ <?php /* translators: The non-breaking space prevents 1Password from thinking the text "log in" should trigger a password save prompt. */ ?>
+ <?php _e( 'You will need this password to log in. Please store it in a secure location.' ); ?></span></p>
+ </td>
+ </tr>
+ <tr class="form-field form-required user-pass2-wrap hide-if-js">
+ <th scope="row">
+ <label for="pass2"><?php _e( 'Repeat Password' ); ?>
+ <span class="description"><?php _e( '(required)' ); ?></span>
+ </label>
+ </th>
+ <td>
+ <input name="admin_password2" type="password" id="pass2" autocomplete="off" />
+ </td>
+ </tr>
+ <tr class="pw-weak">
+ <th scope="row"><?php _e( 'Confirm Password' ); ?></th>
+ <td>
+ <label>
+ <input type="checkbox" name="pw_weak" class="pw-checkbox" />
+ <?php _e( 'Confirm use of weak password' ); ?>
+ </label>