is_email
is_email
Appears in: wordpress-4.0, wordpress-4.4, wordpress-4.8, wordpress-4.9, wordpress-4.9.4, wordpress-4.9.5, wordpress-4.9.6, wordpress-4.9.7, wordpress-4.9.8, wordpress-5.0, wordpress-5.0.1, wordpress-5.0.2, wordpress-5.0.3, wordpress-5.1, wordpress-5.1.1, wordpress-5.2, wordpress-5.2.1, wordpress-5.2.2, wordpress-5.2.3, wordpress-5.2.4, wordpress-5.3, wordpress-5.3.1, wordpress-5.3.2, wordpress-5.4, wordpress-5.4.1, wordpress-5.4.2, wordpress-5.5, wordpress-5.5.1, wordpress-5.5.2, wordpress-5.5.3, wordpress-5.6, wordpress-5.6.1, wordpress-5.6.2, wordpress-5.7, wordpress-5.7.1, wordpress-5.7.2, wordpress-5.8, wordpress-5.8.1, wordpress-5.8.2, wordpress-5.8.3, wordpress-5.9, wordpress-5.9.1, wordpress-5.9.2, wordpress-5.9.3, wordpress-6.0, wordpress-6.0.1, wordpress-6.0.2, wordpress-6.0.3, wordpress-6.1, wordpress-6.1.1, wordpress-6.2, wordpress-6.2.1, wordpress-6.2.2, wordpress-6.3, wordpress-6.3.1, wordpress-6.3.2, wordpress-6.4, wordpress-6.4.1, wordpress-6.4.2, wordpress-6.4.3, wordpress-6.5, wordpress-6.5.2, wordpress-6.5.3, wordpress-6.5.4, wordpress-6.5.5, wordpress-6.6, wordpress-6.6.1, wordpress-6.6.2, wordpress-6.7, wordpress-6.7.1, wordpress-6.7.2
Hook Type: filter
Displaying hooks found in version: wordpress-6.7.2apply_filters('is_email') is found 9 times:
- /wp-includes/formatting.php line 354435403541354235433544354535463547354835493550
* @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
apply_filters(
'is_email'
, false,
$email
,
'email_too_short'
);
}
// Test for an @ character after the first position.
if
(
strpos
(
$email
,
'@'
, 1 ) === false ) {
/** This filter is documented in wp-includes/formatting.php */
return
apply_filters(
'is_email'
, false,
$email
,
'email_no_at'
);
- /wp-includes/formatting.php line 35503547354835493550355135523553355435553556
// Test for an @ character after the first position.
if
(
strpos
(
$email
,
'@'
, 1 ) === false ) {
/** This filter is documented in wp-includes/formatting.php */
return
apply_filters(
'is_email'
, false,
$email
,
'email_no_at'
);
}
// Split out the local and domain parts.
list(
$local
,
$domain
) =
explode
(
'@'
,
$email
, 2 );
/*
- /wp-includes/formatting.php line 356235583559356035613562356335643565356635673568
* Test
for
invalid characters.
*/
if
( ! preg_match(
'/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/'
,
$local
) ) {
/** This filter is documented in wp-includes/formatting.php */
return
apply_filters(
'is_email'
, false,
$email
,
'local_invalid_chars'
);
}
/*
* DOMAIN PART
* Test for sequences of periods.
*/
- /wp-includes/formatting.php line 357135673568356935703571357235733574357535763577
* Test
for
sequences of periods.
*/
if
( preg_match(
'/\.{2,}/'
,
$domain
) ) {
/** This filter is documented in wp-includes/formatting.php */
return
apply_filters(
'is_email'
, false,
$email
,
'domain_period_sequence'
);
}
// Test for leading and trailing periods and whitespace.
if
( trim(
$domain
,
" \t\n\r\0\x0B."
) !==
$domain
) {
/** This filter is documented in wp-includes/formatting.php */
return
apply_filters(
'is_email'
, false,
$email
,
'domain_period_limits'
);
- /wp-includes/formatting.php line 35773574357535763577357835793580358135823583
// Test for leading and trailing periods and whitespace.
if
( trim(
$domain
,
" \t\n\r\0\x0B."
) !==
$domain
) {
/** This filter is documented in wp-includes/formatting.php */
return
apply_filters(
'is_email'
, false,
$email
,
'domain_period_limits'
);
}
// Split the domain into subs.
$subs
=
explode
(
'.'
,
$domain
);
// Assume the domain will have at least two subs.
- /wp-includes/formatting.php line 35863583358435853586358735883589359035913592
// Assume the domain will have at least two subs.
if
( 2 >
count
(
$subs
) ) {
/** This filter is documented in wp-includes/formatting.php */
return
apply_filters(
'is_email'
, false,
$email
,
'domain_no_periods'
);
}
// Loop through each sub.
foreach
(
$subs
as
$sub
) {
// Test for leading and trailing hyphens and whitespace.
if
( trim(
$sub
,
" \t\n\r\0\x0B-"
) !==
$sub
) {
- /wp-includes/formatting.php line 359435903591359235933594359535963597359835993600
foreach
(
$subs
as
$sub
) {
// Test for leading and trailing hyphens and whitespace.
if
( trim(
$sub
,
" \t\n\r\0\x0B-"
) !==
$sub
) {
/** This filter is documented in wp-includes/formatting.php */
return
apply_filters(
'is_email'
, false,
$email
,
'sub_hyphen_limits'
);
}
// Test for invalid characters.
if
( ! preg_match(
'/^[a-z0-9-]+$/i'
,
$sub
) ) {
/** This filter is documented in wp-includes/formatting.php */
return
apply_filters(
'is_email'
, false,
$email
,
'sub_invalid_chars'
);
- /wp-includes/formatting.php line 36003597359835993600360136023603360436053606
// Test for invalid characters.
if
( ! preg_match(
'/^[a-z0-9-]+$/i'
,
$sub
) ) {
/** This filter is documented in wp-includes/formatting.php */
return
apply_filters(
'is_email'
, false,
$email
,
'sub_invalid_chars'
);
}
}
// Congratulations, your email made it!
/** This filter is documented in wp-includes/formatting.php */
return
apply_filters(
'is_email'
,
$email
,
$email
, null );
- /wp-includes/formatting.php line 360636023603360436053606360736083609361036113612
}
// Congratulations, your email made it!
/** This filter is documented in wp-includes/formatting.php */
return
apply_filters(
'is_email'
,
$email
,
$email
, null );
}
/**
* Converts to ASCII from email subjects.
*
* @since 1.2.0