Version Description
- New: Show captcha after set failed login attempts (may not work if you use ajax based login form, fall back to show always).
- Fix: contact form 7 deprecated function use.
Download this release
Release Info
Developer | shamim51 |
Plugin | Advanced noCaptcha & invisible Captcha |
Version | 2.6 |
Comparing to | |
See all releases |
Code changes from version 2.5 to 2.6
- admin/anr-admin-class.php +76 -80
- advanced-nocaptcha-recaptcha.php +25 -25
- anr-captcha-class.php +136 -72
- functions.php +160 -135
- languages/advanced-nocaptcha-recaptcha.pot +31 -25
- readme.txt +184 -162
admin/anr-admin-class.php
CHANGED
@@ -7,15 +7,15 @@ if (!class_exists('anr_admin_class'))
|
|
7 |
private static $instance;
|
8 |
|
9 |
public static function init()
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
|
17 |
-
|
18 |
-
|
19 |
if ( is_multisite() ) {
|
20 |
$same_settings = apply_filters( 'anr_same_settings_for_all_sites', false );
|
21 |
} else {
|
@@ -28,27 +28,27 @@ if (!class_exists('anr_admin_class'))
|
|
28 |
}
|
29 |
|
30 |
add_filter('plugin_action_links', array($this, 'add_settings_link'), 10, 2 );
|
31 |
-
|
32 |
|
33 |
|
34 |
|
35 |
/******************************************ADMIN SETTINGS PAGE BEGIN******************************************/
|
36 |
|
37 |
-
|
38 |
-
|
39 |
//add_menu_page('Advanced noCaptcha reCaptcha', 'Advanced noCaptcha', 'manage_options', 'anr-admin-settings', array($this, 'admin_settings'),plugins_url( 'advanced-nocaptcha-recaptcha/images/advanced-nocaptcha-recaptcha.jpg' ));
|
40 |
|
41 |
//add_submenu_page('anr-admin-settings', 'Advanced noCaptcha reCaptcha - ' .__('Settings','advanced-nocaptcha-recaptcha'), __('Settings','advanced-nocaptcha-recaptcha'), 'manage_options', 'anr-admin-settings', array($this, 'admin_settings'));
|
42 |
|
43 |
//add_submenu_page('anr-admin-settings', 'Advanced noCaptcha reCaptcha - ' .__('Instruction','fepcf'), __('Instruction','fepcf'), 'manage_options', 'anr-instruction', array($this, "InstructionPage"));
|
44 |
-
|
45 |
-
add_options_page( __('Advanced noCaptcha & invisible captcha Settings','advanced-nocaptcha-recaptcha'), __('Advanced noCaptcha & invisible captcha','advanced-nocaptcha-recaptcha'), 'manage_options', 'anr-admin-settings', array($this, 'admin_settings') );
|
46 |
|
47 |
-
|
|
|
|
|
48 |
|
49 |
|
50 |
-
|
51 |
-
|
52 |
$token = wp_create_nonce( 'anr-admin-settings' );
|
53 |
$url = 'https://www.shamimsplugins.com/contact-us/';
|
54 |
$ReviewURL = 'https://wordpress.org/support/plugin/advanced-nocaptcha-recaptcha/reviews/?filter=5#new-post';
|
@@ -123,13 +123,13 @@ if (!class_exists('anr_admin_class'))
|
|
123 |
|
124 |
|
125 |
if(isset($_POST['anr-admin-settings-submit'])){
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
echo "<div id='poststuff'>
|
134 |
|
135 |
<div id='post-body' class='metabox-holder columns-2'>
|
@@ -137,14 +137,14 @@ if (!class_exists('anr_admin_class'))
|
|
137 |
<!-- main content -->
|
138 |
<div id='post-body-content'>
|
139 |
<div class='postbox'><div class='inside'>
|
140 |
-
|
141 |
<h5>".sprintf(__("If you like this plugin please <a href='%s' target='_blank'>Review in Wordpress.org</a> and give 5 star", 'advanced-nocaptcha-recaptcha'),esc_url($ReviewURL))."</h5>
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
<tr><td>".__("Secret key", 'advanced-nocaptcha-recaptcha')."<br/><small><a href='https://www.google.com/recaptcha/admin' target='_blank'>Get From Google</a></small></td><td><input type='text' size = '40' name='secret_key' value='".esc_attr( anr_get_option('secret_key') )."' /></td></tr>
|
149 |
|
150 |
<tr><td>".__("Language", 'advanced-nocaptcha-recaptcha')."</td><td><select name='language'>";
|
@@ -166,23 +166,24 @@ if (!class_exists('anr_admin_class'))
|
|
166 |
|
167 |
<option value='normal' ".selected(anr_get_option('size'), 'normal',false).">".__("Normal", 'advanced-nocaptcha-recaptcha')."</option>
|
168 |
<option value='compact' ".selected(anr_get_option('size'), 'compact',false).">".__("Compact", 'advanced-nocaptcha-recaptcha')."</option>
|
169 |
-
|
170 |
|
171 |
</select>
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
|
177 |
<option value='bottomright' ".selected(anr_get_option('badge'), 'bottomright',false).">".__("Bottom Right", 'advanced-nocaptcha-recaptcha')."</option>
|
178 |
<option value='bottomleft' ".selected(anr_get_option('badge'), 'bottomleft',false).">".__("Bottom Left", 'advanced-nocaptcha-recaptcha')."</option>
|
179 |
-
|
180 |
|
181 |
</select>
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
<tr><td>".__("Error Message", 'advanced-nocaptcha-recaptcha')."</td><td><input type='text' size = '40' name='error_message' value='".wp_kses_post( anr_get_option('error_message', '<strong>ERROR</strong>: Please solve Captcha correctly.') )."' /></td></tr>
|
|
|
186 |
|
187 |
<tr><td>".__("Show Captcha on", 'advanced-nocaptcha-recaptcha')."</td><td>";
|
188 |
|
@@ -206,11 +207,11 @@ if (!class_exists('anr_admin_class'))
|
|
206 |
echo "<tr><td colspan='2'><label><input type='checkbox' name='loggedin_hide' value='1' ".checked(anr_get_option('loggedin_hide'), '1', false)." /> ".__("Hide Captcha for logged in users?", 'advanced-nocaptcha-recaptcha')."</label></td></tr>
|
207 |
<tr><td colspan='2'><label><input type='checkbox' name='remove_css' value='1' ".checked(anr_get_option('remove_css'), '1', false)." /> ".__("Remove this plugin's css from login page?", 'advanced-nocaptcha-recaptcha')."<br/><small>".__("This css increase login page width to adjust with Captcha width.", 'advanced-nocaptcha-recaptcha')."</small></label></td></tr>
|
208 |
<tr><td colspan='2'><label><input type='checkbox' name='no_js' value='1' ".checked(anr_get_option('no_js'), '1', false)." /> ".__("Show captcha if javascript disabled?", 'advanced-nocaptcha-recaptcha')."<br/><small>".__("If JavaScript is a requirement for your site, we advise that you do NOT check this.", 'advanced-nocaptcha-recaptcha')."</small></label></td></tr>
|
209 |
-
|
210 |
-
|
211 |
</form>
|
212 |
<ul>".sprintf(__("For paid support pleasse visit <a href='%s' target='_blank'>Advanced noCaptcha reCaptcha</a>", 'advanced-nocaptcha-recaptcha'),esc_url($url))."</ul>
|
213 |
-
|
214 |
". $this->anr_admin_sidebar(). "
|
215 |
</div></div>";
|
216 |
}
|
@@ -239,39 +240,34 @@ function anr_admin_sidebar()
|
|
239 |
}
|
240 |
|
241 |
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
$errors->add('invalidToken', __('Sorry, your nonce did not verify!', 'advanced-nocaptcha-recaptcha'));
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
if ( $same_settings ) {
|
266 |
-
update_site_option('anr_admin_options', $options);
|
267 |
-
} else {
|
268 |
-
update_option('anr_admin_options', $options);
|
269 |
}
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
}
|
275 |
|
276 |
function InstructionPage()
|
277 |
{
|
@@ -283,23 +279,23 @@ function anr_admin_sidebar()
|
|
283 |
<!-- main content -->
|
284 |
<div id="post-body-content">';
|
285 |
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
<li>".sprintf(__("Get your site key and secret key from <a href='%s' target='_blank'>GOOGLE</a> if you do not have already.", 'advanced-nocaptcha-recaptcha'),esc_url('https://www.google.com/recaptcha/admin'))."</li>
|
290 |
<li>".__("Goto SETTINGS page of this plugin and set up as you need. and ENJOY...", 'advanced-nocaptcha-recaptcha')."</li><br/>
|
291 |
|
292 |
<h3>".__("Implement noCaptcha in Contact Form 7", 'advanced-nocaptcha-recaptcha')."</h3><br />
|
293 |
-
|
294 |
|
295 |
<h3>".__("Implement noCaptcha in WooCommerce", 'advanced-nocaptcha-recaptcha')."</h3><br />
|
296 |
-
|
297 |
|
298 |
<h3>".__("If you want to implement noCaptcha in any other custom form", 'advanced-nocaptcha-recaptcha')."</h3><br />
|
299 |
-
|
300 |
<li>".__("To verify use ", 'advanced-nocaptcha-recaptcha')."<code>anr_verify_captcha()</code> it will return true on success otherwise false</li><br />
|
301 |
<li>".sprintf(__("For paid support pleasse visit <a href='%s' target='_blank'>Advanced noCaptcha reCaptcha</a>", 'advanced-nocaptcha-recaptcha'),esc_url($url))."</li>
|
302 |
-
|
303 |
". $this->anr_admin_sidebar(). "
|
304 |
</div></div>";
|
305 |
}
|
7 |
private static $instance;
|
8 |
|
9 |
public static function init()
|
10 |
+
{
|
11 |
+
if(!self::$instance instanceof self) {
|
12 |
+
self::$instance = new self;
|
13 |
+
}
|
14 |
+
return self::$instance;
|
15 |
+
}
|
16 |
|
17 |
+
function actions_filters()
|
18 |
+
{
|
19 |
if ( is_multisite() ) {
|
20 |
$same_settings = apply_filters( 'anr_same_settings_for_all_sites', false );
|
21 |
} else {
|
28 |
}
|
29 |
|
30 |
add_filter('plugin_action_links', array($this, 'add_settings_link'), 10, 2 );
|
31 |
+
}
|
32 |
|
33 |
|
34 |
|
35 |
/******************************************ADMIN SETTINGS PAGE BEGIN******************************************/
|
36 |
|
37 |
+
function MenuPage()
|
38 |
+
{
|
39 |
//add_menu_page('Advanced noCaptcha reCaptcha', 'Advanced noCaptcha', 'manage_options', 'anr-admin-settings', array($this, 'admin_settings'),plugins_url( 'advanced-nocaptcha-recaptcha/images/advanced-nocaptcha-recaptcha.jpg' ));
|
40 |
|
41 |
//add_submenu_page('anr-admin-settings', 'Advanced noCaptcha reCaptcha - ' .__('Settings','advanced-nocaptcha-recaptcha'), __('Settings','advanced-nocaptcha-recaptcha'), 'manage_options', 'anr-admin-settings', array($this, 'admin_settings'));
|
42 |
|
43 |
//add_submenu_page('anr-admin-settings', 'Advanced noCaptcha reCaptcha - ' .__('Instruction','fepcf'), __('Instruction','fepcf'), 'manage_options', 'anr-instruction', array($this, "InstructionPage"));
|
|
|
|
|
44 |
|
45 |
+
add_options_page( __('Advanced noCaptcha & invisible captcha Settings','advanced-nocaptcha-recaptcha'), __('Advanced noCaptcha & invisible captcha','advanced-nocaptcha-recaptcha'), 'manage_options', 'anr-admin-settings', array($this, 'admin_settings') );
|
46 |
+
|
47 |
+
}
|
48 |
|
49 |
|
50 |
+
function admin_settings()
|
51 |
+
{
|
52 |
$token = wp_create_nonce( 'anr-admin-settings' );
|
53 |
$url = 'https://www.shamimsplugins.com/contact-us/';
|
54 |
$ReviewURL = 'https://wordpress.org/support/plugin/advanced-nocaptcha-recaptcha/reviews/?filter=5#new-post';
|
123 |
|
124 |
|
125 |
if(isset($_POST['anr-admin-settings-submit'])){
|
126 |
+
$errors = $this->admin_settings_action();
|
127 |
+
if(count($errors->get_error_messages())>0){
|
128 |
+
echo'<div id="message" class="error fade"><p>' . implode( '<br />', $errors->get_error_messages() ). '</p></div>';
|
129 |
+
} else {
|
130 |
+
echo'<div id="message" class="updated fade"><p>' .__("Options successfully saved.", 'advanced-nocaptcha-recaptcha'). '</p></div>';
|
131 |
+
}
|
132 |
+
}
|
133 |
echo "<div id='poststuff'>
|
134 |
|
135 |
<div id='post-body' class='metabox-holder columns-2'>
|
137 |
<!-- main content -->
|
138 |
<div id='post-body-content'>
|
139 |
<div class='postbox'><div class='inside'>
|
140 |
+
<h2>".__("Advanced noCaptcha reCaptcha Settings", 'advanced-nocaptcha-recaptcha')."</h2>
|
141 |
<h5>".sprintf(__("If you like this plugin please <a href='%s' target='_blank'>Review in Wordpress.org</a> and give 5 star", 'advanced-nocaptcha-recaptcha'),esc_url($ReviewURL))."</h5>
|
142 |
+
<form method='post' action=''>
|
143 |
+
<table>
|
144 |
+
<thead>
|
145 |
+
<tr><th width = '50%'>".__("Setting", 'advanced-nocaptcha-recaptcha')."</th><th width = '50%'>".__("Value", 'advanced-nocaptcha-recaptcha')."</th></tr>
|
146 |
+
</thead>
|
147 |
+
<tr><td>".__("Site Key", 'advanced-nocaptcha-recaptcha')."<br/><small><a href='https://www.google.com/recaptcha/admin' target='_blank'>Get From Google</a></small></td><td><input type='text' size = '40' name='site_key' value='".esc_attr( anr_get_option('site_key') )."' /></td></tr>
|
148 |
<tr><td>".__("Secret key", 'advanced-nocaptcha-recaptcha')."<br/><small><a href='https://www.google.com/recaptcha/admin' target='_blank'>Get From Google</a></small></td><td><input type='text' size = '40' name='secret_key' value='".esc_attr( anr_get_option('secret_key') )."' /></td></tr>
|
149 |
|
150 |
<tr><td>".__("Language", 'advanced-nocaptcha-recaptcha')."</td><td><select name='language'>";
|
166 |
|
167 |
<option value='normal' ".selected(anr_get_option('size'), 'normal',false).">".__("Normal", 'advanced-nocaptcha-recaptcha')."</option>
|
168 |
<option value='compact' ".selected(anr_get_option('size'), 'compact',false).">".__("Compact", 'advanced-nocaptcha-recaptcha')."</option>
|
169 |
+
<option value='invisible' ".selected(anr_get_option('size'), 'invisible',false).">".__("Invisible", 'advanced-nocaptcha-recaptcha')."</option>
|
170 |
|
171 |
</select>
|
172 |
+
<div class='description'>".__("For invisible captcha set this as Invisible. Make sure to use site key and secret key for invisible captcha", 'advanced-nocaptcha-recaptcha')."</div>
|
173 |
+
</td></tr>
|
174 |
+
|
175 |
+
<tr><td>".__("Badge", 'advanced-nocaptcha-recaptcha')."</td><td><select name='badge'>
|
176 |
|
177 |
<option value='bottomright' ".selected(anr_get_option('badge'), 'bottomright',false).">".__("Bottom Right", 'advanced-nocaptcha-recaptcha')."</option>
|
178 |
<option value='bottomleft' ".selected(anr_get_option('badge'), 'bottomleft',false).">".__("Bottom Left", 'advanced-nocaptcha-recaptcha')."</option>
|
179 |
+
<option value='inline' ".selected(anr_get_option('badge'), 'inline',false).">".__("Inline", 'advanced-nocaptcha-recaptcha')."</option>
|
180 |
|
181 |
</select>
|
182 |
+
<div class='description'>".__("Badge shows for invisible captcha", 'advanced-nocaptcha-recaptcha')."</div>
|
183 |
+
</td></tr>
|
184 |
+
|
185 |
<tr><td>".__("Error Message", 'advanced-nocaptcha-recaptcha')."</td><td><input type='text' size = '40' name='error_message' value='".wp_kses_post( anr_get_option('error_message', '<strong>ERROR</strong>: Please solve Captcha correctly.') )."' /></td></tr>
|
186 |
+
<tr><td>".__("Show login Captcha after how many failed attempts", 'advanced-nocaptcha-recaptcha')."</td><td><input type='number' size = '40' name='failed_login_allow' value='".absint(anr_get_option('failed_login_allow', 0 ))."' /></td></tr>
|
187 |
|
188 |
<tr><td>".__("Show Captcha on", 'advanced-nocaptcha-recaptcha')."</td><td>";
|
189 |
|
207 |
echo "<tr><td colspan='2'><label><input type='checkbox' name='loggedin_hide' value='1' ".checked(anr_get_option('loggedin_hide'), '1', false)." /> ".__("Hide Captcha for logged in users?", 'advanced-nocaptcha-recaptcha')."</label></td></tr>
|
208 |
<tr><td colspan='2'><label><input type='checkbox' name='remove_css' value='1' ".checked(anr_get_option('remove_css'), '1', false)." /> ".__("Remove this plugin's css from login page?", 'advanced-nocaptcha-recaptcha')."<br/><small>".__("This css increase login page width to adjust with Captcha width.", 'advanced-nocaptcha-recaptcha')."</small></label></td></tr>
|
209 |
<tr><td colspan='2'><label><input type='checkbox' name='no_js' value='1' ".checked(anr_get_option('no_js'), '1', false)." /> ".__("Show captcha if javascript disabled?", 'advanced-nocaptcha-recaptcha')."<br/><small>".__("If JavaScript is a requirement for your site, we advise that you do NOT check this.", 'advanced-nocaptcha-recaptcha')."</small></label></td></tr>
|
210 |
+
<tr><td colspan='2'><span><input class='button-primary' type='submit' name='anr-admin-settings-submit' value='".__("Save Options", 'advanced-nocaptcha-recaptcha')."' /></span></td><td><input type='hidden' name='token' value='$token' /></td></tr>
|
211 |
+
</table>
|
212 |
</form>
|
213 |
<ul>".sprintf(__("For paid support pleasse visit <a href='%s' target='_blank'>Advanced noCaptcha reCaptcha</a>", 'advanced-nocaptcha-recaptcha'),esc_url($url))."</ul>
|
214 |
+
</div></div></div>
|
215 |
". $this->anr_admin_sidebar(). "
|
216 |
</div></div>";
|
217 |
}
|
240 |
}
|
241 |
|
242 |
|
243 |
+
function admin_settings_action()
|
244 |
+
{
|
245 |
+
if (isset($_POST['anr-admin-settings-submit']))
|
246 |
+
{
|
247 |
+
$errors = new WP_Error();
|
248 |
+
$options = $_POST;
|
249 |
+
|
250 |
+
if( !current_user_can('manage_options'))
|
251 |
+
$errors->add('noPermission', __('No Permission!', 'advanced-nocaptcha-recaptcha'));
|
252 |
+
|
253 |
+
|
254 |
+
if ( !wp_verify_nonce($options['token'], 'anr-admin-settings'))
|
255 |
$errors->add('invalidToken', __('Sorry, your nonce did not verify!', 'advanced-nocaptcha-recaptcha'));
|
256 |
+
|
257 |
+
$options['site_key'] = isset( $options['site_key'] ) ? sanitize_text_field( $options['site_key'] ) : '';
|
258 |
+
$options['secret_key'] = isset( $options['secret_key'] ) ? sanitize_text_field( $options['secret_key'] ) : '';
|
259 |
+
$options['error_message'] = isset( $options['error_message'] ) ? wp_kses_post( $options['error_message'] ) : '';
|
260 |
+
|
261 |
+
$options = apply_filters('anr_filter_admin_setting_before_save', $options, $errors);
|
262 |
+
//var_dump($options);
|
263 |
+
|
264 |
+
if (count($errors->get_error_codes())==0){
|
265 |
+
anr_update_option( $options );
|
|
|
|
|
|
|
|
|
266 |
}
|
267 |
+
return $errors;
|
268 |
+
}
|
269 |
+
return false;
|
270 |
+
}
|
|
|
271 |
|
272 |
function InstructionPage()
|
273 |
{
|
279 |
<!-- main content -->
|
280 |
<div id="post-body-content">';
|
281 |
|
282 |
+
echo "<div class='postbox'><div class='inside'>
|
283 |
+
<h2>".__("Advanced noCaptcha reCaptcha Setup Instruction", 'advanced-nocaptcha-recaptcha')."</h2>
|
284 |
+
<p><ul>
|
285 |
<li>".sprintf(__("Get your site key and secret key from <a href='%s' target='_blank'>GOOGLE</a> if you do not have already.", 'advanced-nocaptcha-recaptcha'),esc_url('https://www.google.com/recaptcha/admin'))."</li>
|
286 |
<li>".__("Goto SETTINGS page of this plugin and set up as you need. and ENJOY...", 'advanced-nocaptcha-recaptcha')."</li><br/>
|
287 |
|
288 |
<h3>".__("Implement noCaptcha in Contact Form 7", 'advanced-nocaptcha-recaptcha')."</h3><br />
|
289 |
+
<li>".__("To show noCaptcha use ", 'advanced-nocaptcha-recaptcha')."<code>[anr_nocaptcha g-recaptcha-response]</code></li><br />
|
290 |
|
291 |
<h3>".__("Implement noCaptcha in WooCommerce", 'advanced-nocaptcha-recaptcha')."</h3><br />
|
292 |
+
<li>".__("If Login Form, Registration Form, Lost Password Form, Reset Password Form is selected in SETTINGS page of this plugin they will show and verify Captcha in WooCommerce respective forms also.", 'advanced-nocaptcha-recaptcha')."</li><br />
|
293 |
|
294 |
<h3>".__("If you want to implement noCaptcha in any other custom form", 'advanced-nocaptcha-recaptcha')."</h3><br />
|
295 |
+
<li>".__("To show form field use ", 'advanced-nocaptcha-recaptcha')."<code>do_action( 'anr_captcha_form_field' )</code></li>
|
296 |
<li>".__("To verify use ", 'advanced-nocaptcha-recaptcha')."<code>anr_verify_captcha()</code> it will return true on success otherwise false</li><br />
|
297 |
<li>".sprintf(__("For paid support pleasse visit <a href='%s' target='_blank'>Advanced noCaptcha reCaptcha</a>", 'advanced-nocaptcha-recaptcha'),esc_url($url))."</li>
|
298 |
+
</ul></p></div></div></div>
|
299 |
". $this->anr_admin_sidebar(). "
|
300 |
</div></div>";
|
301 |
}
|
advanced-nocaptcha-recaptcha.php
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Advanced noCaptcha & invisible Captcha
|
4 |
-
Plugin URI: https://www.shamimsplugins.com/contact-us/
|
5 |
-
Description: Show noCaptcha or invisible captcha in Comment Form (after Comment textarea before submit button), bbPress, Login, Register, Lost Password, Reset Password. Also can implement in any other form easily.
|
6 |
-
Version: 2.
|
7 |
-
Author: Shamim
|
8 |
-
Author URI: https://www.shamimsplugins.com/contact-us/
|
9 |
-
Text Domain: advanced-nocaptcha-recaptcha
|
10 |
-
License: GPLv2 or later
|
11 |
-
*/
|
12 |
-
//DEFINE
|
13 |
-
define('ANR_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
|
14 |
-
define('ANR_PLUGIN_URL', plugins_url( '/', __FILE__ ) );
|
15 |
-
|
16 |
-
require_once('functions.php');
|
17 |
-
|
18 |
-
|
19 |
-
//ADD ACTIONS
|
20 |
-
|
21 |
-
add_action('after_setup_theme', 'anr_include_require_files');
|
22 |
-
add_action('plugins_loaded', 'anr_translation');
|
23 |
-
//add_action('wp_enqueue_scripts', 'anr_enqueue_scripts');
|
24 |
-
add_action('login_enqueue_scripts', 'anr_login_enqueue_scripts');
|
25 |
-
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Advanced noCaptcha & invisible Captcha
|
4 |
+
Plugin URI: https://www.shamimsplugins.com/contact-us/
|
5 |
+
Description: Show noCaptcha or invisible captcha in Comment Form (after Comment textarea before submit button), bbPress, Login, Register, Lost Password, Reset Password. Also can implement in any other form easily.
|
6 |
+
Version: 2.6
|
7 |
+
Author: Shamim
|
8 |
+
Author URI: https://www.shamimsplugins.com/contact-us/
|
9 |
+
Text Domain: advanced-nocaptcha-recaptcha
|
10 |
+
License: GPLv2 or later
|
11 |
+
*/
|
12 |
+
//DEFINE
|
13 |
+
define('ANR_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
|
14 |
+
define('ANR_PLUGIN_URL', plugins_url( '/', __FILE__ ) );
|
15 |
+
|
16 |
+
require_once('functions.php');
|
17 |
+
|
18 |
+
|
19 |
+
//ADD ACTIONS
|
20 |
+
|
21 |
+
add_action('after_setup_theme', 'anr_include_require_files');
|
22 |
+
add_action('plugins_loaded', 'anr_translation');
|
23 |
+
//add_action('wp_enqueue_scripts', 'anr_enqueue_scripts');
|
24 |
+
add_action('login_enqueue_scripts', 'anr_login_enqueue_scripts');
|
25 |
+
|
anr-captcha-class.php
CHANGED
@@ -4,29 +4,31 @@ if (!class_exists('anr_captcha_class'))
|
|
4 |
{
|
5 |
class anr_captcha_class
|
6 |
{
|
7 |
-
|
8 |
|
9 |
private static $captcha_count = 0;
|
10 |
|
11 |
public static function init()
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
if ( '1' == anr_get_option( 'fep_contact_form' )) {
|
22 |
add_action ('fepcf_message_form_after_content', array($this, 'form_field'), 99);
|
23 |
add_action ('fepcf_action_message_before_send', array($this, 'fepcf_verify'));
|
24 |
}
|
25 |
|
26 |
if ( '1' == anr_get_option( 'login' ) && !defined('XMLRPC_REQUEST')) {
|
27 |
-
add_action ('login_form', array($this, '
|
28 |
-
add_action ('woocommerce_login_form', array($this, '
|
29 |
-
add_filter ('authenticate', array($this, 'login_verify'), 999 );
|
|
|
|
|
30 |
}
|
31 |
|
32 |
if ( '1' == anr_get_option( 'wc_checkout' )) {
|
@@ -36,7 +38,7 @@ if (!class_exists('anr_captcha_class'))
|
|
36 |
|
37 |
if ( '1' == anr_get_option( 'registration' )) {
|
38 |
add_action ('register_form', array($this, 'form_field'), 99);
|
39 |
-
|
40 |
add_filter ('registration_errors', array($this, 'registration_verify'), 10, 3 );
|
41 |
add_filter ('woocommerce_registration_errors', array($this, 'registration_verify'), 10, 3 );
|
42 |
add_action ('woocommerce_checkout_after_order_review', array($this, 'wc_form_field') );
|
@@ -51,12 +53,12 @@ if (!class_exists('anr_captcha_class'))
|
|
51 |
add_action ('lostpassword_form', array($this, 'form_field'), 99);
|
52 |
add_action ('woocommerce_lostpassword_form', array($this, 'form_field'), 99);
|
53 |
//add_action ('allow_password_reset', array($this, 'lostpassword_verify'), 10, 2); //lostpassword_post does not return wp_error( prior WP 4.4 )
|
54 |
-
|
55 |
}
|
56 |
|
57 |
if ( '1' == anr_get_option( 'reset_password' )) {
|
58 |
add_action ('resetpass_form', array($this, 'form_field'), 99);
|
59 |
-
add_action ('
|
60 |
add_filter ('validate_password_reset', array($this, 'reset_password_verify'), 10, 2 );
|
61 |
}
|
62 |
|
@@ -68,11 +70,14 @@ if (!class_exists('anr_captcha_class'))
|
|
68 |
}
|
69 |
add_filter ('preprocess_comment', array($this, 'comment_verify') );
|
70 |
}
|
71 |
-
|
72 |
-
if ( function_exists( '
|
73 |
-
|
74 |
-
|
75 |
-
|
|
|
|
|
|
|
76 |
|
77 |
if ( '1' == anr_get_option( 'bb_new' )) {
|
78 |
add_action ('bbp_theme_before_topic_form_submit_wrapper', array($this, 'form_field'), 99);
|
@@ -83,7 +88,7 @@ if (!class_exists('anr_captcha_class'))
|
|
83 |
add_action ('bbp_theme_before_reply_form_submit_wrapper', array($this, 'form_field'), 99);
|
84 |
add_action ('bbp_new_reply_pre_extras', array($this, 'bb_reply_verify'), 10, 2 );
|
85 |
}
|
86 |
-
|
87 |
|
88 |
function total_captcha()
|
89 |
{
|
@@ -150,40 +155,40 @@ if (!class_exists('anr_captcha_class'))
|
|
150 |
|
151 |
?>
|
152 |
<script type="text/javascript">
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
<?php for ( $num = 1; $num <= $number; $num++ ) { ?>
|
166 |
var anr_captcha_<?php echo $num; ?>;
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
anr_captcha_<?php echo $num; ?> = grecaptcha.render('anr_captcha_field_<?php echo $num; ?>', anr_obj );
|
181 |
<?php } ?>
|
182 |
-
|
183 |
-
|
184 |
<script src="https://www.google.com/recaptcha/api.js?onload=anr_onloadCallback&render=explicit<?php echo esc_js( $lang ); ?>"
|
185 |
-
|
186 |
-
|
187 |
|
188 |
<?php
|
189 |
|
@@ -200,6 +205,53 @@ if (!class_exists('anr_captcha_class'))
|
|
200 |
anr_captcha_form_field( true );
|
201 |
|
202 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
|
204 |
function wc_form_field()
|
205 |
{
|
@@ -263,15 +315,39 @@ if (!class_exists('anr_captcha_class'))
|
|
263 |
}
|
264 |
}
|
265 |
|
266 |
-
function login_verify ( $user )
|
267 |
{
|
268 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
$error_message = anr_get_option( 'error_message' );
|
270 |
return new WP_Error( 'anr_error', $error_message );
|
271 |
}
|
272 |
|
273 |
return $user;
|
274 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
|
276 |
function registration_verify ( $errors, $sanitized_user_login, $user_email )
|
277 |
{
|
@@ -303,8 +379,8 @@ if (!class_exists('anr_captcha_class'))
|
|
303 |
|
304 |
return $result;
|
305 |
}
|
306 |
-
|
307 |
-
|
308 |
{
|
309 |
if ( ! $this->verify() ) {
|
310 |
$error_message = anr_get_option( 'error_message' );
|
@@ -333,33 +409,21 @@ if (!class_exists('anr_captcha_class'))
|
|
333 |
return $commentdata;
|
334 |
}
|
335 |
|
336 |
-
function wpcf7_form_field( $
|
337 |
{
|
338 |
$loggedin_hide = anr_get_option( 'loggedin_hide' );
|
339 |
|
340 |
if ( is_user_logged_in() && $loggedin_hide )
|
341 |
-
return;
|
342 |
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
}
|
347 |
|
348 |
function wpcf7_verify( $result, $tag )
|
349 |
{
|
350 |
-
$tag = new WPCF7_Shortcode( $tag );
|
351 |
-
$name = $tag->name;
|
352 |
-
|
353 |
if ( ! $this->verify() ) {
|
354 |
-
|
355 |
-
$
|
356 |
-
|
357 |
-
if ( method_exists($result, 'invalidate' ) ) { // wpcf7 4.1
|
358 |
-
$result->invalidate( $tag, $error_message );
|
359 |
-
} else {
|
360 |
-
$result['valid'] = false;
|
361 |
-
$result['reason'][$name] = $error_message;
|
362 |
-
}
|
363 |
}
|
364 |
|
365 |
return $result;
|
4 |
{
|
5 |
class anr_captcha_class
|
6 |
{
|
7 |
+
private static $instance;
|
8 |
|
9 |
private static $captcha_count = 0;
|
10 |
|
11 |
public static function init()
|
12 |
+
{
|
13 |
+
if(!self::$instance instanceof self) {
|
14 |
+
self::$instance = new self;
|
15 |
+
}
|
16 |
+
return self::$instance;
|
17 |
+
}
|
18 |
+
|
19 |
+
function actions_filters()
|
20 |
+
{
|
21 |
if ( '1' == anr_get_option( 'fep_contact_form' )) {
|
22 |
add_action ('fepcf_message_form_after_content', array($this, 'form_field'), 99);
|
23 |
add_action ('fepcf_action_message_before_send', array($this, 'fepcf_verify'));
|
24 |
}
|
25 |
|
26 |
if ( '1' == anr_get_option( 'login' ) && !defined('XMLRPC_REQUEST')) {
|
27 |
+
add_action ('login_form', array($this, 'login_form_field'), 99);
|
28 |
+
add_action ('woocommerce_login_form', array($this, 'login_form_field'), 99);
|
29 |
+
add_filter ('authenticate', array($this, 'login_verify'), 999, 3 );
|
30 |
+
|
31 |
+
add_action ('wp_login', array($this, 'clear_data'), 10, 2);
|
32 |
}
|
33 |
|
34 |
if ( '1' == anr_get_option( 'wc_checkout' )) {
|
38 |
|
39 |
if ( '1' == anr_get_option( 'registration' )) {
|
40 |
add_action ('register_form', array($this, 'form_field'), 99);
|
41 |
+
add_action ('woocommerce_register_form', array($this, 'form_field'), 99);
|
42 |
add_filter ('registration_errors', array($this, 'registration_verify'), 10, 3 );
|
43 |
add_filter ('woocommerce_registration_errors', array($this, 'registration_verify'), 10, 3 );
|
44 |
add_action ('woocommerce_checkout_after_order_review', array($this, 'wc_form_field') );
|
53 |
add_action ('lostpassword_form', array($this, 'form_field'), 99);
|
54 |
add_action ('woocommerce_lostpassword_form', array($this, 'form_field'), 99);
|
55 |
//add_action ('allow_password_reset', array($this, 'lostpassword_verify'), 10, 2); //lostpassword_post does not return wp_error( prior WP 4.4 )
|
56 |
+
add_action('lostpassword_post', array($this, 'lostpassword_verify_44'));
|
57 |
}
|
58 |
|
59 |
if ( '1' == anr_get_option( 'reset_password' )) {
|
60 |
add_action ('resetpass_form', array($this, 'form_field'), 99);
|
61 |
+
add_action ('woocommerce_resetpassword_form', array($this, 'form_field'), 99);
|
62 |
add_filter ('validate_password_reset', array($this, 'reset_password_verify'), 10, 2 );
|
63 |
}
|
64 |
|
70 |
}
|
71 |
add_filter ('preprocess_comment', array($this, 'comment_verify') );
|
72 |
}
|
73 |
+
|
74 |
+
if ( function_exists( 'wpcf7_add_form_tag' ) ) {
|
75 |
+
wpcf7_add_form_tag('anr_nocaptcha', array($this, 'wpcf7_form_field'), array( 'name-attr' => true ) );
|
76 |
+
add_filter('wpcf7_validate_anr_nocaptcha', array($this, 'wpcf7_verify'), 10, 2);
|
77 |
+
} elseif( function_exists( 'wpcf7_add_shortcode' ) ){
|
78 |
+
wpcf7_add_shortcode('anr_nocaptcha', array($this, 'wpcf7_form_field'), true);
|
79 |
+
add_filter('wpcf7_validate_anr_nocaptcha', array($this, 'wpcf7_verify'), 10, 2);
|
80 |
+
}
|
81 |
|
82 |
if ( '1' == anr_get_option( 'bb_new' )) {
|
83 |
add_action ('bbp_theme_before_topic_form_submit_wrapper', array($this, 'form_field'), 99);
|
88 |
add_action ('bbp_theme_before_reply_form_submit_wrapper', array($this, 'form_field'), 99);
|
89 |
add_action ('bbp_new_reply_pre_extras', array($this, 'bb_reply_verify'), 10, 2 );
|
90 |
}
|
91 |
+
}
|
92 |
|
93 |
function total_captcha()
|
94 |
{
|
155 |
|
156 |
?>
|
157 |
<script type="text/javascript">
|
158 |
+
var anr_onloadCallback = function() {
|
159 |
+
var anr_obj = {
|
160 |
+
'sitekey' : '<?php echo esc_js( $site_key ); ?>',
|
161 |
+
'size' : '<?php echo esc_js( $size ); ?>',
|
162 |
+
};
|
163 |
+
<?php if( 'invisible' == $size ){
|
164 |
+
wp_enqueue_script( 'jquery' ); ?>
|
165 |
+
anr_obj.badge = '<?php echo esc_js( anr_get_option( 'badge', 'bottomright' ) ); ?>';
|
166 |
+
<?php } else { ?>
|
167 |
+
anr_obj.theme = '<?php echo esc_js( $theme ); ?>';
|
168 |
+
<?php } ?>
|
169 |
+
|
170 |
<?php for ( $num = 1; $num <= $number; $num++ ) { ?>
|
171 |
var anr_captcha_<?php echo $num; ?>;
|
172 |
+
|
173 |
+
<?php if( 'invisible' == $size ){ ?>
|
174 |
+
var anr_form<?php echo $num; ?> = jQuery('#anr_captcha_field_<?php echo $num; ?>').closest('form')[0];
|
175 |
+
anr_obj.callback = function(){ anr_form<?php echo $num; ?>.submit(); };
|
176 |
+
anr_obj["expired-callback"] = function(){ grecaptcha.reset(anr_captcha_<?php echo $num; ?>); };
|
177 |
+
|
178 |
+
anr_form<?php echo $num; ?>.onsubmit = function(evt){
|
179 |
+
evt.preventDefault();
|
180 |
+
//grecaptcha.reset(anr_captcha_<?php echo $num; ?>);
|
181 |
+
grecaptcha.execute(anr_captcha_<?php echo $num; ?>);
|
182 |
+
};
|
183 |
+
<?php } ?>
|
184 |
+
|
185 |
anr_captcha_<?php echo $num; ?> = grecaptcha.render('anr_captcha_field_<?php echo $num; ?>', anr_obj );
|
186 |
<?php } ?>
|
187 |
+
};
|
188 |
+
</script>
|
189 |
<script src="https://www.google.com/recaptcha/api.js?onload=anr_onloadCallback&render=explicit<?php echo esc_js( $lang ); ?>"
|
190 |
+
async defer>
|
191 |
+
</script>
|
192 |
|
193 |
<?php
|
194 |
|
205 |
anr_captcha_form_field( true );
|
206 |
|
207 |
}
|
208 |
+
|
209 |
+
function post_id(){
|
210 |
+
global $wpdb;
|
211 |
+
static $post_id;
|
212 |
+
|
213 |
+
if( ! absint( anr_get_option( 'failed_login_allow' ) ) ){
|
214 |
+
return 0;
|
215 |
+
}
|
216 |
+
if( is_numeric( $post_id ) ){
|
217 |
+
return $post_id;
|
218 |
+
}
|
219 |
+
$post_id = $wpdb->get_var( "SELECT ID FROM $wpdb->posts WHERE post_type = 'anr-post' LIMIT 1");
|
220 |
+
|
221 |
+
if( ! $post_id ){
|
222 |
+
$wpdb->insert( $wpdb->posts, array( 'post_type' => 'anr-post' ) );
|
223 |
+
$post_id = $wpdb->insert_id;
|
224 |
+
}
|
225 |
+
$post_id = absint( $post_id );
|
226 |
+
|
227 |
+
return $post_id;
|
228 |
+
}
|
229 |
+
|
230 |
+
function show_login_captcha(){
|
231 |
+
global $wpdb;
|
232 |
+
|
233 |
+
$show_captcha = true;
|
234 |
+
$ip = $_SERVER['REMOTE_ADDR'];
|
235 |
+
//filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE );
|
236 |
+
$count = absint( anr_get_option( 'failed_login_allow' ) );
|
237 |
+
$post_id = $this->post_id();
|
238 |
+
|
239 |
+
if( $count && $post_id && filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE ) ){
|
240 |
+
$user_logins = $wpdb->get_col( $wpdb->prepare( "SELECT meta_value FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = %s", $post_id, md5( $ip ) ) );
|
241 |
+
|
242 |
+
if( count( $user_logins ) < $count && count( array_unique( $user_logins ) ) <= 1 ){
|
243 |
+
$show_captcha = false;
|
244 |
+
}
|
245 |
+
}
|
246 |
+
|
247 |
+
return $show_captcha;
|
248 |
+
}
|
249 |
+
function login_form_field()
|
250 |
+
{
|
251 |
+
if( $this->show_login_captcha() ){
|
252 |
+
$this->form_field();
|
253 |
+
}
|
254 |
+
}
|
255 |
|
256 |
function wc_form_field()
|
257 |
{
|
315 |
}
|
316 |
}
|
317 |
|
318 |
+
function login_verify ( $user, $username = '', $password = '' )
|
319 |
{
|
320 |
+
global $wpdb;
|
321 |
+
|
322 |
+
$show_captcha = $this->show_login_captcha();
|
323 |
+
|
324 |
+
if ( ! ( $user instanceof WP_User ) ){
|
325 |
+
if( ! $show_captcha && $username && ( $post_id = $this->post_id() ) ){
|
326 |
+
if( is_email( $username ) ){
|
327 |
+
$user_data = get_user_by( 'email', $username );
|
328 |
+
if( $user_data ){
|
329 |
+
$username = $user_data->user_login;
|
330 |
+
}
|
331 |
+
}
|
332 |
+
$wpdb->insert( $wpdb->postmeta, array( 'post_id' => $post_id, 'meta_key' => md5( $_SERVER['REMOTE_ADDR'] ), 'meta_value' => $username ), array( '%d', '%s', '%s' ) );
|
333 |
+
}
|
334 |
+
return $user;
|
335 |
+
}
|
336 |
+
if ( $show_captcha && ! $this->verify() ) {
|
337 |
$error_message = anr_get_option( 'error_message' );
|
338 |
return new WP_Error( 'anr_error', $error_message );
|
339 |
}
|
340 |
|
341 |
return $user;
|
342 |
}
|
343 |
+
|
344 |
+
function clear_data( $user_login, $user ){
|
345 |
+
global $wpdb;
|
346 |
+
|
347 |
+
if( $post_id = $this->post_id() ){
|
348 |
+
$wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE post_id = %d AND ( meta_key = %s OR meta_value = %s )", $post_id, md5( $_SERVER['REMOTE_ADDR'] ), $user_login ) );
|
349 |
+
}
|
350 |
+
}
|
351 |
|
352 |
function registration_verify ( $errors, $sanitized_user_login, $user_email )
|
353 |
{
|
379 |
|
380 |
return $result;
|
381 |
}
|
382 |
+
|
383 |
+
function lostpassword_verify_44( $errors )
|
384 |
{
|
385 |
if ( ! $this->verify() ) {
|
386 |
$error_message = anr_get_option( 'error_message' );
|
409 |
return $commentdata;
|
410 |
}
|
411 |
|
412 |
+
function wpcf7_form_field( $tag )
|
413 |
{
|
414 |
$loggedin_hide = anr_get_option( 'loggedin_hide' );
|
415 |
|
416 |
if ( is_user_logged_in() && $loggedin_hide )
|
417 |
+
return '';
|
418 |
|
419 |
+
return anr_captcha_form_field( false ). sprintf( '<span class="wpcf7-form-control-wrap %s"></span>', $tag->name );
|
|
|
|
|
420 |
}
|
421 |
|
422 |
function wpcf7_verify( $result, $tag )
|
423 |
{
|
|
|
|
|
|
|
424 |
if ( ! $this->verify() ) {
|
425 |
+
$error_message = str_replace(__('<strong>ERROR</strong>: ', 'advanced-nocaptcha-recaptcha'), '', anr_get_option( 'error_message' ));
|
426 |
+
$result->invalidate( $tag, $error_message );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
427 |
}
|
428 |
|
429 |
return $result;
|
functions.php
CHANGED
@@ -1,135 +1,160 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
function anr_get_option( $option, $default = '', $section = 'anr_admin_options' ) {
|
5 |
-
|
6 |
-
if ( is_multisite() ) {
|
7 |
-
$same_settings = apply_filters( 'anr_same_settings_for_all_sites', false );
|
8 |
-
} else {
|
9 |
-
$same_settings = false;
|
10 |
-
}
|
11 |
-
if ( $same_settings ) {
|
12 |
-
$options = get_site_option( $section );
|
13 |
-
} else {
|
14 |
-
$options = get_option( $section );
|
15 |
-
}
|
16 |
-
|
17 |
-
if ( isset( $options[$option] ) ) {
|
18 |
-
return $options[$option];
|
19 |
-
}
|
20 |
-
|
21 |
-
return $default;
|
22 |
-
}
|
23 |
-
|
24 |
-
function
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
function anr_get_option( $option, $default = '', $section = 'anr_admin_options' ) {
|
5 |
+
|
6 |
+
if ( is_multisite() ) {
|
7 |
+
$same_settings = apply_filters( 'anr_same_settings_for_all_sites', false );
|
8 |
+
} else {
|
9 |
+
$same_settings = false;
|
10 |
+
}
|
11 |
+
if ( $same_settings ) {
|
12 |
+
$options = get_site_option( $section );
|
13 |
+
} else {
|
14 |
+
$options = get_option( $section );
|
15 |
+
}
|
16 |
+
|
17 |
+
if ( isset( $options[$option] ) ) {
|
18 |
+
return $options[$option];
|
19 |
+
}
|
20 |
+
|
21 |
+
return $default;
|
22 |
+
}
|
23 |
+
|
24 |
+
function anr_update_option( $options, $value = '', $section = 'anr_admin_options' ) {
|
25 |
+
|
26 |
+
if( $options && ! is_array( $options ) ){
|
27 |
+
$options = array(
|
28 |
+
$options => $value,
|
29 |
+
);
|
30 |
+
}
|
31 |
+
if( ! is_array( $options ) )
|
32 |
+
return false;
|
33 |
+
|
34 |
+
if ( is_multisite() ) {
|
35 |
+
$same_settings = apply_filters( 'anr_same_settings_for_all_sites', false );
|
36 |
+
} else {
|
37 |
+
$same_settings = false;
|
38 |
+
}
|
39 |
+
if ( $same_settings ) {
|
40 |
+
update_site_option( $section, wp_parse_args( $options, get_site_option( $section ) ) );
|
41 |
+
} else {
|
42 |
+
update_option( $section, wp_parse_args( $options, get_option( $section ) ) );
|
43 |
+
}
|
44 |
+
|
45 |
+
return true;
|
46 |
+
}
|
47 |
+
|
48 |
+
function anr_translation()
|
49 |
+
{
|
50 |
+
//SETUP TEXT DOMAIN FOR TRANSLATIONS
|
51 |
+
load_plugin_textdomain('advanced-nocaptcha-recaptcha', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
52 |
+
}
|
53 |
+
|
54 |
+
//Not used since version 2.1
|
55 |
+
function anr_enqueue_scripts()
|
56 |
+
{
|
57 |
+
$language = trim(anr_get_option( 'language' ));
|
58 |
+
|
59 |
+
$lang = "";
|
60 |
+
if ( $language )
|
61 |
+
$lang = "?hl=$language";
|
62 |
+
|
63 |
+
wp_register_script( 'anr-google-recaptcha-script', "https://www.google.com/recaptcha/api.js$lang", array(), '2.0', true );
|
64 |
+
|
65 |
+
}
|
66 |
+
|
67 |
+
function anr_login_enqueue_scripts()
|
68 |
+
{
|
69 |
+
$remove_css = trim(anr_get_option( 'remove_css' ));
|
70 |
+
|
71 |
+
if ( !$remove_css )
|
72 |
+
wp_enqueue_style( 'anr-login-style', ANR_PLUGIN_URL . 'style/style.css' );
|
73 |
+
|
74 |
+
}
|
75 |
+
|
76 |
+
function anr_include_require_files()
|
77 |
+
{
|
78 |
+
if ( is_admin() )
|
79 |
+
{
|
80 |
+
$fep_files = array(
|
81 |
+
'admin' => 'admin/anr-admin-class.php'
|
82 |
+
);
|
83 |
+
|
84 |
+
} else {
|
85 |
+
$fep_files = array(
|
86 |
+
'main' => 'anr-captcha-class.php'
|
87 |
+
);
|
88 |
+
}
|
89 |
+
|
90 |
+
$fep_files = apply_filters('anr_include_files', $fep_files );
|
91 |
+
|
92 |
+
foreach ( $fep_files as $fep_file ) {
|
93 |
+
require_once ( $fep_file );
|
94 |
+
}
|
95 |
+
}
|
96 |
+
add_action('wp_footer', 'anr_wp_footer');
|
97 |
+
add_action('login_footer', 'anr_wp_footer');
|
98 |
+
|
99 |
+
function anr_wp_footer()
|
100 |
+
{
|
101 |
+
anr_captcha_class::init()->footer_script();
|
102 |
+
}
|
103 |
+
|
104 |
+
add_action( 'anr_captcha_form_field', function(){ anr_captcha_form_field( true ); } );
|
105 |
+
add_shortcode( 'anr-captcha', 'anr_captcha_form_field' );
|
106 |
+
|
107 |
+
function anr_captcha_form_field( $echo = false )
|
108 |
+
{
|
109 |
+
|
110 |
+
if ( $echo ) {
|
111 |
+
echo anr_captcha_class::init()->captcha_form_field();
|
112 |
+
} else {
|
113 |
+
return anr_captcha_class::init()->captcha_form_field();
|
114 |
+
}
|
115 |
+
|
116 |
+
}
|
117 |
+
|
118 |
+
function anr_verify_captcha( $response = false )
|
119 |
+
{
|
120 |
+
$secre_key = trim(anr_get_option( 'secret_key' ));
|
121 |
+
$remoteip = $_SERVER["REMOTE_ADDR"];
|
122 |
+
|
123 |
+
if ( !$secre_key ) //if $secre_key is not set
|
124 |
+
return true;
|
125 |
+
|
126 |
+
if( false === $response )
|
127 |
+
$response = isset( $_POST['g-recaptcha-response'] ) ? $_POST['g-recaptcha-response'] : '';
|
128 |
+
|
129 |
+
if ( !$response || !$remoteip )
|
130 |
+
return false;
|
131 |
+
|
132 |
+
$url = "https://www.google.com/recaptcha/api/siteverify";
|
133 |
+
|
134 |
+
// make a POST request to the Google reCAPTCHA Server
|
135 |
+
$request = wp_remote_post( $url, array( 'timeout' => 10, 'body' => array( 'secret' => $secre_key, 'response' => $response, 'remoteip' => $remoteip ) ) );
|
136 |
+
|
137 |
+
if ( is_wp_error( $request ) )
|
138 |
+
return false;
|
139 |
+
|
140 |
+
// get the request response body
|
141 |
+
$request_body = wp_remote_retrieve_body( $request );
|
142 |
+
if ( !$request_body )
|
143 |
+
return false;
|
144 |
+
|
145 |
+
$result = json_decode( $request_body, true );
|
146 |
+
if ( isset($result['success']) && true == $result['success'] )
|
147 |
+
return true;
|
148 |
+
|
149 |
+
return false;
|
150 |
+
}
|
151 |
+
|
152 |
+
add_filter('shake_error_codes', 'anr_add_shake_error_codes' );
|
153 |
+
|
154 |
+
function anr_add_shake_error_codes( $shake_error_codes )
|
155 |
+
{
|
156 |
+
$shake_error_codes[] = 'anr_error';
|
157 |
+
|
158 |
+
return $shake_error_codes;
|
159 |
+
}
|
160 |
+
|
languages/advanced-nocaptcha-recaptcha.pot
CHANGED
@@ -1,7 +1,8 @@
|
|
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Advanced noCaptcha reCaptcha 2.5\n"
|
4 |
-
"POT-Creation-Date: 2018-
|
5 |
"PO-Revision-Date: 2018-04-12 17:20+0600\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: Shamim\n"
|
@@ -9,7 +10,7 @@ msgstr ""
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit 2.0.
|
13 |
"X-Poedit-Basepath: ..\n"
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
"X-Poedit-KeywordsList: __;_e\n"
|
@@ -340,105 +341,110 @@ msgstr ""
|
|
340 |
msgid "Error Message"
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: admin/anr-admin-class.php:
|
|
|
|
|
|
|
|
|
344 |
msgid "Show Captcha on"
|
345 |
msgstr ""
|
346 |
|
347 |
-
#: admin/anr-admin-class.php:
|
348 |
msgid "Hide Captcha for logged in users?"
|
349 |
msgstr ""
|
350 |
|
351 |
-
#: admin/anr-admin-class.php:
|
352 |
msgid "Remove this plugin's css from login page?"
|
353 |
msgstr ""
|
354 |
|
355 |
-
#: admin/anr-admin-class.php:
|
356 |
msgid "This css increase login page width to adjust with Captcha width."
|
357 |
msgstr ""
|
358 |
|
359 |
-
#: admin/anr-admin-class.php:
|
360 |
msgid "Show captcha if javascript disabled?"
|
361 |
msgstr ""
|
362 |
|
363 |
-
#: admin/anr-admin-class.php:
|
364 |
msgid ""
|
365 |
"If JavaScript is a requirement for your site, we advise that you do NOT "
|
366 |
"check this."
|
367 |
msgstr ""
|
368 |
|
369 |
-
#: admin/anr-admin-class.php:
|
370 |
msgid "Save Options"
|
371 |
msgstr ""
|
372 |
|
373 |
-
#: admin/anr-admin-class.php:
|
374 |
#, php-format
|
375 |
msgid ""
|
376 |
"For paid support pleasse visit <a href='%s' target='_blank'>Advanced "
|
377 |
"noCaptcha reCaptcha</a>"
|
378 |
msgstr ""
|
379 |
|
380 |
-
#: admin/anr-admin-class.php:
|
381 |
msgid "Plugin Author"
|
382 |
msgstr ""
|
383 |
|
384 |
-
#: admin/anr-admin-class.php:
|
385 |
msgid "No Permission!"
|
386 |
msgstr ""
|
387 |
|
388 |
-
#: admin/anr-admin-class.php:
|
389 |
msgid "Sorry, your nonce did not verify!"
|
390 |
msgstr ""
|
391 |
|
392 |
-
#: admin/anr-admin-class.php:
|
393 |
msgid "Advanced noCaptcha reCaptcha Setup Instruction"
|
394 |
msgstr ""
|
395 |
|
396 |
-
#: admin/anr-admin-class.php:
|
397 |
#, php-format
|
398 |
msgid ""
|
399 |
"Get your site key and secret key from <a href='%s' target='_blank'>GOOGLE</"
|
400 |
"a> if you do not have already."
|
401 |
msgstr ""
|
402 |
|
403 |
-
#: admin/anr-admin-class.php:
|
404 |
msgid "Goto SETTINGS page of this plugin and set up as you need. and ENJOY..."
|
405 |
msgstr ""
|
406 |
|
407 |
-
#: admin/anr-admin-class.php:
|
408 |
msgid "Implement noCaptcha in Contact Form 7"
|
409 |
msgstr ""
|
410 |
|
411 |
-
#: admin/anr-admin-class.php:
|
412 |
msgid "To show noCaptcha use "
|
413 |
msgstr ""
|
414 |
|
415 |
-
#: admin/anr-admin-class.php:
|
416 |
msgid "Implement noCaptcha in WooCommerce"
|
417 |
msgstr ""
|
418 |
|
419 |
-
#: admin/anr-admin-class.php:
|
420 |
msgid ""
|
421 |
"If Login Form, Registration Form, Lost Password Form, Reset Password Form is "
|
422 |
"selected in SETTINGS page of this plugin they will show and verify Captcha "
|
423 |
"in WooCommerce respective forms also."
|
424 |
msgstr ""
|
425 |
|
426 |
-
#: admin/anr-admin-class.php:
|
427 |
msgid "If you want to implement noCaptcha in any other custom form"
|
428 |
msgstr ""
|
429 |
|
430 |
-
#: admin/anr-admin-class.php:
|
431 |
msgid "To show form field use "
|
432 |
msgstr ""
|
433 |
|
434 |
-
#: admin/anr-admin-class.php:
|
435 |
msgid "To verify use "
|
436 |
msgstr ""
|
437 |
|
438 |
-
#: admin/anr-admin-class.php:
|
439 |
msgid "Settings"
|
440 |
msgstr ""
|
441 |
|
442 |
-
#: anr-captcha-class.php:
|
|
|
443 |
msgid "<strong>ERROR</strong>: "
|
444 |
msgstr ""
|
1 |
+
#, fuzzy
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Advanced noCaptcha reCaptcha 2.5\n"
|
5 |
+
"POT-Creation-Date: 2018-06-25 00:44+0600\n"
|
6 |
"PO-Revision-Date: 2018-04-12 17:20+0600\n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: Shamim\n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Generator: Poedit 2.0.6\n"
|
14 |
"X-Poedit-Basepath: ..\n"
|
15 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
"X-Poedit-KeywordsList: __;_e\n"
|
341 |
msgid "Error Message"
|
342 |
msgstr ""
|
343 |
|
344 |
+
#: admin/anr-admin-class.php:186
|
345 |
+
msgid "Show login Captcha after how many failed attempts"
|
346 |
+
msgstr ""
|
347 |
+
|
348 |
+
#: admin/anr-admin-class.php:188
|
349 |
msgid "Show Captcha on"
|
350 |
msgstr ""
|
351 |
|
352 |
+
#: admin/anr-admin-class.php:207
|
353 |
msgid "Hide Captcha for logged in users?"
|
354 |
msgstr ""
|
355 |
|
356 |
+
#: admin/anr-admin-class.php:208
|
357 |
msgid "Remove this plugin's css from login page?"
|
358 |
msgstr ""
|
359 |
|
360 |
+
#: admin/anr-admin-class.php:208
|
361 |
msgid "This css increase login page width to adjust with Captcha width."
|
362 |
msgstr ""
|
363 |
|
364 |
+
#: admin/anr-admin-class.php:209
|
365 |
msgid "Show captcha if javascript disabled?"
|
366 |
msgstr ""
|
367 |
|
368 |
+
#: admin/anr-admin-class.php:209
|
369 |
msgid ""
|
370 |
"If JavaScript is a requirement for your site, we advise that you do NOT "
|
371 |
"check this."
|
372 |
msgstr ""
|
373 |
|
374 |
+
#: admin/anr-admin-class.php:210
|
375 |
msgid "Save Options"
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: admin/anr-admin-class.php:213 admin/anr-admin-class.php:297
|
379 |
#, php-format
|
380 |
msgid ""
|
381 |
"For paid support pleasse visit <a href='%s' target='_blank'>Advanced "
|
382 |
"noCaptcha reCaptcha</a>"
|
383 |
msgstr ""
|
384 |
|
385 |
+
#: admin/anr-admin-class.php:226
|
386 |
msgid "Plugin Author"
|
387 |
msgstr ""
|
388 |
|
389 |
+
#: admin/anr-admin-class.php:251
|
390 |
msgid "No Permission!"
|
391 |
msgstr ""
|
392 |
|
393 |
+
#: admin/anr-admin-class.php:255
|
394 |
msgid "Sorry, your nonce did not verify!"
|
395 |
msgstr ""
|
396 |
|
397 |
+
#: admin/anr-admin-class.php:283
|
398 |
msgid "Advanced noCaptcha reCaptcha Setup Instruction"
|
399 |
msgstr ""
|
400 |
|
401 |
+
#: admin/anr-admin-class.php:285
|
402 |
#, php-format
|
403 |
msgid ""
|
404 |
"Get your site key and secret key from <a href='%s' target='_blank'>GOOGLE</"
|
405 |
"a> if you do not have already."
|
406 |
msgstr ""
|
407 |
|
408 |
+
#: admin/anr-admin-class.php:286
|
409 |
msgid "Goto SETTINGS page of this plugin and set up as you need. and ENJOY..."
|
410 |
msgstr ""
|
411 |
|
412 |
+
#: admin/anr-admin-class.php:288
|
413 |
msgid "Implement noCaptcha in Contact Form 7"
|
414 |
msgstr ""
|
415 |
|
416 |
+
#: admin/anr-admin-class.php:289
|
417 |
msgid "To show noCaptcha use "
|
418 |
msgstr ""
|
419 |
|
420 |
+
#: admin/anr-admin-class.php:291
|
421 |
msgid "Implement noCaptcha in WooCommerce"
|
422 |
msgstr ""
|
423 |
|
424 |
+
#: admin/anr-admin-class.php:292
|
425 |
msgid ""
|
426 |
"If Login Form, Registration Form, Lost Password Form, Reset Password Form is "
|
427 |
"selected in SETTINGS page of this plugin they will show and verify Captcha "
|
428 |
"in WooCommerce respective forms also."
|
429 |
msgstr ""
|
430 |
|
431 |
+
#: admin/anr-admin-class.php:294
|
432 |
msgid "If you want to implement noCaptcha in any other custom form"
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: admin/anr-admin-class.php:295
|
436 |
msgid "To show form field use "
|
437 |
msgstr ""
|
438 |
|
439 |
+
#: admin/anr-admin-class.php:296
|
440 |
msgid "To verify use "
|
441 |
msgstr ""
|
442 |
|
443 |
+
#: admin/anr-admin-class.php:308
|
444 |
msgid "Settings"
|
445 |
msgstr ""
|
446 |
|
447 |
+
#: anr-captcha-class.php:311 anr-captcha-class.php:366
|
448 |
+
#: anr-captcha-class.php:425
|
449 |
msgid "<strong>ERROR</strong>: "
|
450 |
msgstr ""
|
readme.txt
CHANGED
@@ -1,163 +1,185 @@
|
|
1 |
-
=== Advanced noCaptcha & invisible Captcha ===
|
2 |
-
Contributors: shamim51
|
3 |
-
Tags: recaptcha,nocaptcha,invisible,no captcha,bot,spam,captcha,woocommerce captcha,woocommerce nocaptcha, woocommerce,widget,plugin,sidebar,shortcode,page,posts,comments,google,bbpress,multisite,multiple
|
4 |
-
Donate link: https://www.paypal.me/hasanshamim
|
5 |
-
Requires at least: 4.4
|
6 |
-
Tested up to: 4.9.
|
7 |
-
Stable tag: 2.
|
8 |
-
|
9 |
-
License
|
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 |
* Initial release.
|
1 |
+
=== Advanced noCaptcha & invisible Captcha ===
|
2 |
+
Contributors: shamim51
|
3 |
+
Tags: recaptcha,nocaptcha,invisible,no captcha,bot,spam,captcha,woocommerce captcha,woocommerce nocaptcha, woocommerce,widget,plugin,sidebar,shortcode,page,posts,comments,google,bbpress,multisite,multiple
|
4 |
+
Donate link: https://www.paypal.me/hasanshamim
|
5 |
+
Requires at least: 4.4
|
6 |
+
Tested up to: 4.9.6
|
7 |
+
Stable tag: 2.6
|
8 |
+
Requires PHP: 5.4
|
9 |
+
License: GPLv2 or later
|
10 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
+
|
12 |
+
Show noCaptchan or invisible captcha in Comment (after Comment textarea before submit button), CF7, bbpress, woocommerce, Login, Register, Lost & Reset Password.
|
13 |
+
|
14 |
+
== Description ==
|
15 |
+
|
16 |
+
Show noCaptcha or invisible captcha in Comment Form (after Comment textarea before submit button), Contact Form 7, bbPress, woocommerce, Login, Register, Lost Password, Reset Password. Also can implement in any other form easily.
|
17 |
+
|
18 |
+
* **Allow multiple captcha in same page.**
|
19 |
+
* **Allow conditional login captcha** (you can set after how many failed login attempts login captcha will show)
|
20 |
+
|
21 |
+
= Show noCaptcha on =
|
22 |
+
|
23 |
+
* Comment Form (after Comment textarea before submit button)
|
24 |
+
* WooCommerce
|
25 |
+
* Login
|
26 |
+
* Register
|
27 |
+
* Multisite User Signup
|
28 |
+
* Lost Password
|
29 |
+
* Reset Password
|
30 |
+
* Contact Form 7
|
31 |
+
* FEP Contact Form
|
32 |
+
* bbPress New topic
|
33 |
+
* bbPress reply to topic
|
34 |
+
|
35 |
+
= Options =
|
36 |
+
|
37 |
+
* Language can be changed
|
38 |
+
* Theme can be changed
|
39 |
+
* Size can be changed or set as invisible
|
40 |
+
* Badge location can be changed
|
41 |
+
* Error message can be changed
|
42 |
+
* Option to show/hide captcha for logged in users
|
43 |
+
* Captcha will show if javascript disabled also (optional)
|
44 |
+
|
45 |
+
= Privacy Notices =
|
46 |
+
|
47 |
+
* This plugin send IP address go Google for captcha verification. Please read [Google Privacy Policy](https://policies.google.com/).
|
48 |
+
* If you set "Show login Captcha after how many failed attempts" to more than 0(zero) then user hash from ip address will be stored in database. After successful login, hash of that ip address will be deleted.
|
49 |
+
|
50 |
+
== Installation ==
|
51 |
+
1. Upload "advanced-nocaptcha-recaptcha" to the "/wp-content/plugins/" directory.
|
52 |
+
1. Activate the plugin through the "Plugins" menu in WordPress.
|
53 |
+
1. Go to plugin settings page for setup.
|
54 |
+
|
55 |
+
|
56 |
+
== Frequently Asked Questions ==
|
57 |
+
|
58 |
+
= Can i use this plugin to my language? =
|
59 |
+
Yes. this plugin is translate ready. But If your language is not available you can make one. If you want to help us to translate this plugin to your language you are welcome.
|
60 |
+
|
61 |
+
= Can i show multiple captcha in same page? =
|
62 |
+
Yes. You can show unlimited number of captcha in same page.
|
63 |
+
|
64 |
+
= How to set Invisible captcha? =
|
65 |
+
Make sure to obtain key for invisible captcha from google. Go to Dashboard > Settings > Advanced noCaptcha & invisible captcha > Size ( Set as Invisible )
|
66 |
+
|
67 |
+
= How to set captcha in contact form 7? =
|
68 |
+
To show noCaptcha use [anr_nocaptcha g-recaptcha-response]
|
69 |
+
|
70 |
+
|
71 |
+
== Screenshots ==
|
72 |
+
|
73 |
+
1. Captcha in comment form
|
74 |
+
2. Captcha in Contact Form 7
|
75 |
+
3. Captcha in WooCommerce (multiple in same page)
|
76 |
+
4. Captcha in Login Form
|
77 |
+
5. Captcha in Register Form
|
78 |
+
6. Captcha in Lost Password Form
|
79 |
+
7. Advanced noCaptcha reCaptcha Settings
|
80 |
+
8. Advanced noCaptcha reCaptcha Setup Instruction
|
81 |
+
|
82 |
+
== Changelog ==
|
83 |
+
|
84 |
+
= 2.6 =
|
85 |
+
|
86 |
+
* New: Show captcha after set failed login attempts (may not work if you use ajax based login form, fall back to show always).
|
87 |
+
* Fix: contact form 7 deprecated function use.
|
88 |
+
|
89 |
+
= 2.5 =
|
90 |
+
|
91 |
+
* New: Invisible captcha feature added.
|
92 |
+
* Fix: Show captcha error when login form loaded
|
93 |
+
* Move this plugin settings page under Settings
|
94 |
+
|
95 |
+
= 2.4 =
|
96 |
+
|
97 |
+
* Bug fix: WooCommerce lostpassword corrupted link
|
98 |
+
|
99 |
+
= 2.3 =
|
100 |
+
|
101 |
+
* Comment form captcha issue fixed.
|
102 |
+
* Captcha now wraped in anr_captcha_field div class.
|
103 |
+
* Comment form captcha p tag removed.
|
104 |
+
|
105 |
+
= 2.2 =
|
106 |
+
|
107 |
+
* Security update.
|
108 |
+
* WooCommerce checkout form issue fixed.
|
109 |
+
|
110 |
+
= 2.1 =
|
111 |
+
|
112 |
+
* Captcha in WooCommerce added (WooCommerce Login, Registration, Lost password, Reset password forms).
|
113 |
+
* Allow multiple captcha in same page.
|
114 |
+
* Text domain changed.
|
115 |
+
* Some minor bug fixed.
|
116 |
+
|
117 |
+
= 1.3 =
|
118 |
+
|
119 |
+
* New filter 'anr_same_settings_for_all_sites' added, Now same settings can be used for all sites in Multisite.
|
120 |
+
* Multisite User Signup Form added.
|
121 |
+
* Some bug fixed.
|
122 |
+
|
123 |
+
= 1.2 =
|
124 |
+
|
125 |
+
* Now captcha size can be changed.
|
126 |
+
* bbPress New topic added
|
127 |
+
* bbPress reply to topic added
|
128 |
+
* XMLRPC_REQUEST Check
|
129 |
+
* Some bug fixed.
|
130 |
+
|
131 |
+
= 1.1 =
|
132 |
+
|
133 |
+
* Initial release.
|
134 |
+
|
135 |
+
== Upgrade Notice ==
|
136 |
+
|
137 |
+
= 2.6 =
|
138 |
+
|
139 |
+
* New: Show captcha after set failed login attempts (may not work if you use ajax based login form, fall back to show always).
|
140 |
+
* Fix: contact form 7 deprecated function use.
|
141 |
+
|
142 |
+
= 2.5 =
|
143 |
+
|
144 |
+
* New: Invisible captcha feature added.
|
145 |
+
* Fix: Show captcha error when login form loaded
|
146 |
+
|
147 |
+
= 2.4 =
|
148 |
+
|
149 |
+
* Bug fix: WooCommerce lostpassword corrupted link
|
150 |
+
|
151 |
+
= 2.3 =
|
152 |
+
|
153 |
+
* Comment form captcha issue fixed.
|
154 |
+
* Captcha now wraped in anr_captcha_field div class.
|
155 |
+
* Comment form captcha p tag removed.
|
156 |
+
|
157 |
+
= 2.2 =
|
158 |
+
|
159 |
+
* Security update.
|
160 |
+
* WooCommerce checkout form issue fixed.
|
161 |
+
|
162 |
+
= 2.1 =
|
163 |
+
|
164 |
+
* Captcha in WooCommerce added (WooCommerce Login, Registration, Lost password, Reset password forms).
|
165 |
+
* Allow multiple captcha in same page.
|
166 |
+
* Text domain changed.
|
167 |
+
* Some minor bug fixed.
|
168 |
+
|
169 |
+
= 1.3 =
|
170 |
+
|
171 |
+
* New filter 'anr_same_settings_for_all_sites' added, Now same settings can be used for all sites in Multisite.
|
172 |
+
* Multisite User Signup Form added.
|
173 |
+
* Some bug fix.
|
174 |
+
|
175 |
+
= 1.2 =
|
176 |
+
|
177 |
+
* Now captcha size can be changed.
|
178 |
+
* bbPress New topic added
|
179 |
+
* bbPress reply to topic added
|
180 |
+
* XMLRPC_REQUEST Check
|
181 |
+
* Some bug fix.
|
182 |
+
|
183 |
+
= 1.1 =
|
184 |
+
|
185 |
* Initial release.
|