Change Password Strength Indicator names?

Is it possible to change the labels for “Weak, Medium, Strong” etc… in the Password Indicator that’s used in the user profile? I’ve been asked to change the word “Weak” to “OK” since this level of passwords is acceptable for our subscribers. Is there a filter I can hook into?

5 Answers
5

Adding this to my function.php file in the child theme folder did it for me:

add_action( 'wp_enqueue_scripts', 'my_strength_meter_localize_script' );
function my_strength_meter_localize_script() {
    wp_localize_script( 'password-strength-meter', 'pwsL10n', array(
        'empty'    => __( 'But... it\'s empty!', 'theme-domain' ),
        'short'    => __( 'Too short!', 'theme-domain' ),
        'bad'      => __( 'Not even close!', 'theme-domain' ),
        'good'     => __( 'You are getting closer...', 'theme-domain' ),
        'strong'   => __( 'Now, that\'s a password!', 'theme-domain' ),
        'mismatch' => __( 'They are completely different, come on!', 'theme-domain' )
    ) );
}

Source

Leave a Comment