Define URL utility method to check if url is using https

[MAILPOET-4702]
This commit is contained in:
Sam Najian
2022-11-01 17:22:29 +01:00
committed by Aschepikov
parent d34a265ac2
commit e3539b06a2

View File

@@ -69,4 +69,8 @@ class Url {
}
exit();
}
public function isUsingHttps(string $url): bool {
return wp_parse_url($url, PHP_URL_SCHEME) === 'https';
}
}