Changeset 33495
- Timestamp:
- 07/29/2015 07:21:26 PM (10 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/install.php
r33474 r33495 138 138 <td> 139 139 <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 ); ?> 141 141 <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' ); ?>"> 143 143 <span class="dashicons dashicons-hidden"></span> 144 144 <span class="text"><?php _e( 'Hide' ); ?></span> -
trunk/src/wp-admin/js/user-profile.js
r33475 r33495 13 13 $weakCheckbox, 14 14 15 $toggleButton, 15 16 $submitButtons, 16 17 $submitButton, … … 23 24 $pass1.val( $pass1.data( 'pw' ) ); 24 25 $pass1.trigger( 'pwupdate' ); 25 $pass1Wrap.addClass( 'show-password' ); 26 if ( 1 !== parseInt( $toggleButton.data( 'start-masked' ), 10 ) ) { 27 $pass1Wrap.addClass( 'show-password' ); 28 } else { 29 $toggleButton.trigger( 'click' ); 30 } 26 31 } 27 32 } … … 83 88 84 89 function bindToggleButton() { 85 vartoggleButton = $pass1Row.find('.wp-hide-pw');86 toggleButton.show().on( 'click', function () {87 if ( 1 === parseInt( toggleButton.data( 'toggle' ), 10 ) ) {90 $toggleButton = $pass1Row.find('.wp-hide-pw'); 91 $toggleButton.show().on( 'click', function () { 92 if ( 1 === parseInt( $toggleButton.data( 'toggle' ), 10 ) ) { 88 93 $pass1Wrap.addClass( 'show-password' ); 89 toggleButton94 $toggleButton 90 95 .data( 'toggle', 0 ) 91 96 .attr({ … … 106 111 } else { 107 112 $pass1Wrap.removeClass( 'show-password' ); 108 toggleButton113 $toggleButton 109 114 .data( 'toggle', 1 ) 110 115 .attr({
Note: See TracChangeset
for help on using the changeset viewer.