WPCF7_ContactFormTemplate::from_email
Метод класса: WPCF7_ContactFormTemplate{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$result = WPCF7_ContactFormTemplate::from_email();
Код WPCF7_ContactFormTemplate::from_email() WPCF7 ContactFormTemplate::from email CF7 6.1.6
public static function from_email() {
$admin_email = get_option( 'admin_email' );
if ( wpcf7_is_localhost() ) {
return $admin_email;
}
$sitename = wp_parse_url( network_home_url(), PHP_URL_HOST );
$sitename = strtolower( $sitename );
if ( 'www.' === substr( $sitename, 0, 4 ) ) {
$sitename = substr( $sitename, 4 );
}
if ( strpbrk( $admin_email, '@' ) === '@' . $sitename ) {
return $admin_email;
}
return 'wordpress@' . $sitename;
}