Make WordPress Core

Ticket #8647: wp_generate_password.diff

File wp_generate_password.diff, 688 bytes (added by sivel, 16 years ago)

Modified to include $extra_special_characters argument with additional special characters

  • wp-includes/pluggable.php

     
    13961396 *
    13971397 * @return string The random password
    13981398 **/
    1399 function wp_generate_password($length = 12, $special_chars = true) {
     1399function wp_generate_password($length = 12, $special_chars = true, $extra_special_chars = false) {
    14001400        $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
    14011401        if ( $special_chars )
    14021402                $chars .= '!@#$%^&*()';
     1403        if ( $extra_special_chars )
     1404                $chars .= '-_ []{}<>~`+=,.;:/?|';
    14031405
    14041406        $password = '';
    14051407        for ( $i = 0; $i < $length; $i++ )