return self::$_singleton;
}
+
+ /**
+ * Check if reCaptcha settings is avilable to add on form.
+ */
+ public static function hasSettingsAvailable() {
+ $config = CRM_Core_Config::singleton();
+ if ($config->recaptchaPublicKey == NULL || $config->recaptchaPublicKey == "") {
+ return FALSE;
+ }
+ return TRUE;
+ }
+
+ /**
+ * Check if reCaptcha has to be added on form forcefully.
+ */
+ public static function hasToAddForcefully() {
+ $config = CRM_Core_Config::singleton();
+ if (!$config->forceRecaptcha) {
+ return FALSE;
+ }
+ return TRUE;
+ }
+
/**
* Add element to form.
*