Version Description
- Sometimes fatal error if is_admin return true in front-end.
- Do not show captcha in checkout if not checked for checkout.
Download this release
Release Info
Developer | shamim51 |
Plugin | Advanced noCaptcha & invisible Captcha |
Version | 3.1 |
Comparing to | |
See all releases |
Code changes from version 2.8 to 3.1
- advanced-nocaptcha-recaptcha.php +1 -1
- anr-captcha-class.php +17 -4
- functions.php +6 -11
- languages/advanced-nocaptcha-recaptcha.pot +16 -16
- readme.txt +7 -2
advanced-nocaptcha-recaptcha.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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:
|
7 |
Author: Shamim Hasan
|
8 |
Author URI: https://www.shamimsplugins.com/contact-us/
|
9 |
Text Domain: advanced-nocaptcha-recaptcha
|
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: 3.1
|
7 |
Author: Shamim Hasan
|
8 |
Author URI: https://www.shamimsplugins.com/contact-us/
|
9 |
Text Domain: advanced-nocaptcha-recaptcha
|
anr-captcha-class.php
CHANGED
@@ -41,8 +41,8 @@ if (!class_exists('anr_captcha_class'))
|
|
41 |
add_action ('register_form', array($this, 'form_field'), 99);
|
42 |
add_action ('woocommerce_register_form', array($this, 'form_field'), 99);
|
43 |
add_filter ('registration_errors', array($this, 'registration_verify'), 10, 3 );
|
44 |
-
add_filter ('woocommerce_registration_errors', array($this, '
|
45 |
-
add_action ('woocommerce_checkout_after_order_review', array($this, 'wc_form_field') );
|
46 |
}
|
47 |
|
48 |
if ( '1' == anr_get_option( 'ms_user_signup' )) {
|
@@ -371,6 +371,18 @@ if (!class_exists('anr_captcha_class'))
|
|
371 |
|
372 |
return $errors;
|
373 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
374 |
|
375 |
function ms_form_field_verify( $result )
|
376 |
|
@@ -462,8 +474,9 @@ if (!class_exists('anr_captcha_class'))
|
|
462 |
|
463 |
function wc_checkout_verify()
|
464 |
{
|
|
|
465 |
|
466 |
-
if( ! is_user_logged_in() &&
|
467 |
// verification done during ragistration, So no need any more verification
|
468 |
|
469 |
} elseif( ! $this->verify() ){
|
@@ -477,5 +490,5 @@ if (!class_exists('anr_captcha_class'))
|
|
477 |
} //END CLASS
|
478 |
} //ENDIF
|
479 |
|
480 |
-
add_action('init', array(anr_captcha_class::init(), 'actions_filters'));
|
481 |
|
41 |
add_action ('register_form', array($this, 'form_field'), 99);
|
42 |
add_action ('woocommerce_register_form', array($this, 'form_field'), 99);
|
43 |
add_filter ('registration_errors', array($this, 'registration_verify'), 10, 3 );
|
44 |
+
add_filter ('woocommerce_registration_errors', array($this, 'wc_registration_verify'), 10, 3 );
|
45 |
+
//add_action ('woocommerce_checkout_after_order_review', array($this, 'wc_form_field') );
|
46 |
}
|
47 |
|
48 |
if ( '1' == anr_get_option( 'ms_user_signup' )) {
|
371 |
|
372 |
return $errors;
|
373 |
}
|
374 |
+
|
375 |
+
function wc_registration_verify ( $errors, $sanitized_user_login, $user_email ){
|
376 |
+
if ( defined( 'WOOCOMMERCE_CHECKOUT' ) && ! anr_get_option( 'wc_checkout' ) ) {
|
377 |
+
return $errors;
|
378 |
+
}
|
379 |
+
if ( ! $this->verify() ) {
|
380 |
+
$error_message = anr_get_option( 'error_message' );
|
381 |
+
$errors->add( 'anr_error', $error_message );
|
382 |
+
}
|
383 |
+
|
384 |
+
return $errors;
|
385 |
+
}
|
386 |
|
387 |
function ms_form_field_verify( $result )
|
388 |
|
474 |
|
475 |
function wc_checkout_verify()
|
476 |
{
|
477 |
+
$is_reg_enable = apply_filters( 'woocommerce_checkout_registration_enabled', 'yes' === get_option( 'woocommerce_enable_signup_and_login_from_checkout' ) );
|
478 |
|
479 |
+
if( ! is_user_logged_in() && $is_reg_enable && '1' == anr_get_option( 'registration' ) ){
|
480 |
// verification done during ragistration, So no need any more verification
|
481 |
|
482 |
} elseif( ! $this->verify() ){
|
490 |
} //END CLASS
|
491 |
} //ENDIF
|
492 |
|
493 |
+
add_action('init', array(anr_captcha_class::init(), 'actions_filters'), -99 );
|
494 |
|
functions.php
CHANGED
@@ -75,17 +75,12 @@ function anr_login_enqueue_scripts()
|
|
75 |
|
76 |
function anr_include_require_files()
|
77 |
{
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
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 |
|
75 |
|
76 |
function anr_include_require_files()
|
77 |
{
|
78 |
+
$fep_files = array(
|
79 |
+
'main' => 'anr-captcha-class.php'
|
80 |
+
);
|
81 |
+
if ( is_admin() ) {
|
82 |
+
$fep_files['admin'] = 'admin/anr-admin-class.php';
|
83 |
+
}
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
$fep_files = apply_filters('anr_include_files', $fep_files );
|
86 |
|
languages/advanced-nocaptcha-recaptcha.pot
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
#, fuzzy
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
-
"Project-Id-Version: Advanced noCaptcha reCaptcha
|
5 |
-
"POT-Creation-Date: 2018-
|
6 |
"PO-Revision-Date: 2018-04-12 17:20+0600\n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: Shamim\n"
|
@@ -375,7 +375,7 @@ msgstr ""
|
|
375 |
msgid "Save Options"
|
376 |
msgstr ""
|
377 |
|
378 |
-
#: admin/anr-admin-class.php:213 admin/anr-admin-class.php:
|
379 |
#, php-format
|
380 |
msgid ""
|
381 |
"For paid support pleasse visit <a href='%s' target='_blank'>Advanced "
|
@@ -394,57 +394,57 @@ msgstr ""
|
|
394 |
msgid "Sorry, your nonce did not verify!"
|
395 |
msgstr ""
|
396 |
|
397 |
-
#: admin/anr-admin-class.php:
|
398 |
msgid "Advanced noCaptcha reCaptcha Setup Instruction"
|
399 |
msgstr ""
|
400 |
|
401 |
-
#: admin/anr-admin-class.php:
|
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:
|
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:
|
413 |
msgid "Implement noCaptcha in Contact Form 7"
|
414 |
msgstr ""
|
415 |
|
416 |
-
#: admin/anr-admin-class.php:
|
417 |
msgid "To show noCaptcha use "
|
418 |
msgstr ""
|
419 |
|
420 |
-
#: admin/anr-admin-class.php:
|
421 |
msgid "Implement noCaptcha in WooCommerce"
|
422 |
msgstr ""
|
423 |
|
424 |
-
#: admin/anr-admin-class.php:
|
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:
|
432 |
msgid "If you want to implement noCaptcha in any other custom form"
|
433 |
msgstr ""
|
434 |
|
435 |
-
#: admin/anr-admin-class.php:
|
436 |
msgid "To show form field use "
|
437 |
msgstr ""
|
438 |
|
439 |
-
#: admin/anr-admin-class.php:
|
440 |
msgid "To verify use "
|
441 |
msgstr ""
|
442 |
|
443 |
-
#: admin/anr-admin-class.php:
|
444 |
msgid "Settings"
|
445 |
msgstr ""
|
446 |
|
447 |
-
#: anr-captcha-class.php:
|
448 |
-
#: anr-captcha-class.php:
|
449 |
msgid "<strong>ERROR</strong>: "
|
450 |
msgstr ""
|
1 |
#, fuzzy
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
+
"Project-Id-Version: Advanced noCaptcha reCaptcha 3.1\n"
|
5 |
+
"POT-Creation-Date: 2018-12-15 19:18+0600\n"
|
6 |
"PO-Revision-Date: 2018-04-12 17:20+0600\n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: Shamim\n"
|
375 |
msgid "Save Options"
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: admin/anr-admin-class.php:213 admin/anr-admin-class.php:303
|
379 |
#, php-format
|
380 |
msgid ""
|
381 |
"For paid support pleasse visit <a href='%s' target='_blank'>Advanced "
|
394 |
msgid "Sorry, your nonce did not verify!"
|
395 |
msgstr ""
|
396 |
|
397 |
+
#: admin/anr-admin-class.php:289
|
398 |
msgid "Advanced noCaptcha reCaptcha Setup Instruction"
|
399 |
msgstr ""
|
400 |
|
401 |
+
#: admin/anr-admin-class.php:291
|
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:292
|
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:294
|
413 |
msgid "Implement noCaptcha in Contact Form 7"
|
414 |
msgstr ""
|
415 |
|
416 |
+
#: admin/anr-admin-class.php:295
|
417 |
msgid "To show noCaptcha use "
|
418 |
msgstr ""
|
419 |
|
420 |
+
#: admin/anr-admin-class.php:297
|
421 |
msgid "Implement noCaptcha in WooCommerce"
|
422 |
msgstr ""
|
423 |
|
424 |
+
#: admin/anr-admin-class.php:298
|
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:300
|
432 |
msgid "If you want to implement noCaptcha in any other custom form"
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: admin/anr-admin-class.php:301
|
436 |
msgid "To show form field use "
|
437 |
msgstr ""
|
438 |
|
439 |
+
#: admin/anr-admin-class.php:302
|
440 |
msgid "To verify use "
|
441 |
msgstr ""
|
442 |
|
443 |
+
#: admin/anr-admin-class.php:314
|
444 |
msgid "Settings"
|
445 |
msgstr ""
|
446 |
|
447 |
+
#: anr-captcha-class.php:324 anr-captcha-class.php:391
|
448 |
+
#: anr-captcha-class.php:450
|
449 |
msgid "<strong>ERROR</strong>: "
|
450 |
msgstr ""
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ 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:
|
7 |
-
Stable tag:
|
8 |
Requires PHP: 5.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -81,6 +81,11 @@ To show noCaptcha use [anr_nocaptcha g-recaptcha-response]
|
|
81 |
|
82 |
== Changelog ==
|
83 |
|
|
|
|
|
|
|
|
|
|
|
84 |
= 2.8 =
|
85 |
|
86 |
* Now show captcha when use wp_login_form() function to create login form.
|
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: 5.0.1
|
7 |
+
Stable tag: 3.1
|
8 |
Requires PHP: 5.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
81 |
|
82 |
== Changelog ==
|
83 |
|
84 |
+
= 3.1 =
|
85 |
+
|
86 |
+
* Sometimes fatal error if is_admin return true in front-end.
|
87 |
+
* Do not show captcha in checkout if not checked for checkout.
|
88 |
+
|
89 |
= 2.8 =
|
90 |
|
91 |
* Now show captcha when use wp_login_form() function to create login form.
|