Make WordPress Core

Changeset 29962


Ignore:
Timestamp:
10/18/2014 08:20:56 PM (10 years ago)
Author:
SergeyBiryukov
Message:

Move password hint text to a function. Add 'password_hint' filter.

props convissor.
fixes #21243.

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/install.php

    r29705 r29962  
    134134                <p><input name="admin_password2" type="password" id="pass2" size="25" value="" /></p>
    135135                <div id="pass-strength-result"><?php _e('Strength indicator'); ?></div>
    136                 <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 ! " ? $ % ^ &amp; ).'); ?></p>
     136                <p><?php echo _wp_password_hint(); ?></p>
    137137            </td>
    138138        </tr>
  • trunk/src/wp-admin/user-edit.php

    r29820 r29962  
    471471    <br />
    472472    <div id="pass-strength-result"><?php _e( 'Strength indicator' ); ?></div>
    473     <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 ! " ? $ % ^ &amp; ).' ); ?></p>
     473    <p class="description indicator-hint"><?php echo _wp_password_hint(); ?></p>
    474474    </td>
    475475</tr>
  • trunk/src/wp-admin/user-new.php

    r29880 r29962  
    399399        <br />
    400400        <div id="pass-strength-result"><?php _e('Strength indicator'); ?></div>
    401         <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 ! " ? $ % ^ &amp; ).'); ?></p>
     401        <p class="description indicator-hint"><?php echo _wp_password_hint(); ?></p>
    402402        </td>
    403403    </tr>
  • trunk/src/wp-includes/user.php

    r29934 r29962  
    20722072
    20732073/**
     2074 * Gets the text suggesting how to create strong passwords.
     2075 *
     2076 * @since 4.1.0
     2077 * @access private
     2078 *
     2079 * @return string The password hint text.
     2080 */
     2081function _wp_password_hint() {
     2082    $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 ! " ? $ % ^ &amp; ).' );
     2083
     2084    /**
     2085     * Filter the text describing the site's password complexity policy.
     2086     *
     2087     * @since 4.1.0
     2088     *
     2089     * @param string $hint The password hint text.
     2090     */
     2091    return apply_filters( 'password_hint', $hint );
     2092}
     2093
     2094/**
    20742095 * Retrieves a user row based on password reset key and login
    20752096 *
  • trunk/src/wp-login.php

    r29644 r29962  
    627627
    628628    <div id="pass-strength-result" class="hide-if-no-js"><?php _e('Strength indicator'); ?></div>
    629     <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 ! " ? $ % ^ &amp; ).'); ?></p>
    630 
     629    <p class="description indicator-hint"><?php echo _wp_password_hint(); ?></p>
    631630    <br class="clear" />
    632631
Note: See TracChangeset for help on using the changeset viewer.