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. git-svn-id: https://develop.svn.wordpress.org/trunk@44620 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
989425c5d7
commit
fdd285c433
|
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue