html-recaptcha.php
8.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<?php
if (!defined("ABSPATH")) {
exit();
}
?>
<!-- Option start -->
<div class="wpd-opt-row">
<div class="wpd-opt-intro">
<img class="wpd-opt-img" src="<?php echo esc_url_raw(plugins_url(WPDISCUZ_DIR_NAME . "/assets/img/dashboard/" . $setting["icon"])); ?>" style="height: 65px;"/>
<?php echo sprintf(esc_html__("Please %s with Google to obtain the Site Key and Secret Key for %s. Then insert those keys in according fields below.", "wpdiscuz"), "<a href='https://www.google.com/recaptcha/admin' target='_blank'>" . esc_html__("register your domain", "wpdiscuz") . "</a>", "<span style='color:#FF0000'>" . esc_html__("reCAPTCHA Version 2", "wpdiscuz") . "</span>"); ?>
<?php echo sprintf(esc_html__("If you want to use the latest Version 3 - Invisible Google reCAPTCHA with comment form, please checkout %s addon. This will make your commenters life easier, letting them pass through with ease.", "wpdiscuz"), "<a href='https://gvectors.com/product/wpdiscuz-recaptcha/' target='_blank' style='color:#07B290;'>" . "wpDiscuz reCAPTCHA" . "</a>"); ?>
</div>
<div class="wpd-opt-doc" style="padding-top: 10px;">
<a href="https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
</div>
</div>
<!-- Option end -->
<div class="wpd-subtitle">
<?php esc_html_e("General", "wpdiscuz"); ?>
</div>
<!-- Option start -->
<div class="wpd-opt-row" data-wpd-opt="requestMethod">
<div class="wpd-opt-name">
<label for="requestMethod"><?php echo esc_html($setting["options"]["requestMethod"]["label"]) ?></label>
<p class="wpd-desc"><?php echo esc_html($setting["options"]["requestMethod"]["description"]) ?></p>
</div>
<div class="wpd-opt-input">
<select id="requestMethod" name="<?php echo esc_attr(WpdiscuzCore::TAB_RECAPTCHA); ?>[requestMethod]">
<option value="auto" <?php selected($this->recaptcha["requestMethod"], "auto"); ?>><?php esc_html_e("Auto", "wpdiscuz"); ?></option>
<option value="socket" <?php selected($this->recaptcha["requestMethod"], "socket"); ?>><?php esc_html_e("SocketPost", "wpdiscuz"); ?></option>
<option value="curl" <?php selected($this->recaptcha["requestMethod"], "curl"); ?>><?php esc_html_e("CurlPost", "wpdiscuz"); ?></option>
<option value="post" <?php selected($this->recaptcha["requestMethod"], "post"); ?>><?php esc_html_e("Post", "wpdiscuz"); ?></option>
</select>
</div>
<div class="wpd-opt-doc">
<?php $this->printDocLink($setting["options"]["requestMethod"]["docurl"]) ?>
</div>
</div>
<!-- Option end -->
<!-- Option start -->
<div class="wpd-opt-row" data-wpd-opt="showForGuests">
<div class="wpd-opt-name">
<label for="showForGuests"><?php echo esc_html($setting["options"]["showForGuests"]["label"]) ?></label>
<p class="wpd-desc"><?php echo esc_html($setting["options"]["showForGuests"]["description"]) ?></p>
</div>
<div class="wpd-opt-input">
<div class="wpd-switcher">
<input type="checkbox" <?php checked($this->recaptcha["showForGuests"] == 1) ?> value="1" name="<?php echo esc_attr(WpdiscuzCore::TAB_RECAPTCHA); ?>[showForGuests]" id="showForGuests">
<label for="showForGuests"></label>
</div>
</div>
<div class="wpd-opt-doc">
<?php $this->printDocLink($setting["options"]["showForGuests"]["docurl"]) ?>
</div>
</div>
<!-- Option end -->
<!-- Option start -->
<div class="wpd-opt-row" data-wpd-opt="showForUsers">
<div class="wpd-opt-name">
<label for="showForUsers"><?php echo esc_html($setting["options"]["showForUsers"]["label"]) ?></label>
<p class="wpd-desc"><?php echo esc_html($setting["options"]["showForUsers"]["description"]) ?></p>
</div>
<div class="wpd-opt-input">
<div class="wpd-switcher">
<input type="checkbox" <?php echo checked($this->recaptcha["showForUsers"] == 1); ?> value="1" name="<?php echo esc_attr(WpdiscuzCore::TAB_RECAPTCHA); ?>[showForUsers]" id="showForUsers">
<label for="showForUsers"></label>
</div>
</div>
<div class="wpd-opt-doc">
<?php $this->printDocLink($setting["options"]["showForUsers"]["docurl"]) ?>
</div>
</div>
<!-- Option end -->
<!-- Option start -->
<div class="wpd-opt-row" data-wpd-opt="isShowOnSubscribeForm">
<div class="wpd-opt-name">
<label for="isShowOnSubscribeForm"><?php echo esc_html($setting["options"]["isShowOnSubscribeForm"]["label"]) ?></label>
<p class="wpd-desc"><?php echo esc_html($setting["options"]["isShowOnSubscribeForm"]["description"]) ?></p>
</div>
<div class="wpd-opt-input">
<div class="wpd-switcher">
<input type="checkbox" <?php echo checked($this->recaptcha["isShowOnSubscribeForm"] == 1); ?> value="1" name="<?php echo esc_attr(WpdiscuzCore::TAB_RECAPTCHA); ?>[isShowOnSubscribeForm]" id="isShowOnSubscribeForm">
<label for="isShowOnSubscribeForm"></label>
</div>
</div>
<div class="wpd-opt-doc">
<?php $this->printDocLink($setting["options"]["isShowOnSubscribeForm"]["docurl"]) ?>
</div>
</div>
<!-- Option end -->
<div class="wpd-subtitle">
<?php esc_html_e("reCAPTCHA v2", "wpdiscuz"); ?>
</div>
<!-- Option start -->
<div class="wpd-opt-row" data-wpd-opt="siteKey">
<div class="wpd-opt-name">
<label for="siteKey"><?php echo esc_html($setting["options"]["siteKey"]["label"]) ?></label>
<p class="wpd-desc"><?php echo esc_html($setting["options"]["siteKey"]["description"]) ?></p>
</div>
<div class="wpd-opt-input">
<input id="siteKey" type="text" name="<?php echo esc_attr(WpdiscuzCore::TAB_RECAPTCHA); ?>[siteKey]" placeholder="<?php esc_html_e("reCAPTCHA V2 Site Key", "wpdiscuz"); ?>" value="<?php echo esc_attr($this->recaptcha["siteKey"]); ?>" style="margin:1px;padding:3px 5px; width:90%;"/>
</div>
<div class="wpd-opt-doc">
<?php $this->printDocLink($setting["options"]["siteKey"]["docurl"]) ?>
</div>
</div>
<!-- Option end -->
<!-- Option start -->
<div class="wpd-opt-row" data-wpd-opt="secretKey">
<div class="wpd-opt-name">
<label for="secretKey"><?php echo esc_html($setting["options"]["secretKey"]["label"]) ?></label>
<p class="wpd-desc"><?php echo esc_html($setting["options"]["secretKey"]["description"]) ?></p>
</div>
<div class="wpd-opt-input">
<input id="secretKey" type="text" name="<?php echo esc_attr(WpdiscuzCore::TAB_RECAPTCHA); ?>[secretKey]" placeholder="<?php esc_html_e("reCAPTCHA V2 Secret Key", "wpdiscuz"); ?>" value="<?php echo esc_attr($this->recaptcha["secretKey"]); ?>" style="margin: 1px;padding:3px 5px; width:90%;"/>
</div>
<div class="wpd-opt-doc">
<?php $this->printDocLink($setting["options"]["secretKey"]["docurl"]) ?>
</div>
</div>
<!-- Option end -->
<!-- Option start -->
<div class="wpd-opt-row" data-wpd-opt="theme">
<div class="wpd-opt-name">
<label for="theme"><?php echo esc_html($setting["options"]["theme"]["label"]) ?></label>
<p class="wpd-desc"><?php echo esc_html($setting["options"]["theme"]["description"]) ?></p>
</div>
<div class="wpd-opt-input">
<select id="theme" name="<?php echo esc_attr(WpdiscuzCore::TAB_RECAPTCHA); ?>[theme]">
<option value="light" <?php selected($this->recaptcha["theme"], "light"); ?>><?php esc_html_e("Light", "wpdiscuz"); ?></option>
<option value="dark" <?php selected($this->recaptcha["theme"], "dark"); ?>><?php esc_html_e("Dark", "wpdiscuz"); ?></option>
</select>
</div>
<div class="wpd-opt-doc">
<?php $this->printDocLink($setting["options"]["theme"]["docurl"]) ?>
</div>
</div>
<!-- Option end -->
<!-- Option start -->
<div class="wpd-opt-row" data-wpd-opt="lang">
<div class="wpd-opt-name">
<label for="lang"><?php echo esc_html($setting["options"]["lang"]["label"]) ?></label>
<p class="wpd-desc"><?php echo esc_html($setting["options"]["lang"]["description"]) ?></p>
</div>
<div class="wpd-opt-input">
<input id="lang" type="text" name="<?php echo esc_attr(WpdiscuzCore::TAB_RECAPTCHA); ?>[lang]" value="<?php echo esc_attr($this->recaptcha["lang"]); ?>" placeholder="<?php esc_attr_e("Example en", "wpdiscuz"); ?>" style="margin: 1px;padding:3px 5px; width:120px;"/><br />
<a target="blanck" style="font-size: 10px;" href="https://developers.google.com/recaptcha/docs/language"><?php esc_html_e("Language codes", "wpdiscuz"); ?></a>
</div>
<div class="wpd-opt-doc">
<?php $this->printDocLink($setting["options"]["lang"]["docurl"]) ?>
</div>
</div>
<!-- Option end -->