Run the old WPMU random_password filter in wp_generate_password(). Fixes #11746 props uglyrobot.

git-svn-id: http://svn.automattic.com/wordpress/trunk@12653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2010-01-07 20:49:04 +00:00
parent 0d31c12db6
commit 904b89dc9f
1 changed files with 5 additions and 2 deletions

View File

@ -1470,9 +1470,12 @@ function wp_generate_password($length = 12, $special_chars = true) {
$chars .= '!@#$%^&*()';
$password = '';
for ( $i = 0; $i < $length; $i++ )
for ( $i = 0; $i < $length; $i++ ) {
$password .= substr($chars, wp_rand(0, strlen($chars) - 1), 1);
return $password;
}
// random_password filter was previously in random_password function which was deprecated
return apply_filters('random_password', $password);
}
endif;