PluginProbe
Hash Form – Drag & Drop Form Builder / trunk
Hash Form – Drag & Drop Form Builder vtrunk
1.4.4 1.4.3 1.4.2 1.4.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.6.1 1.2.7 1.2.8 1.2.9 1.3.0 All 47 releases
hash-form / admin / settings / captcha-settings.php

captcha-settings.php in Hash Form – Drag & Drop Form Builder trunk, at admin/settings/captcha-settings.php

74 lines 5.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 defined('ABSPATH') || die();
3 /*
4 * A template, included from inside a class method - never loaded on its own.
5 * The variables below are locals of the method that includes it, not globals,
6 * which is what the prefix sniff assumes about a file-scope assignment.
7 */
8 // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- included from within a method, so these are function locals.
9
10 $captcha_lang = array('en' => 'English', 'af' => 'Afrikaans', 'am' => 'Amharic', 'ar' => 'Arabic', 'hy' => 'Armenian', 'az' => 'Azerbaijani', 'eu' => 'Basque', 'bn' => 'Bengali', 'bg' => 'Bulgarian', 'ca' => 'Catalan', 'zh-HK' => 'Chinese Hong Kong', 'zh-CN' => 'Chinese Simplified', 'zh-TW' => 'Chinese Traditional', 'hr' => 'Croatian', 'cs' => 'Czech', 'da' => 'Danish', 'nl' => 'Dutch', 'en-GB' => 'English/UK', 'et' => 'Estonian', 'fa' => 'Farsi/Persian', 'fil' => 'Filipino', 'fi' => 'Finnish', 'fr' => 'French', 'fr-CA' => 'French/Canadian', 'gl' => 'Galician', 'ka' => 'Georgian', 'de' => 'German', 'de-AT' => 'German/Austria', 'de-CH' => 'German/Switzerland', 'el' => 'Greek', 'gu' => 'Gujarati', 'he' => 'Hebrew', 'iw' => 'Hebrew', 'hi' => 'Hindi', 'hu' => 'Hungarian', 'is' => 'Icelandic', 'id' => 'Indonesian', 'it' => 'Italian', 'ja' => 'Japanese', 'kn' => 'Kannada', 'ko' => 'Korean', 'lo' => 'Laothian', 'lv' => 'Latvian', 'lt' => 'Lithuanian', 'ml' => 'Malayalam', 'ms' => 'Malaysian', 'mr' => 'Marathi', 'no' => 'Norwegian', 'pl' => 'Polish', 'pt' => 'Portuguese', 'pt-BR' => 'Portuguese/Brazilian', 'pt-PT' => 'Portuguese/Portugal', 'ro' => 'Romanian', 'ru' => 'Russian', 'sr' => 'Serbian', 'si' => 'Sinhalese', 'sk' => 'Slovak', 'sl' => 'Slovenian', 'es' => 'Spanish', 'es-419' => 'Spanish/Latin America', 'sw' => 'Swahili', 'sv' => 'Swedish', 'ta' => 'Tamil', 'te' => 'Telugu', 'th' => 'Thai', 'tr' => 'Turkish', 'uk' => 'Ukrainian', 'ur' => 'Urdu', 'vi' => 'Vietnamese', 'zu' => 'Zulu');
11 ?>
12 <p>
13 <?php
14 /* translators: 1: recatpcha text, 2: link open, 3: link close */
15 printf(esc_html__('%1$s requires a Site and Secret keys. Sign up for a %2$sfree %1$s key%3$s.', 'hash-form'), esc_html('reCAPTCHA'), '<a href="' . esc_url('https://www.google.com/recaptcha/') . '" target="_blank">', '</a>');
16 ?>
17 </p>
18 <p>
19 <?php
20 /* translators: 1: link open, 2: link close */
21 printf(esc_html__('Tutorial to %1$sGenerate Site and Secret Keys%2$s', 'hash-form'), '<a href="https://hashthemes.com/articles/generate-site-key-and-secret-key-from-google-recaptcha/" target="_blank">', '</a>');
22 ?>
23 </p>
24
25 <div class="hf-form-container">
26 <div class="hf-settings-row">
27 <label class="hf-setting-label"><?php esc_html_e('reCAPTCHA Type', 'hash-form'); ?></label>
28 <select name="hashform_settings[re_type]" id="hf-re-type" data-condition="toggle">
29 <option value="v2" <?php selected($settings['re_type'], 'v2'); ?>><?php esc_html_e('Checkbox (V2)', 'hash-form'); ?></option>
30 <option value="v3" <?php selected($settings['re_type'], 'v3'); ?>><?php esc_html_e('v3', 'hash-form'); ?></option>
31 </select>
32 </div>
33
34 <div class="hf-settings-row" data-condition-toggle="hf-re-type" data-condition-val="v2">
35 <label class="hf-setting-label"><?php esc_html_e('v2 Site Key', 'hash-form'); ?></label>
36 <input type="text" name="hashform_settings[pubkey_v2]" value="<?php echo esc_attr($settings['pubkey_v2']); ?>" />
37 </div>
38
39 <div class="hf-settings-row" data-condition-toggle="hf-re-type" data-condition-val="v2">
40 <label class="hf-setting-label"><?php esc_html_e('v2 Secret Key', 'hash-form'); ?></label>
41 <input type="password" name="hashform_settings[privkey_v2]" value="<?php echo esc_attr($settings['privkey_v2']); ?>" />
42 </div>
43
44 <div class="hf-settings-row" data-condition-toggle="hf-re-type" data-condition-val="v3">
45 <label class="hf-setting-label"><?php esc_html_e('v3 Site Key', 'hash-form'); ?></label>
46 <input type="text" name="hashform_settings[pubkey_v3]" value="<?php echo esc_attr($settings['pubkey_v3']); ?>" />
47 </div>
48
49 <div class="hf-settings-row" data-condition-toggle="hf-re-type" data-condition-val="v3">
50 <label class="hf-setting-label"><?php esc_html_e('v3 Secret Key', 'hash-form'); ?></label>
51 <input type="password" name="hashform_settings[privkey_v3]" value="<?php echo esc_attr($settings['privkey_v3']); ?>" />
52 </div>
53
54 <div class="hf-settings-row">
55 <label class="hf-setting-label"><?php esc_html_e('reCAPTCHA Language', 'hash-form'); ?></label>
56 <select name="hashform_settings[re_lang]">
57 <option value="" <?php selected($settings['re_lang'], ''); ?>><?php esc_html_e('Browser Default', 'hash-form'); ?></option>
58 <?php foreach ($captcha_lang as $lang => $lang_name) { ?>
59 <option value="<?php echo esc_attr($lang); ?>" <?php selected($settings['re_lang'], $lang); ?>><?php echo esc_html($lang_name); ?></option>
60 <?php } ?>
61 </select>
62 </div>
63
64 <div id="hf-captcha-threshold-container" class="hf-settings-row" data-condition-toggle="hf-re-type" data-condition-val="v3">
65 <label class="hf-setting-label"><?php esc_html_e('reCAPTCHA Threshold', 'hash-form'); ?></label>
66 <p class="hf-desc"><?php esc_html_e('A score of 0 is likely to be a bot and a score of 1 is likely not a bot. Setting a lower threshold will allow more bots, but it will also stop fewer real users.', 'hash-form'); ?></p>
67 <div class="hf-grid-container">
68 <div class="hf-setting-fields hf-range-slider-wrap hf-grid-3">
69 <div class="hf-range-slider"></div>
70 <input id="hf-re-threshold" class="hf-range-input-selector" type="number" name="hashform_settings[re_threshold]" value="<?php echo esc_attr($settings['re_threshold']); ?>" min="0" max="1" step="0.1">
71 </div>
72 </div>
73 </div>
74 </div>