wpcf7_is_localhost()CF7 1.0

Returns true if WordPress is running on the localhost.

Хуков нет.

Возвращает

null. Ничего (null).

Использование

wpcf7_is_localhost();

Код wpcf7_is_localhost() CF7 6.1.7

function wpcf7_is_localhost() {
	$sitename = wp_parse_url( network_home_url(), PHP_URL_HOST );

	return in_array(
		strtolower( $sitename ),
		array( 'localhost', '127.0.0.1' ),
		true
	);
}