Skip to content

Commit eb420ba

Browse files
committed
Remove redundant code
The block at lines 533–542 that triggered the "Generate Password" button click on page load is no longer needed. Passwords are already automatically filled via the bindPass1 function, which calls generatePassword() on initialization.
1 parent 17f7e95 commit eb420ba

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/js/_enqueues/admin/user-profile.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -529,16 +529,4 @@
529529
return __( 'The changes you made will be lost if you navigate away from this page.' );
530530
}
531531
});
532-
533-
/*
534-
* We need to generate a password as soon as the Reset Password page is loaded,
535-
* to avoid double clicking the button to retrieve the first generated password.
536-
* See ticket #39638.
537-
*/
538-
$( function() {
539-
if ( $( '.reset-pass-submit' ).length ) {
540-
$( '.reset-pass-submit button.wp-generate-pw' ).trigger( 'click' );
541-
}
542-
});
543-
544532
})(jQuery);

0 commit comments

Comments
 (0)