WP Armour – Honeypot Anti Spam - Version 1.5.6

Version Description

  • Fixed Gravity Form Ajax Issue
  • Added anti spam support for Elementor Form Widget
  • Added anti spam support for Fluent Forms.
Download this release

Release Info

Developer dnesscarkey
Plugin Icon 128x128 WP Armour – Honeypot Anti Spam
Version 1.5.6
Comparing to
See all releases

Code changes from version 1.5.5 to 1.5.6

includes/integration/wpa_elementor.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function wpa_elementor_extra_validation( $record, $ajax_handler ) {
3
+ if (!isset($_POST[ $GLOBALS['wpa_field_name']] )){
4
+ $all_fields = $record->get( 'fields' );
5
+ $firstField = array_key_first($all_fields);
6
+ do_action('wpa_handle_spammers','elementor');
7
+ $ajax_handler->add_error($all_fields[$firstField]['id'], $GLOBALS['wpa_error_message']);
8
+ }
9
+ };
10
+ add_action( 'elementor_pro/forms/validation', 'wpa_elementor_extra_validation', 10, 2 );
includes/integration/wpa_fluentform.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function wpa_fluent_form_extra_validation($insertData, $data, $form) {
3
+ if (!isset($data[ $GLOBALS['wpa_field_name']] )){
4
+ do_action('wpa_handle_spammers','fluent_forms');
5
+ die($GLOBALS['wpa_error_message']);
6
+ }
7
+ };
8
+ add_action( 'fluentform_before_insert_submission', 'wpa_fluent_form_extra_validation', 10, 3 );
includes/integration/wpa_gravityforms.php CHANGED
@@ -1,9 +1,19 @@
1
  <?php
2
- add_action( 'gform_pre_submission', 'wpa_gravityforms_extra_validation');
3
 
4
- function wpa_gravityforms_extra_validation($form){
5
  if (!isset($_POST[ $GLOBALS['wpa_field_name']] )){
 
6
  do_action('wpa_handle_spammers','gravityforms');
7
- die($GLOBALS['wpa_error_message']);
 
 
 
 
 
 
 
 
8
  }
 
9
  }
1
  <?php
2
+ add_action( 'gform_validation', 'wpa_gravityforms_extra_validation');
3
 
4
+ function wpa_gravityforms_extra_validation($validation_result ){
5
  if (!isset($_POST[ $GLOBALS['wpa_field_name']] )){
6
+ $form = $validation_result['form'];
7
  do_action('wpa_handle_spammers','gravityforms');
8
+ $validation_result['is_valid'] = false;
9
+ foreach( $form['fields'] as &$field ) {
10
+ if ( $field->id == '1' ) {
11
+ $field->failed_validation = true;
12
+ $field->validation_message = $GLOBALS['wpa_error_message'];
13
+ break;
14
+ }
15
+ }
16
+ $validation_result['form'] = $form;
17
  }
18
+ return $validation_result;
19
  }
includes/js/wpa.js CHANGED
@@ -32,7 +32,10 @@ function wpa_add_honeypot_field(){
32
  jQuery('.wp-block-toolset-cred-form form').append(wpa_hidden_field); // Toolset Forms
33
  jQuery('form.et_pb_contact_form').append(wpa_hidden_field); // Divi Form
34
  jQuery('form.woocommerce-form-register').append(wpa_hidden_field); // WooCommerce Registration
35
- jQuery('form.woocommerce-checkout').append(wpa_hidden_field); // WooCommerce Checkout
 
 
 
36
  }
37
 
38
  function wpa_add_test_block(){
32
  jQuery('.wp-block-toolset-cred-form form').append(wpa_hidden_field); // Toolset Forms
33
  jQuery('form.et_pb_contact_form').append(wpa_hidden_field); // Divi Form
34
  jQuery('form.woocommerce-form-register').append(wpa_hidden_field); // WooCommerce Registration
35
+ jQuery('form.woocommerce-checkout').append(wpa_hidden_field); // WooCommerce Checkout
36
+ jQuery('form.register').append(wpa_hidden_field); // WooCommerce Register (https://wordpress.org/support/topic/error-spamming-or-your-javascript-is-disabled)
37
+ jQuery('form.elementor-form').append(wpa_hidden_field); // FOR Elementor
38
+ jQuery('form.frm-fluent-form').append(wpa_hidden_field); // FOR Fluent Forms
39
  }
40
 
41
  function wpa_add_test_block(){
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: dnesscarkey
3
  Donate link: https://dineshkarki.com.np/wp-armour-anti-spam
4
  Tags: anti spam, spam checker, spam filter, gravity forms, contact form 7
5
  Requires at least: 3.0
6
- Tested up to: 5.5.3
7
- Stable tag: 1.5.5
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -28,6 +28,8 @@ As of now spam bots are unable to handle javascript and we exploit this point to
28
  * For Formidable Forms
29
  * For Caldera Forms
30
  * For Toolset Forms
 
 
31
  * For Divi Theme Contact Form
32
  * For WooCommerce registration and checkout
33
 
@@ -117,6 +119,11 @@ With WP Armour - Honeypot Anti Spam plugin it is No. But if you want you can use
117
 
118
  == Changelog ==
119
 
 
 
 
 
 
120
  = = 1.5.5 =
121
  * Added anti spam support for woocommerce.
122
  * Added anti spam support for divi contact form.
3
  Donate link: https://dineshkarki.com.np/wp-armour-anti-spam
4
  Tags: anti spam, spam checker, spam filter, gravity forms, contact form 7
5
  Requires at least: 3.0
6
+ Tested up to: 5.6
7
+ Stable tag: 1.5.6
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
28
  * For Formidable Forms
29
  * For Caldera Forms
30
  * For Toolset Forms
31
+ * For Elementor Forms
32
+ * For Fluent Forms
33
  * For Divi Theme Contact Form
34
  * For WooCommerce registration and checkout
35
 
119
 
120
  == Changelog ==
121
 
122
+ = = 1.5.6 =
123
+ * Fixed Gravity Form Ajax Issue
124
+ * Added anti spam support for Elementor Form Widget
125
+ * Added anti spam support for Fluent Forms.
126
+
127
  = = 1.5.5 =
128
  * Added anti spam support for woocommerce.
129
  * Added anti spam support for divi contact form.
wp-armour.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP Armour - Honeypot Anti Spam
4
  Plugin URI: http://wordpress.org/plugins/honeypot/
5
  Description: Add honeypot anti spam protection.
6
  Author: Dnesscarkey
7
- Version: 1.5.5
8
  Author URI: https://dineshkarki.com.np/wp-armour-anti-spam
9
  */
10
 
@@ -27,8 +27,11 @@ add_action( 'init', function(){
27
  include 'includes/integration/wpa_diviform.php';
28
  include 'includes/integration/wpa_woocommerce.php';
29
  }
 
 
30
  });
31
 
 
32
  add_action('wp_enqueue_scripts','wpa_load_scripts');
33
  add_action('login_enqueue_scripts','wpa_load_scripts');
34
  add_action('admin_menu', 'wpa_plugin_menu');
4
  Plugin URI: http://wordpress.org/plugins/honeypot/
5
  Description: Add honeypot anti spam protection.
6
  Author: Dnesscarkey
7
+ Version: 1.5.6
8
  Author URI: https://dineshkarki.com.np/wp-armour-anti-spam
9
  */
10
 
27
  include 'includes/integration/wpa_diviform.php';
28
  include 'includes/integration/wpa_woocommerce.php';
29
  }
30
+ include 'includes/integration/wpa_fluentform.php';
31
+ include 'includes/integration/wpa_elementor.php';
32
  });
33
 
34
+
35
  add_action('wp_enqueue_scripts','wpa_load_scripts');
36
  add_action('login_enqueue_scripts','wpa_load_scripts');
37
  add_action('admin_menu', 'wpa_plugin_menu');