is_email filter-hookWP 2.8.0

Filters whether an email address is valid.

This filter is evaluated under several different contexts, such as 'email_too_short', 'email_no_at', 'local_invalid_chars', 'domain_period_sequence', 'domain_period_limits', 'domain_no_periods', 'sub_hyphen_limits', 'sub_invalid_chars', or no specific context.

Usage

add_filter( 'is_email', 'wp_kama_is_email_filter', 10, 3 );

/**
 * Function for `is_email` filter-hook.
 * 
 * @param string|false $is_email The email address if successfully passed the is_email() checks, false otherwise.
 * @param string       $email    The email address being checked.
 * @param string       $context  Context under which the email was tested.
 *
 * @return string|false
 */
function wp_kama_is_email_filter( $is_email, $email, $context ){

	// filter...
	return $is_email;
}
$is_email(string|false)
The email address if successfully passed the is_email() checks, false otherwise.
$email(string)
The email address being checked.
$context(string)
Context under which the email was tested.

Changelog

Since 2.8.0 Introduced.

Where the hook is called

is_email()
is_email
wp-includes/formatting.php 3479
return apply_filters( 'is_email', false, $email, 'email_too_short' );
wp-includes/formatting.php 3485
return apply_filters( 'is_email', false, $email, 'email_no_at' );
wp-includes/formatting.php 3495
return apply_filters( 'is_email', false, $email, 'local_invalid_chars' );
wp-includes/formatting.php 3502
return apply_filters( 'is_email', false, $email, 'domain_period_sequence' );
wp-includes/formatting.php 3508
return apply_filters( 'is_email', false, $email, 'domain_period_limits' );
wp-includes/formatting.php 3517
return apply_filters( 'is_email', false, $email, 'domain_no_periods' );
wp-includes/formatting.php 3525
return apply_filters( 'is_email', false, $email, 'sub_hyphen_limits' );
wp-includes/formatting.php 3531
return apply_filters( 'is_email', false, $email, 'sub_invalid_chars' );
wp-includes/formatting.php 3537
return apply_filters( 'is_email', $email, $email, null );

Where the hook is used in WordPress

Usage not found.