Skip to content

Commit

Permalink
Users: Pass $length, $special_chars, and $extra_special_chars p…
Browse files Browse the repository at this point in the history
…arameters to the `random_password` filter in `wp_generate_password()`.

Props roytanck.
Fixes #47092.

git-svn-id: https://develop.svn.wordpress.org/trunk@45568 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Jun 27, 2019
1 parent 115c496 commit 4512e94
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/wp-includes/pluggable.php
Original file line number Diff line number Diff line change
Expand Up @@ -2384,10 +2384,14 @@ function wp_generate_password( $length = 12, $special_chars = true, $extra_speci
* Filters the randomly-generated password.
*
* @since 3.0.0
* @since 5.3.0 Added the `$length`, `$special_chars`, and `$extra_special_chars` parameters.
*
* @param string $password The generated password.
* @param string $password The generated password.
* @param int $length The length of password to generate.
* @param bool $special_chars Whether to include standard special characters.
* @param bool $extra_special_chars Whether to include other special characters.
*/
return apply_filters( 'random_password', $password );
return apply_filters( 'random_password', $password, $length, $special_chars, $extra_special_chars );
}
endif;

Expand Down

0 comments on commit 4512e94

Please sign in to comment.