Move password hint text to a function. Add 'password_hint' filter.
props convissor. fixes #21243. git-svn-id: https://develop.svn.wordpress.org/trunk@29962 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ac90567ef1
commit
5ab446aab7
@ -133,7 +133,7 @@ function display_setup_form( $error = null ) {
|
|||||||
<input name="admin_password" type="password" id="pass1" size="25" value="" />
|
<input name="admin_password" type="password" id="pass1" size="25" value="" />
|
||||||
<p><input name="admin_password2" type="password" id="pass2" size="25" value="" /></p>
|
<p><input name="admin_password2" type="password" id="pass2" size="25" value="" /></p>
|
||||||
<div id="pass-strength-result"><?php _e('Strength indicator'); ?></div>
|
<div id="pass-strength-result"><?php _e('Strength indicator'); ?></div>
|
||||||
<p><?php _e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers, and symbols like ! " ? $ % ^ & ).'); ?></p>
|
<p><?php echo _wp_password_hint(); ?></p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
@ -470,7 +470,7 @@ if ( $show_password_fields ) :
|
|||||||
<p class="description"><?php _e( 'Type your new password again.' ); ?></p>
|
<p class="description"><?php _e( 'Type your new password again.' ); ?></p>
|
||||||
<br />
|
<br />
|
||||||
<div id="pass-strength-result"><?php _e( 'Strength indicator' ); ?></div>
|
<div id="pass-strength-result"><?php _e( 'Strength indicator' ); ?></div>
|
||||||
<p class="description indicator-hint"><?php _e( 'Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers, and symbols like ! " ? $ % ^ & ).' ); ?></p>
|
<p class="description indicator-hint"><?php echo _wp_password_hint(); ?></p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
@ -398,7 +398,7 @@ if ( apply_filters( 'show_password_fields', true ) ) : ?>
|
|||||||
<input name="pass2" type="password" id="pass2" autocomplete="off" />
|
<input name="pass2" type="password" id="pass2" autocomplete="off" />
|
||||||
<br />
|
<br />
|
||||||
<div id="pass-strength-result"><?php _e('Strength indicator'); ?></div>
|
<div id="pass-strength-result"><?php _e('Strength indicator'); ?></div>
|
||||||
<p class="description indicator-hint"><?php _e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers, and symbols like ! " ? $ % ^ & ).'); ?></p>
|
<p class="description indicator-hint"><?php echo _wp_password_hint(); ?></p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -2070,6 +2070,27 @@ function _wp_get_user_contactmethods( $user = null ) {
|
|||||||
return wp_get_user_contact_methods( $user );
|
return wp_get_user_contact_methods( $user );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the text suggesting how to create strong passwords.
|
||||||
|
*
|
||||||
|
* @since 4.1.0
|
||||||
|
* @access private
|
||||||
|
*
|
||||||
|
* @return string The password hint text.
|
||||||
|
*/
|
||||||
|
function _wp_password_hint() {
|
||||||
|
$hint = __( 'Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers, and symbols like ! " ? $ % ^ & ).' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the text describing the site's password complexity policy.
|
||||||
|
*
|
||||||
|
* @since 4.1.0
|
||||||
|
*
|
||||||
|
* @param string $hint The password hint text.
|
||||||
|
*/
|
||||||
|
return apply_filters( 'password_hint', $hint );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves a user row based on password reset key and login
|
* Retrieves a user row based on password reset key and login
|
||||||
*
|
*
|
||||||
|
@ -626,8 +626,7 @@ case 'rp' :
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div id="pass-strength-result" class="hide-if-no-js"><?php _e('Strength indicator'); ?></div>
|
<div id="pass-strength-result" class="hide-if-no-js"><?php _e('Strength indicator'); ?></div>
|
||||||
<p class="description indicator-hint"><?php _e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers, and symbols like ! " ? $ % ^ & ).'); ?></p>
|
<p class="description indicator-hint"><?php echo _wp_password_hint(); ?></p>
|
||||||
|
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
Loading…
Reference in New Issue
Block a user