diff --git a/inc/class.embed.php b/inc/class.embed.php index 2e758cd..b2e1a92 100644 --- a/inc/class.embed.php +++ b/inc/class.embed.php @@ -122,13 +122,13 @@ private function prepare_atts($atts): array $url = sanitize_text_field($atts['url']); // ensure url is sanitized correctly - if (str_contains($atts['url'], 'https://cal.com/')) { + if (strpos($atts['url'], 'https://cal.com/') !== false) { $url = str_replace('https://cal.com/', '/', $url); } // 'https://' or 'http://' protocol indicate self-hosted instance - elseif (str_contains($atts['url'], 'https://') || str_contains($atts['url'], 'http://')) { + elseif (strpos($atts['url'], 'https://') !== false || strpos($atts['url'], 'http://') !== false) { // Start searching after 'http(s)://' - $firstSlashPosition = strpos($url, '/', strlen(str_contains($atts['url'], 'https://') ? "https://" : "http://")); + $firstSlashPosition = strpos($url, '/', strlen(strpos($atts['url'], 'https://') !== false ? "https://" : "http://")); $embed_custom_cal_url = substr($url, 0, $firstSlashPosition); $url = substr($url, $firstSlashPosition); } diff --git a/readme.txt b/readme.txt index 0fa43e0..5676ab2 100644 --- a/readme.txt +++ b/readme.txt @@ -2,9 +2,9 @@ Contributors: calcom, turn2honey Tags: appointment, appointment booking, appointment scheduling, booking calendar, calcom Requires at least: 4.0 -Tested up to: 6.0.1 -Stable tag: 1.0.0 -Requires PHP: 5.2.4 +Tested up to: 6.8.2 +Stable tag: 1.0.1 +Requires PHP: 5.6 License: GNU General Public License License URI: https://www.gnu.org/licenses/gpl-3.0.en.html