true, 'disable_registered_comments' => true]); $license = new \SmartCaptchaIntegration\Classes\LicenseManager(); $smartcaptcha = new \SmartCaptchaIntegration\Classes\YandexSmartCaptcha($license); $smartcaptcha->setSiteKey($options['sitekey'] ?? ''); $smartcaptcha->setSecret($options['secret'] ?? ''); $smartcaptcha->setLanguage($options['language'] ?? ''); $smartcaptcha->setTestMode($options['test'] ?? false); $smartcaptcha->setInvisible($options['invisible'] ?? false); $smartcaptcha->setShieldPosition($options['shield_position'] ?? 'bottom-right'); if($options['enable_for_comments'] ?? false) { $smartcaptcha->enableForCommentForm(!($options['disable_registered_comments'] ?? false)); } if($options['enable_for_login'] ?? false) { $smartcaptcha->enableForLoginForm(); } if($options['enable_for_register'] ?? false) { $smartcaptcha->enableForRegisterForm(); } if($options['enable_for_password'] ?? false) { $smartcaptcha->enableForLostPasswordForm(); } $smartcaptcha->enableForContactForm7(); $smartcaptcha->enableForWPForms(); $smartcaptcha->enableForElementorPRO(); new \SmartCaptchaIntegration\Classes\PluginAdminControl($options, $license); }, 10, 0);