On this page
apply_filters( 'sanitize_email', string $sanitized_email, string $email, string|null $message )
Filters a sanitized email address.
Description
This filter is evaluated under several contexts, including ’email_too_short’, ’email_no_at’, ‘local_invalid_chars’, ‘domain_period_sequence’, ‘domain_period_limits’, ‘domain_no_periods’, ‘domain_no_valid_subs’, or no context.
Parameters
$sanitized_emailstring-
The sanitized email address.
$emailstring-
The email address, as provided to sanitize_email() .
More Arguments from sanitize_email( ... $email )
Email address to filter. $messagestring|null-
A message to pass to the user. null if email is sanitized.
Source
File: wp-includes/formatting.php. View all references
return apply_filters( 'sanitize_email', '', $email, 'email_too_short' );
Related
Used By
| Used By | Description |
|---|---|
| sanitize_email() wp-includes/formatting.php | Strips out all characters that are not allowable in an email. |
Changelog
| Version | Description |
|---|---|
| 2.8.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/sanitize_email