• Anonymous


    Hi Graphene people!

    My question is regarding the WordPress password strength checker.

    I found a way to edit it, but I can’t figure out how to hide certain elements that I’d like to hide.

    Here’s how I’m editing it:

    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' )
    ) );

    I got that code from this site. It works, however, I want to make it so it offers NO advice on the password length. So with my warped sense of logic, I thought I’d just remove the text between the single quotes for ‘short’, ‘bad’, ‘good’, and ‘strong’. This does what I want, but it leaves a “residue” from the advice text. It’s leaving an empty, red box. Not a horrible thing, but I’d like to get rid of those red boxes completely.

    I’ve tried using CSS to display: none, but I can’t figure out how to identify the elements in my child theme. This is, perhaps, an issue I should ask to the WordPress community, but I just wanted to check with you guys first to see if you’ve dealt with this, and possibly have the answer.

    Thanks, and I apologize if I’m asking the wrong community.


    Kenneth John Odle


    I believe it’s because you left the single quote marks in.


    'empty' => __( ),



    I tried that, but it gave me a parse error.

    I also tried removing more parts, like the quotation marks, but then the red box still appears. Then I removed everything except for


    but the red box still remains.

    Is that red box a WordPress thing or a Graphene thing?



    Kenneth John Odle


    The red box is a WordPress thing. AFAIK, Graphene doesn’t do anything on the admin side except for editor styles.

    You might want to try leaving the array out altogether. (Just a shot in the dark; if that doesn’t work, I’ll play around with it over the weekend.)

    I honestly had no idea why you wanted to do this, but then I thought about how many times I’ve been annoyed by that feature of WordPress. This idea is rather brilliant.



    I tried leaving the entire array blank, but the red box still appears. But even if that did work, it would leave me without a “Your password can’t be empty!” and without a “Your passwords don’t match!”

    Thank you for explaining that Graphene is not the culprit of the red box, because that does help me narrow it down.

    My main reason for wanting to modify this red box that it’s just very generic looking, and of course, it makes little sense to warn people that their password is too easy, since we won’t be forcing them to adhere to some special password format. And, I assume that many of us have our registration forms looking like each others. (A WordPress admin would say “Hmm, looks like a WP site!”) 🙂

    Let me know if you make any progress with it, and/or I’ll let you know if I find any solutions.

    Also, thank you for your time!

Viewing 5 posts - 1 through 5 (of 5 total)

  • You must be logged in to reply to this topic.