From 5ab446aab72caef26ce10b6618039aa9e6fcd87c Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 18 Oct 2014 20:20:56 +0000 Subject: [PATCH] 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 --- src/wp-admin/install.php | 2 +- src/wp-admin/user-edit.php | 2 +- src/wp-admin/user-new.php | 2 +- src/wp-includes/user.php | 21 +++++++++++++++++++++ src/wp-login.php | 3 +-- 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/install.php b/src/wp-admin/install.php index 72916e4be8..f7a1037444 100644 --- a/src/wp-admin/install.php +++ b/src/wp-admin/install.php @@ -133,7 +133,7 @@ function display_setup_form( $error = null ) {

-

+

diff --git a/src/wp-admin/user-edit.php b/src/wp-admin/user-edit.php index 589e74cee8..e713bf8800 100644 --- a/src/wp-admin/user-edit.php +++ b/src/wp-admin/user-edit.php @@ -470,7 +470,7 @@ if ( $show_password_fields ) :


-

+

diff --git a/src/wp-admin/user-new.php b/src/wp-admin/user-new.php index eb18d136f4..dffbf354fd 100644 --- a/src/wp-admin/user-new.php +++ b/src/wp-admin/user-new.php @@ -398,7 +398,7 @@ if ( apply_filters( 'show_password_fields', true ) ) : ?>
-

+

diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index ed3f4af6ea..968baeba6d 100644 --- a/src/wp-includes/user.php +++ b/src/wp-includes/user.php @@ -2070,6 +2070,27 @@ function _wp_get_user_contactmethods( $user = null ) { 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 * diff --git a/src/wp-login.php b/src/wp-login.php index b9dbd61e52..426c6d403d 100644 --- a/src/wp-login.php +++ b/src/wp-login.php @@ -626,8 +626,7 @@ case 'rp' :

-

- +