| 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 FrmTurnstileSettings extends FrmFieldCaptchaSettings { |
| 10 |
|
| 11 |
/** |
| 12 |
* @since 6.8.4 |
| 13 |
* |
| 14 |
* @return void |
| 15 |
*/ |
| 16 |
protected function set_endpoint() { |
| 17 |
$this->endpoint = 'https://challenges.cloudflare.com/turnstile/v0/siteverify'; |
| 18 |
} |
| 19 |
|
| 20 |
/** |
| 21 |
* @since 6.8.4 |
| 22 |
* |
| 23 |
* @return string |
| 24 |
*/ |
| 25 |
public function get_name() { |
| 26 |
return 'Turnstile'; |
| 27 |
} |
| 28 |
|
| 29 |
/** |
| 30 |
* @since 6.8.4 |
| 31 |
* |
| 32 |
* @return string |
| 33 |
*/ |
| 34 |
public function get_element_class_name() { |
| 35 |
return 'cf-turnstile'; |
| 36 |
} |
| 37 |
|
| 38 |
/** |
| 39 |
* @since 6.8.4 |
| 40 |
* |
| 41 |
* @return string |
| 42 |
*/ |
| 43 |
public function get_documentation_url() { |
| 44 |
return 'https://www.cloudflare.com/products/turnstile/'; |
| 45 |
} |
| 46 |
|
| 47 |
/** |
| 48 |
* Turnstile global settings are saved as turnstile_pubkey and turnstile_privkey. |
| 49 |
* |
| 50 |
* @since 6.8.4 |
| 51 |
* |
| 52 |
* @return string |
| 53 |
*/ |
| 54 |
public function get_settings_prefix() { |
| 55 |
return 'turnstile_'; |
| 56 |
} |
| 57 |
|
| 58 |
/** |
| 59 |
* @since 6.8.4 |
| 60 |
* |
| 61 |
* @return string |
| 62 |
*/ |
| 63 |
public function get_site_key_tooltip() { |
| 64 |
return __( 'Turnstile is a free tool to replace CAPTCHAs. Turnstile delivers frustration-free, CAPTCHA-free web experiences to website visitors - with just a simple snippet of free code. Moreover, Turnstile stops abuse and confirms visitors are real without the data privacy concerns or awful user experience of CAPTCHAs.', 'formidable' ); |
| 65 |
} |
| 66 |
|
| 67 |
/** |
| 68 |
* Turnstile supports an "Auto" theme option so show it. |
| 69 |
* |
| 70 |
* @since 6.8.4 |
| 71 |
* |
| 72 |
* @return bool |
| 73 |
*/ |
| 74 |
public function should_show_captcha_theme_auto_option() { |
| 75 |
return true; |
| 76 |
} |
| 77 |
} |
| 78 |
|