Make WordPress Core


Ignore:
Timestamp:
07/29/2015 07:21:26 PM (9 years ago)
Author:
markjaquith
Message:

Persist (and mask) the password on the install screen if the install does not proceed due to errors.

If you forget or enter an invalid username/e-mail, the password choosing shouldn't start over.

fixes #33162

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/install.php

    r33474 r33495  
    138138            <td>
    139139                <div class="">
    140                     <?php $initial_password = wp_generate_password( 18 ); ?>
     140                    <?php $initial_password = isset( $_POST['admin_password'] ) ? stripslashes( $_POST['admin_password'] ) : wp_generate_password( 18 ); ?>
    141141                    <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" />
    142                     <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
     142                    <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' ); ?>">
    143143                        <span class="dashicons dashicons-hidden"></span>
    144144                        <span class="text"><?php _e( 'Hide' ); ?></span>
Note: See TracChangeset for help on using the changeset viewer.