| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
die( 'You are not allowed to call this page directly.' ); |
| 4 |
} |
| 5 |
|
| 6 |
/** |
| 7 |
* @since 6.8.4 |
| 8 |
*/ |
| 9 |
class FrmHcaptchaSettings extends FrmFieldCaptchaSettings { |
| 10 |
|
| 11 |
/** |
| 12 |
* @since 6.8.4 |
| 13 |
* |
| 14 |
* @return void |
| 15 |
*/ |
| 16 |
protected function set_endpoint() { |
| 17 |
$this->endpoint = 'https://hcaptcha.com/siteverify'; |
| 18 |
} |
| 19 |
|
| 20 |
/** |
| 21 |
* @since 6.8.4 |
| 22 |
* |
| 23 |
* @return string |
| 24 |
*/ |
| 25 |
public function get_name() { |
| 26 |
return 'hCaptcha'; |
| 27 |
} |
| 28 |
|
| 29 |
/** |
| 30 |
* @since 6.8.4 |
| 31 |
* |
| 32 |
* @return string |
| 33 |
*/ |
| 34 |
public function get_element_class_name() { |
| 35 |
return 'h-captcha'; |
| 36 |
} |
| 37 |
|
| 38 |
/** |
| 39 |
* @since 6.8.4 |
| 40 |
* |
| 41 |
* @return string |
| 42 |
*/ |
| 43 |
public function get_documentation_url() { |
| 44 |
return 'https://www.hcaptcha.com/signup-interstitial'; |
| 45 |
} |
| 46 |
|
| 47 |
/** |
| 48 |
* Get the prefix for the global setting. |
| 49 |
* reCAPTCHA fields just use pubkey/privkey. |
| 50 |
* But other captcha integrations use a prefix like hcaptcha_public/turnstile_privkey. |
| 51 |
* |
| 52 |
* @since 6.8.4 |
| 53 |
* |
| 54 |
* @return string |
| 55 |
*/ |
| 56 |
public function get_settings_prefix() { |
| 57 |
return 'hcaptcha_'; |
| 58 |
} |
| 59 |
|
| 60 |
/** |
| 61 |
* @since 6.8.4 |
| 62 |
* |
| 63 |
* @return string |
| 64 |
*/ |
| 65 |
public function get_site_key_tooltip() { |
| 66 |
return __( 'hCaptcha is an anti-bot solution that protects user privacy and rewards websites. It is a privacy-focused drop-in replacement for reCAPTCHA.', 'formidable' ); |
| 67 |
} |
| 68 |
} |
| 69 |
|