wpcf7_is_url()CF7 1.0

Checks whether the given text is a well-formed URL.

Хуки из функции

Возвращает

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

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

wpcf7_is_url( $text );
$text (обязательный)
-

Код wpcf7_is_url() CF7 6.0.5

function wpcf7_is_url( $text ) {
	$scheme = wp_parse_url( $text, PHP_URL_SCHEME );
	$result = $scheme && in_array( $scheme, wp_allowed_protocols(), true );
	return apply_filters( 'wpcf7_is_url', $result, $text );
}