WordPress.org

Make WordPress Core

Ticket #21243: wp_password_hint.diff

File wp_password_hint.diff, 3.8 KB (added by convissor, 6 years ago)
  • wp-admin/install.php

    diff --git wp-admin/install.php wp-admin/install.php
    index e39d1f4..de4ce09 100644
    function display_setup_form( $error = null ) { 
    120120                                <input name="admin_password" type="password" id="pass1" size="25" value="" />
    121121                                <p><input name="admin_password2" type="password" id="pass2" size="25" value="" /></p>
    122122                                <div id="pass-strength-result"><?php _e('Strength indicator'); ?></div>
    123                                 <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>
     123                                <p><?php echo wp_password_hint(); ?></p>
    124124                        </td>
    125125                </tr>
    126126                <?php endif; ?>
  • wp-admin/user-edit.php

    diff --git wp-admin/user-edit.php wp-admin/user-edit.php
    index 8db92cd..9daae75 100644
    if ( $show_password_fields ) : 
    379379        <td><input type="password" name="pass1" id="pass1" size="16" value="" autocomplete="off" /> <span class="description"><?php _e("If you would like to change the password type a new one. Otherwise leave this blank."); ?></span><br />
    380380                <input type="password" name="pass2" id="pass2" size="16" value="" autocomplete="off" /> <span class="description"><?php _e("Type your new password again."); ?></span><br />
    381381                <div id="pass-strength-result"><?php _e('Strength indicator'); ?></div>
    382                 <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>
     382                <p class="description indicator-hint"><?php echo wp_password_hint(); ?></p>
    383383        </td>
    384384</tr>
    385385<?php endif; ?>
  • wp-admin/user-new.php

    diff --git wp-admin/user-new.php wp-admin/user-new.php
    index 3119eb5..75d948f 100644
    foreach ( array( 'user_login' => 'login', 'first_name' => 'firstname', 'last_nam 
    342342                <input name="pass2" type="password" id="pass2" autocomplete="off" />
    343343                <br />
    344344                <div id="pass-strength-result"><?php _e('Strength indicator'); ?></div>
    345                 <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>
     345                <p class="description indicator-hint"><?php echo wp_password_hint(); ?></p>
    346346                </td>
    347347        </tr>
    348348        <tr>
  • wp-includes/user.php

    diff --git wp-includes/user.php wp-includes/user.php
    index adf5ba0..474f283 100644
    function count_users($strategy = 'time') { 
    904904        return $result;
    905905}
    906906
     907/**
     908 * Gets the text suggesting how to create good passwords
     909 *
     910 * @since 2.5.0
     911 * @return string  the password hint text
     912 */
     913function wp_password_hint() {
     914        $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; ).');
     915
     916        return apply_filters( 'password_hint', $hint );
     917}
     918
    907919//
    908920// Private helper functions
    909921//
  • wp-login.php

    diff --git wp-login.php wp-login.php
    index 87a0a66..3de5521 100644
    case 'rp' : 
    489489        </p>
    490490
    491491        <div id="pass-strength-result" class="hide-if-no-js"><?php _e('Strength indicator'); ?></div>
    492         <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>
     492        <p class="description indicator-hint"><?php echo wp_password_hint(); ?></p>
    493493
    494494        <br class="clear" />
    495495        <p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php esc_attr_e('Reset Password'); ?>" tabindex="100" /></p>