Skip to content

Commit 9a1566f

Browse files
author
pento
committed
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
1 parent 922e03c commit 9a1566f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

wp-includes/formatting.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3456,9 +3456,9 @@ function sanitize_email( $email ) {
34563456
*
34573457
* @since 2.8.0
34583458
*
3459-
* @param string $email The sanitized email address.
3460-
* @param string $email The email address, as provided to sanitize_email().
3461-
* @param string $message A message to pass to the user.
3459+
* @param string $sanitized_email The sanitized email address.
3460+
* @param string $email The email address, as provided to sanitize_email().
3461+
* @param string|null $message A message to pass to the user. null if email is sanitized.
34623462
*/
34633463
return apply_filters( 'sanitize_email', '', $email, 'email_too_short' );
34643464
}
@@ -3531,11 +3531,11 @@ function sanitize_email( $email ) {
35313531
$domain = join( '.', $new_subs );
35323532

35333533
// Put the email back together
3534-
$email = $local . '@' . $domain;
3534+
$sanitized_email = $local . '@' . $domain;
35353535

35363536
// Congratulations your email made it!
35373537
/** This filter is documented in wp-includes/formatting.php */
3538-
return apply_filters( 'sanitize_email', $email, $email, null );
3538+
return apply_filters( 'sanitize_email', $sanitized_email, $email, null );
35393539
}
35403540

35413541
/**

wp-includes/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* @global string $wp_version
1515
*/
16-
$wp_version = '5.1-beta1-44619';
16+
$wp_version = '5.1-beta1-44620';
1717

1818
/**
1919
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 commit comments

Comments
 (0)