golden hour
/var/www/html/wp-content/plugins/buddypress/bp-templates/bp-legacy/js
⬆️ Go Up
Upload
File/Folder
Size
Actions
buddypress.js
60.54 KB
Del
OK
buddypress.min.js
33.2 KB
Del
OK
password-verify.js
1.57 KB
Del
OK
password-verify.min.js
939 B
Del
OK
Edit: password-verify.js
/* jshint undef: false */ /* @since 1.7.0 */ /* @version 8.0.0 */ /* Password Verify */ ( function( $ ){ function check_pass_strength() { var pass1 = $( '.password-entry' ).val(), pass2 = $( '.password-entry-confirm' ).val(), strength; // Reset classes and result text $( '#pass-strength-result' ).removeClass( 'short bad good strong' ); if ( ! pass1 ) { $( '#pass-strength-result' ).html( pwsL10n.empty ); return; } // wp.passwordStrength.userInputBlacklist() has been deprecated in WP 5.5.0. if ( 'function' === typeof wp.passwordStrength.userInputDisallowedList ) { strength = wp.passwordStrength.meter( pass1, wp.passwordStrength.userInputDisallowedList(), pass2 ); } else { strength = wp.passwordStrength.meter( pass1, wp.passwordStrength.userInputBlacklist(), pass2 ); } switch ( strength ) { case 2: $( '#pass-strength-result' ).addClass( 'bad' ).html( pwsL10n.bad ); break; case 3: $( '#pass-strength-result' ).addClass( 'good' ).html( pwsL10n.good ); break; case 4: $( '#pass-strength-result' ).addClass( 'strong' ).html( pwsL10n.strong ); break; case 5: $( '#pass-strength-result' ).addClass( 'short' ).html( pwsL10n.mismatch ); break; default: $( '#pass-strength-result' ).addClass( 'short' ).html( pwsL10n['short'] ); break; } } // Bind check_pass_strength to keyup events in the password fields $( function() { $( '.password-entry' ).val( '' ).on( 'keyup', check_pass_strength ); $( '.password-entry-confirm' ).val( '' ).on( 'keyup', check_pass_strength ); }); } )( jQuery );
Save