From 573daa129c1547e2a82e6a895f19fb5ed23c4ba8 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 27 Jun 2019 00:48:53 +0000 Subject: [PATCH] Users: Pass `$length`, `$special_chars`, and `$extra_special_chars` parameters to the `random_password` filter in `wp_generate_password()`. Props roytanck. Fixes #47092. Built from https://develop.svn.wordpress.org/trunk@45568 git-svn-id: http://core.svn.wordpress.org/trunk@45379 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable.php | 8 ++++++-- wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index dace6cd5b8..c5a248c6a5 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -2384,10 +2384,14 @@ if ( ! function_exists( 'wp_generate_password' ) ) : * 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; diff --git a/wp-includes/version.php b/wp-includes/version.php index c619447618..2537489529 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-45567'; +$wp_version = '5.3-alpha-45568'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.