WordPress.org

Make WordPress Core

Ticket #21243: 21243.5.diff

File 21243.5.diff, 3.8 KB (added by convissor, 7 years ago)

Add docblock for filter hook call. Fix @since on main function.

  • src/wp-includes/user.php

    function wp_get_user_contact_methods( $user = null 
    20552055}
    20562056
    20572057/**
     2058 * Gets the text suggesting how to create strong passwords.
     2059 *
     2060 * @since 4.1.0
     2061 * @access private
     2062 *
     2063 * @return string The password hint text.
     2064 */
     2065function _wp_password_hint() {
     2066        $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 ! " ? $ % ^ & ).' );
     2067
     2068        /**
     2069         * Filter the text describing the site's password complexity policy.
     2070         *
     2071         * @since 4.1.0
     2072         *
     2073         * @param string  $hint The site's password complexity policy.
     2074         */
     2075        return apply_filters( 'password_hint', $hint );
     2076}
     2077
     2078/**
    20582079 * The old private function for setting up user contact methods.
    20592080 *
    20602081 * @since 2.9.0
  • src/wp-admin/user-edit.php

    if ( $show_password_fields ) : 
    470470        <p class="description"><?php _e( 'Type your new password again.' ); ?></p>
    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>
    476476<?php endif; ?>
  • src/wp-admin/user-new.php

    if ( apply_filters( 'show_password_fields', true ) 
    397397                <input name="pass2" type="password" id="pass2" autocomplete="off" />
    398398                <br />
    399399                <div id="pass-strength-result"><?php _e('Strength indicator'); ?></div>
    400                 <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>
     400                <p class="description indicator-hint"><?php echo _wp_password_hint(); ?></p>
    401401                </td>
    402402        </tr>
    403403        <tr>
  • src/wp-admin/install.php

    function display_setup_form( $error = null ) { 
    133133                                <input name="admin_password" type="password" id="pass1" size="25" value="" />
    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>
    139139                <?php endif; ?>
  • src/wp-login.php

    case 'rp' : 
    626626        </p>
    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
    633632        <?php