Docs: Improve the `sanitize_email` filter.

- Remove duplicate parameter names.
- Fix the wrong value being passed in the second parameter.
- Correct the type of the `$message` parameter.

Props ChriCo.
Fixes #45595.


Built from https://develop.svn.wordpress.org/trunk@44620


git-svn-id: http://core.svn.wordpress.org/trunk@44451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2019-01-16 06:16:49 +00:00
parent 8c702e04f3
commit 077af6e47d
2 changed files with 6 additions and 6 deletions

View File

@ -3456,9 +3456,9 @@ function sanitize_email( $email ) {
*
* @since 2.8.0
*
* @param string $email The sanitized email address.
* @param string $email The email address, as provided to sanitize_email().
* @param string $message A message to pass to the user.
* @param string $sanitized_email The sanitized email address.
* @param string $email The email address, as provided to sanitize_email().
* @param string|null $message A message to pass to the user. null if email is sanitized.
*/
return apply_filters( 'sanitize_email', '', $email, 'email_too_short' );
}
@ -3531,11 +3531,11 @@ function sanitize_email( $email ) {
$domain = join( '.', $new_subs );
// Put the email back together
$email = $local . '@' . $domain;
$sanitized_email = $local . '@' . $domain;
// Congratulations your email made it!
/** This filter is documented in wp-includes/formatting.php */
return apply_filters( 'sanitize_email', $email, $email, null );
return apply_filters( 'sanitize_email', $sanitized_email, $email, null );
}
/**

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.1-beta1-44619';
$wp_version = '5.1-beta1-44620';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.