Advanced noCaptcha & invisible Captcha - Version 5.3

Version Description

  • Fix: Compatibility issue with reCaptcha v3 and CF7 version 5.1 & 5.1.1
Download this release

Release Info

Developer shamim51
Plugin Icon 128x128 Advanced noCaptcha & invisible Captcha
Version 5.3
Comparing to
See all releases

Code changes from version 5.2 to 5.3

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, bbPress, BuddyPress, WooCommerce, CF7, Login, Register, Lost Password, Reset Password. Also can implement in any other form easily.
6
- Version: 5.2
7
  Author: Shamim Hasan
8
  Author URI: https://www.shamimsplugins.com/contact-us/
9
  Text Domain: advanced-nocaptcha-recaptcha
@@ -40,7 +40,7 @@ class ANR {
40
  }
41
 
42
  private function constants() {
43
- define( 'ANR_PLUGIN_VERSION', '5.2' );
44
  define( 'ANR_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
45
  define( 'ANR_PLUGIN_URL', plugins_url( '/', __FILE__ ) );
46
  define( 'ANR_PLUGIN_FILE', __FILE__ );
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, bbPress, BuddyPress, WooCommerce, CF7, Login, Register, Lost Password, Reset Password. Also can implement in any other form easily.
6
+ Version: 5.3
7
  Author: Shamim Hasan
8
  Author URI: https://www.shamimsplugins.com/contact-us/
9
  Text Domain: advanced-nocaptcha-recaptcha
40
  }
41
 
42
  private function constants() {
43
+ define( 'ANR_PLUGIN_VERSION', '5.3' );
44
  define( 'ANR_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
45
  define( 'ANR_PLUGIN_URL', plugins_url( '/', __FILE__ ) );
46
  define( 'ANR_PLUGIN_FILE', __FILE__ );
anr-captcha-class.php CHANGED
@@ -41,7 +41,7 @@ if ( ! class_exists( 'anr_captcha_class' ) ) {
41
  add_filter( 'woocommerce_registration_errors', array( $this, 'wc_registration_verify' ), 10, 3 );
42
  // add_action ('woocommerce_checkout_after_order_review', array($this, 'wc_form_field') );
43
  }
44
-
45
  if ( anr_is_form_enabled( 'bp_register' ) ) {
46
  add_action( 'bp_before_registration_submit_buttons', array( $this, 'bp_form_field' ), 99 );
47
  add_action( 'bp_signup_validate', array( $this, 'bp_registration_verify' ) );
@@ -79,6 +79,10 @@ if ( ! class_exists( 'anr_captcha_class' ) ) {
79
  }
80
 
81
  if ( function_exists( 'wpcf7_add_form_tag' ) ) {
 
 
 
 
82
  wpcf7_add_form_tag( 'anr_nocaptcha', array( $this, 'wpcf7_form_field' ), array( 'name-attr' => true ) );
83
  add_filter( 'wpcf7_validate_anr_nocaptcha', array( $this, 'wpcf7_verify' ), 10, 2 );
84
  } elseif ( function_exists( 'wpcf7_add_shortcode' ) ) {
@@ -506,7 +510,7 @@ if ( ! class_exists( 'anr_captcha_class' ) ) {
506
 
507
  return $errors;
508
  }
509
-
510
  function bp_form_field() {
511
  $loggedin_hide = anr_get_option( 'loggedin_hide' );
512
 
@@ -518,7 +522,7 @@ if ( ! class_exists( 'anr_captcha_class' ) ) {
518
 
519
  anr_captcha_form_field( true );
520
  }
521
-
522
  function bp_registration_verify() {
523
  if ( ! $this->verify() ) {
524
  buddypress()->signup->errors['anr_error'] = anr_get_option( 'error_message' );
@@ -605,7 +609,7 @@ if ( ! class_exists( 'anr_captcha_class' ) ) {
605
  }
606
 
607
  function wc_checkout_verify( $data, $errors ) {
608
- $is_reg_enable = apply_filters( 'woocommerce_checkout_registration_enabled', 'yes' === get_option( 'woocommerce_enable_signup_and_login_from_checkout' ) );
609
  $is_reg_required = apply_filters( 'woocommerce_checkout_registration_required', 'yes' !== get_option( 'woocommerce_enable_guest_checkout' ) );
610
 
611
  if ( ! is_user_logged_in() && $is_reg_enable && anr_is_form_enabled( 'registration' ) && ( $is_reg_required || ! empty( $data['createaccount'] ) ) ) {
41
  add_filter( 'woocommerce_registration_errors', array( $this, 'wc_registration_verify' ), 10, 3 );
42
  // add_action ('woocommerce_checkout_after_order_review', array($this, 'wc_form_field') );
43
  }
44
+
45
  if ( anr_is_form_enabled( 'bp_register' ) ) {
46
  add_action( 'bp_before_registration_submit_buttons', array( $this, 'bp_form_field' ), 99 );
47
  add_action( 'bp_signup_validate', array( $this, 'bp_registration_verify' ) );
79
  }
80
 
81
  if ( function_exists( 'wpcf7_add_form_tag' ) ) {
82
+ $cf7_option = get_option( 'wpcf7' );
83
+ if ( ! is_array( $cf7_option ) || empty( $cf7_option['recaptcha'] ) ) {
84
+ remove_filter( 'wpcf7_form_hidden_fields', 'wpcf7_recaptcha_add_hidden_fields', 100, 1 );
85
+ }
86
  wpcf7_add_form_tag( 'anr_nocaptcha', array( $this, 'wpcf7_form_field' ), array( 'name-attr' => true ) );
87
  add_filter( 'wpcf7_validate_anr_nocaptcha', array( $this, 'wpcf7_verify' ), 10, 2 );
88
  } elseif ( function_exists( 'wpcf7_add_shortcode' ) ) {
510
 
511
  return $errors;
512
  }
513
+
514
  function bp_form_field() {
515
  $loggedin_hide = anr_get_option( 'loggedin_hide' );
516
 
522
 
523
  anr_captcha_form_field( true );
524
  }
525
+
526
  function bp_registration_verify() {
527
  if ( ! $this->verify() ) {
528
  buddypress()->signup->errors['anr_error'] = anr_get_option( 'error_message' );
609
  }
610
 
611
  function wc_checkout_verify( $data, $errors ) {
612
+ $is_reg_enable = apply_filters( 'woocommerce_checkout_registration_enabled', 'yes' === get_option( 'woocommerce_enable_signup_and_login_from_checkout' ) );
613
  $is_reg_required = apply_filters( 'woocommerce_checkout_registration_required', 'yes' !== get_option( 'woocommerce_enable_guest_checkout' ) );
614
 
615
  if ( ! is_user_logged_in() && $is_reg_enable && anr_is_form_enabled( 'registration' ) && ( $is_reg_required || ! empty( $data['createaccount'] ) ) ) {
assets/css/style.css CHANGED
@@ -1,3 +1,3 @@
1
- #login {
2
- width: 350px !important;
3
- }
1
+ #login {
2
+ width: 350px !important;
3
+ }
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Advanced noCaptcha & invisible Captcha (v2 & v3) ===
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,v2,v3
4
- Donate link: https://www.paypal.me/hasanshamim
5
  Requires at least: 4.4
6
  Tested up to: 5.1.1
7
- Stable tag: 5.2
8
  Requires PHP: 5.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -37,11 +37,12 @@ Show noCaptcha or invisible captcha in Comment Form (after Comment textarea befo
37
 
38
  = Options =
39
 
 
40
  * Language can be changed
41
- * Theme can be changed
42
- * Size can be changed or set as invisible
43
- * Badge location can be changed
44
  * Error message can be changed
 
 
 
45
  * Option to show/hide captcha for logged in users
46
  * Captcha will show if javascript disabled also (optional)
47
 
@@ -87,6 +88,10 @@ You can access your file via FTP or file manager and rename "advanced-nocaptcha-
87
 
88
  == Changelog ==
89
 
 
 
 
 
90
  = 5.2 =
91
 
92
  * Now support reCaptcha v3 also
1
  === Advanced noCaptcha & invisible Captcha (v2 & v3) ===
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,v2,v3
4
+ Donate link: https://www.shamimsplugins.com/products/advanced-nocaptcha-and-invisible-captcha-pro/
5
  Requires at least: 4.4
6
  Tested up to: 5.1.1
7
+ Stable tag: 5.3
8
  Requires PHP: 5.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
37
 
38
  = Options =
39
 
40
+ * You can select which version of reCaptcha will be used (v2 I'm not robot checkbox, v2 invisible or v3)
41
  * Language can be changed
 
 
 
42
  * Error message can be changed
43
+ * For v2 I'm not robot: Theme, Size can be changed.
44
+ * For v2 Invisible: Theme, badge location can be changed.
45
+ * For v3: Score and when to load script can be changed
46
  * Option to show/hide captcha for logged in users
47
  * Captcha will show if javascript disabled also (optional)
48
 
88
 
89
  == Changelog ==
90
 
91
+ = 5.3 =
92
+
93
+ * Fix: Compatibility issue with reCaptcha v3 and CF7 version 5.1 & 5.1.1
94
+
95
  = 5.2 =
96
 
97
  * Now support reCaptcha v3 also