PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/views/frm-settings/captcha/captcha_keys.php +8 -22 6.5.2 → trunk View file →
@@ -5,39 +5,25 @@
5 5 ?>
6 6
7 7 <p class="howto">
8 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 - }
9 + $settings = FrmCaptchaFactory::get_settings_object( $captcha );
10 + $prefix = $settings->get_settings_prefix();
11 +
17 12 printf(
18 13 /* translators: %1$s: Captcha name, %2$s: Start link HTML, %3$s: End link HTML */
19 14 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">',
15 + esc_html( $settings->get_name() ),
16 + '<a href="' . esc_url( $settings->get_documentation_url() ) . '" target="_blank">',
22 17 '</a>'
23 18 );
24 19 ?>
25 20 </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 21 <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 ); ?>">
22 + <label class="frm_help" for="frm_<?php echo esc_attr( $prefix ); ?>pubkey" title="<?php echo esc_attr( $settings->get_site_key_tooltip() ); ?>">
37 23 <?php esc_html_e( 'Site Key', 'formidable' ); ?>
38 24 </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'} ); ?>" />
25 + <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( $settings->get_pubkey() ); ?>" />
40 26 </p>
41 27
42 28 <p class="frm6 frm_form_field">
43 29 <label for="frm_<?php echo esc_attr( $prefix ); ?>privkey">
@@ -42,6 +28,6 @@
42 28 <p class="frm6 frm_form_field">
43 29 <label for="frm_<?php echo esc_attr( $prefix ); ?>privkey">
44 30 <?php esc_html_e( 'Secret Key', 'formidable' ); ?>
45 31 </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'} ); ?>" />
32 + <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( $settings->secret ); ?>" />
47 33 </p>