Use Dropbox's zxcvbn library for our password meter.

The library was added in [25156].

props duck_.
see #21737.


git-svn-id: https://develop.svn.wordpress.org/trunk@25157 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2013-08-28 16:08:19 +00:00
parent b9f05488aa
commit 444d333872
5 changed files with 30 additions and 37 deletions

View File

@@ -309,7 +309,12 @@ function wp_default_scripts( &$scripts ) {
'pluginPath' => includes_url( 'js/mediaelement/', 'relative' ),
) );
$scripts->add( 'password-strength-meter', "/wp-admin/js/password-strength-meter$suffix.js", array('jquery'), false, 1 );
$scripts->add( 'zxcvbn-async', "/wp-includes/js/zxcvbn-async$suffix.js", array(), '1.0' );
did_action( 'init' ) && $scripts->localize( 'zxcvbn-async', '_zxcvbnSettings', array(
'src' => includes_url( '/js/zxcvbn.min.js' ),
) );
$scripts->add( 'password-strength-meter', "/wp-admin/js/password-strength-meter$suffix.js", array( 'jquery', 'zxcvbn-async' ), false, 1 );
did_action( 'init' ) && $scripts->localize( 'password-strength-meter', 'pwsL10n', array(
'empty' => __('Strength indicator'),
'short' => __('Very weak'),