diff --git a/lib/CleantalkAntispam.php b/lib/CleantalkAntispam.php index f9568e8..7f7cd82 100644 --- a/lib/CleantalkAntispam.php +++ b/lib/CleantalkAntispam.php @@ -9,6 +9,7 @@ class CleantalkAntispam { + const VERSION = '4.4'; const MODERATE_URL = 'https://moderate.cleantalk.org/api2.0'; const BOT_DETECTOR_LIBRARY_URL = 'https://fd.cleantalk.org/ct-bot-detector-wrapper.js'; const EVENT_TOKEN_FIELD_NAME = 'ct_bot_detector_event_token'; @@ -134,8 +135,9 @@ private function setEmailAutomatically() public static function getFrontendHTMLCode($warn_if_js_disabled = false) { $warn = $warn_if_js_disabled ? 'Please, enable JavaScript in the browser to process the form' : ''; + $url = static::BOT_DETECTOR_LIBRARY_URL . '?version=' . self::VERSION; $html = '%s'; - return sprintf($html, static::BOT_DETECTOR_LIBRARY_URL, $warn); + return sprintf($html, $url, $warn); } /**