wpcf7_is_email_in_site_domain()
Checks whether an email address belongs to the site domain.
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
wpcf7_is_email_in_site_domain( $email );
- $email (обязательный)
- -
Код wpcf7_is_email_in_site_domain() wpcf7 is email in site domain CF7 6.0.6
function wpcf7_is_email_in_site_domain( $email ) { if ( wpcf7_is_localhost() ) { return true; } $homes = array( home_url(), network_home_url(), ); $homes = array_unique( $homes ); foreach ( $homes as $home ) { $sitename = wp_parse_url( $home, PHP_URL_HOST ); if ( WP_Http::is_ip_address( $sitename ) ) { return true; } if ( wpcf7_is_email_in_domain( $email, $sitename ) ) { return true; } } return false; }