| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
die( 'You are not allowed to call this page directly.' ); |
| 4 |
} |
| 5 |
?> |
| 6 |
|
| 7 |
<p class="howto"> |
| 8 |
<?php |
| 9 |
$captcha_name = $captcha === 'recaptcha' ? 'reCAPTCHA' : 'hCaptcha'; |
| 10 |
if ( $captcha === 'recaptcha' ) { |
| 11 |
$captcha_name = 'reCAPTCHA'; |
| 12 |
$captcha_api = 'https://www.google.com/recaptcha/'; |
| 13 |
} else { |
| 14 |
$captcha_name = 'hCaptcha'; |
| 15 |
$captcha_api = 'https://www.hcaptcha.com/signup-interstitial'; |
| 16 |
} |
| 17 |
printf( |
| 18 |
/* translators: %1$s: Captcha name, %2$s: Start link HTML, %3$s: End link HTML */ |
| 19 |
esc_html__( '%1$s requires a Site and Private API key. Sign up for a %2$sfree %1$s key%3$s.', 'formidable' ), |
| 20 |
esc_html( $captcha_name ), |
| 21 |
'<a href="' . esc_url( $captcha_api ) . '" target="_blank">', |
| 22 |
'</a>' |
| 23 |
); |
| 24 |
?> |
| 25 |
</p> |
| 26 |
<?php |
| 27 |
if ( $captcha === 'recaptcha' ) { |
| 28 |
$prefix = ''; |
| 29 |
$title = __( 'reCAPTCHA is a free, accessible CAPTCHA service that helps to digitize books while blocking spam on your blog. reCAPTCHA asks commenters to retype two words scanned from a book to prove that they are a human. This verifies that they are not a spambot.', 'formidable' ); |
| 30 |
} else { |
| 31 |
$prefix = 'hcaptcha_'; |
| 32 |
$title = __( 'hCaptcha is an anti-bot solution that protects user privacy and rewards websites. It is a privacy-focused drop-in replacement for reCAPTCHA.', 'formidable' ); |
| 33 |
} |
| 34 |
?> |
| 35 |
<p class="frm6 frm_form_field"> |
| 36 |
<label class="frm_help" for="frm_<?php echo esc_attr( $prefix ); ?>pubkey" title="<?php echo esc_attr( $title ); ?>"> |
| 37 |
<?php esc_html_e( 'Site Key', 'formidable' ); ?> |
| 38 |
</label> |
| 39 |
<input type="text" name="frm_<?php echo esc_html( $prefix ); ?>pubkey" id="frm_<?php echo esc_html( $prefix ); ?>pubkey" size="42" value="<?php echo esc_attr( $frm_settings->{$prefix . 'pubkey'} ); ?>" /> |
| 40 |
</p> |
| 41 |
|
| 42 |
<p class="frm6 frm_form_field"> |
| 43 |
<label for="frm_<?php echo esc_attr( $prefix ); ?>privkey"> |
| 44 |
<?php esc_html_e( 'Secret Key', 'formidable' ); ?> |
| 45 |
</label> |
| 46 |
<input type="text" name="frm_<?php echo esc_html( $prefix ); ?>privkey" id="frm_<?php echo esc_html( $prefix ); ?>privkey" size="42" value="<?php echo esc_attr( $frm_settings->{$prefix . 'privkey'} ); ?>" /> |
| 47 |
</p> |
| 48 |
|