WP Armour – Honeypot Anti Spam - Version 1.10

Version Description

  • Fixed Popup Form issue
  • Removed wpa_field_info Ajax call
Download this release

Release Info

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

Code changes from version 1.9.2 to 1.10

includes/js/wpa.js CHANGED
@@ -2,34 +2,21 @@ var wpa_field_name, wpa_unique_id, wpa_add_test, wpa_hidden_field;
2
 
3
  jQuery(document).ready(function(){
4
 
5
- jQuery.ajax({
6
- url: wpa_admin_ajax_url,
7
- data: {'action':'wpa_field_info'},
8
- type: 'GET',
9
- success: function(response){
10
- returnData = JSON.parse(response);
11
- wpa_field_name = returnData.wpa_field_name;
12
- wpa_unique_id = returnData.wpa_field_value;
13
- wpa_add_test = returnData.wpa_add_test;
14
 
15
- wpa_hidden_field = "<span class='wpa_hidden_field' style='display:none;height:0;width:0;'><input type='text' name='"+wpa_field_name+"' value='"+wpa_unique_id+"' /></span>";
16
 
17
- wpa_add_honeypot_field();
18
 
19
- if (typeof wpae_add_honeypot_field == 'function') { // IF EXTENDED version exists.
20
- wpae_add_honeypot_field();
21
- }
22
-
23
- if (wpa_add_test == 'yes'){
24
- wpa_add_test_block();
25
- }
26
- },
27
- error: function(response) {
28
- if (console && console.error) {
29
- console.error('Unable to add WP Armour Anti Spam protection.');
30
- }
31
- }
32
- });
33
 
34
  });
35
 
@@ -60,10 +47,6 @@ function wpa_add_honeypot_field(){
60
  jQuery('form.et_pb_contact_form').append(wpa_hidden_field); // Divi Form
61
  jQuery('form.elementor-form').append(wpa_hidden_field); // FOR Elementor
62
  jQuery('form.form-contribution').append(wpa_hidden_field); //WooCommerce Reviews Pro
63
-
64
-
65
-
66
-
67
 
68
  // FOR FLUENT FORMS
69
  jQuery('form.frm-fluent-form').append(wpa_hidden_field); // FOR Fluent Forms
2
 
3
  jQuery(document).ready(function(){
4
 
5
+ wpa_field_name = wpa_field_info.wpa_field_name;
6
+ wpa_unique_id = wpa_field_info.wpa_field_value;
7
+ wpa_add_test = wpa_field_info.wpa_add_test;
 
 
 
 
 
 
8
 
9
+ wpa_hidden_field = "<span class='wpa_hidden_field' style='display:none;height:0;width:0;'><input type='text' name='"+wpa_field_name+"' value='"+wpa_unique_id+"' /></span>";
10
 
11
+ wpa_add_honeypot_field();
12
 
13
+ if (typeof wpae_add_honeypot_field == 'function') { // IF EXTENDED version exists.
14
+ wpae_add_honeypot_field();
15
+ }
16
+
17
+ if (wpa_add_test == 'yes'){
18
+ wpa_add_test_block();
19
+ }
 
 
 
 
 
 
 
20
 
21
  });
22
 
47
  jQuery('form.et_pb_contact_form').append(wpa_hidden_field); // Divi Form
48
  jQuery('form.elementor-form').append(wpa_hidden_field); // FOR Elementor
49
  jQuery('form.form-contribution').append(wpa_hidden_field); //WooCommerce Reviews Pro
 
 
 
 
50
 
51
  // FOR FLUENT FORMS
52
  jQuery('form.frm-fluent-form').append(wpa_hidden_field); // FOR Fluent Forms
includes/wpa_config.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) exit;
3
- $GLOBALS['wpa_version'] = '1.9.2';
4
  $GLOBALS['wpa_field_name'] = get_option('wpa_field_name');
5
  $GLOBALS['wpa_error_message'] = get_option('wpa_error_message');
6
  $GLOBALS['wpa_disable_test_widget'] = get_option('wpa_disable_test_widget');
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) exit;
3
+ $GLOBALS['wpa_version'] = '1.10';
4
  $GLOBALS['wpa_field_name'] = get_option('wpa_field_name');
5
  $GLOBALS['wpa_error_message'] = get_option('wpa_error_message');
6
  $GLOBALS['wpa_disable_test_widget'] = get_option('wpa_disable_test_widget');
includes/wpa_functions.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) exit;
3
- function wpa_load_scripts(){
4
  wp_enqueue_script( 'wpascript', plugins_url( '/js/wpa.js', __FILE__ ), array ( 'jquery' ), $GLOBALS['wpa_version'], true);
5
- wp_add_inline_script( 'wpascript', 'var wpa_admin_ajax_url = "'.admin_url("admin-ajax.php").'";');
6
  wp_enqueue_style( 'wpa-css', plugins_url( '/css/wpa.css', __FILE__ ), array(), $GLOBALS['wpa_version']);
7
  }
8
 
@@ -136,7 +136,7 @@ function wpa_check_is_spam($form_data){
136
  }
137
  }
138
 
139
- function wpa_field_info_ajax(){
140
  if (current_user_can('activate_plugins') && (get_option('wpa_disable_test_widget') != 'yes')){
141
  $wpa_add_test = 'yes';
142
  } else {
@@ -147,8 +147,7 @@ function wpa_field_info_ajax(){
147
  'wpa_field_name' => $GLOBALS['wpa_field_name'],
148
  'wpa_field_value' => wpa_unqiue_field_value(),
149
  'wpa_add_test' => $wpa_add_test
150
- );
151
 
152
- echo json_encode($return);
153
- wp_die();
154
  }
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) exit;
3
+ function wpa_load_scripts(){
4
  wp_enqueue_script( 'wpascript', plugins_url( '/js/wpa.js', __FILE__ ), array ( 'jquery' ), $GLOBALS['wpa_version'], true);
5
+ wp_add_inline_script( 'wpascript', 'wpa_field_info = '.json_encode(wpa_field_info()));
6
  wp_enqueue_style( 'wpa-css', plugins_url( '/css/wpa.css', __FILE__ ), array(), $GLOBALS['wpa_version']);
7
  }
8
 
136
  }
137
  }
138
 
139
+ function wpa_field_info(){
140
  if (current_user_can('activate_plugins') && (get_option('wpa_disable_test_widget') != 'yes')){
141
  $wpa_add_test = 'yes';
142
  } else {
147
  'wpa_field_name' => $GLOBALS['wpa_field_name'],
148
  'wpa_field_value' => wpa_unqiue_field_value(),
149
  'wpa_add_test' => $wpa_add_test
150
+ );
151
 
152
+ return $return;
 
153
  }
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.9.3
7
- Stable tag: 1.9.2
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -136,6 +136,11 @@ With WP Armour - Honeypot Anti Spam plugin it is No. But if you want you can use
136
 
137
  == Changelog ==
138
 
 
 
 
 
 
139
  = = 1.9.2 =
140
  * Fixed Astra Theme Comment Issue
141
 
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: 6.0
7
+ Stable tag: 1.10
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
136
 
137
  == Changelog ==
138
 
139
+ = = 1.10 =
140
+
141
+ * Fixed Popup Form issue
142
+ * Removed wpa_field_info Ajax call
143
+
144
  = = 1.9.2 =
145
  * Fixed Astra Theme Comment Issue
146
 
wp-armour.php CHANGED
@@ -5,7 +5,7 @@ Plugin Name: WP Armour - Honeypot Anti Spam
5
  Plugin URI: http://wordpress.org/plugins/honeypot/
6
  Description: Add honeypot anti spam protection.
7
  Author: Dnesscarkey
8
- Version: 1.9.2
9
  Author URI: https://dineshkarki.com.np/wp-armour-anti-spam
10
  */
11
 
5
  Plugin URI: http://wordpress.org/plugins/honeypot/
6
  Description: Add honeypot anti spam protection.
7
  Author: Dnesscarkey
8
+ Version: 1.10
9
  Author URI: https://dineshkarki.com.np/wp-armour-anti-spam
10
  */
11