Skip to content

Instantly share code, notes, and snippets.

@SiR-DanieL
Last active March 7, 2016 11:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SiR-DanieL/d964e53986254effb9ff to your computer and use it in GitHub Desktop.
Save SiR-DanieL/d964e53986254effb9ff to your computer and use it in GitHub Desktop.
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' )
) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment