mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 20:24:26 +00:00
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:
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user