WP Armour – Honeypot Anti Spam - Version 1.5.3

Version Description

  • Added anti spam support for Toolset Forms.
  • Fixed Caldera Forms anti spam message issue in Admin.
Download this release

Release Info

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

Code changes from version 1.5.2 to 1.5.3

includes/integration/wpa_toolsetform.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ add_filter('cred_form_validate','wpa_toolsetform_extra_validation',20,2);
3
+
4
+ function wpa_toolsetform_extra_validation($error_fields, $form_data)
5
+ {
6
+ list($fields,$errors)=$error_fields;
7
+ if (!isset($_POST[ $GLOBALS['wpa_field_name']] )){
8
+ do_action('wpa_handle_spammers','toolset_form');
9
+ die($GLOBALS['wpa_error_message']);
10
+ }
11
+ return array($fields,$errors);
12
+ }
includes/integration/wpa_wpcomment.php CHANGED
@@ -1,8 +1,6 @@
1
  <?php
2
  // WP Comments
3
- if( !is_admin() ){ // IF NOT ADMIN
4
- add_filter( 'preprocess_comment', 'wpa_wpcomment_extra_validation' );
5
- }
6
 
7
  function wpa_wpcomment_extra_validation( $commentdata ) {
8
  if (!isset($_POST[ $GLOBALS['wpa_field_name']] )){
1
  <?php
2
  // WP Comments
3
+ add_filter( 'preprocess_comment', 'wpa_wpcomment_extra_validation' );
 
 
4
 
5
  function wpa_wpcomment_extra_validation( $commentdata ) {
6
  if (!isset($_POST[ $GLOBALS['wpa_field_name']] )){
includes/integration/wpa_wpregistration.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
2
- add_filter( 'registration_errors', 'hp_wpregistration_extra_validation', 10, 3 );
3
 
4
- function hp_wpregistration_extra_validation( $errors, $sanitized_user_login, $user_email ) {
5
- if (!isset($_POST[ $GLOBALS['honeypot_field_name']] )){
6
- do_action('hp_handle_spammers','wpregistration');
7
- $errors->add( 'hp_extra_email', __($GLOBALS['honeypot_error_message']) );
8
  }
9
  return $errors;
10
  }
1
  <?php
2
+ add_filter( 'registration_errors', 'wpa_wpregistration_extra_validation', 10, 3 );
3
 
4
+ function wpa_wpregistration_extra_validation( $errors, $sanitized_user_login, $user_email ) {
5
+ if (!isset($_POST[ $GLOBALS['wpa_field_name']] )){
6
+ do_action('wpa_handle_spammers','wpregistration');
7
+ $errors->add( 'wpa_extra_email', __($GLOBALS['wpa_error_message']) );
8
  }
9
  return $errors;
10
  }
includes/js/wpa.js CHANGED
@@ -30,10 +30,11 @@ function wpa_add_honeypot_field(){
30
  jQuery('.gform_wrapper form').append(wpa_hidden_field); // GRAVITY FORMS
31
  jQuery('.frm_forms form').append(wpa_hidden_field); // Formidible forms
32
  jQuery('.caldera-grid form').append(wpa_hidden_field); // Caldera forms
 
33
  }
34
 
35
  function wpa_add_test_block(){
36
- checkingTest = '<div class="wpa-test-msg"><strong>WP Armour ( Only visible for Site Administrator, Not visible for others )</strong><br />This form has honeypot trap enabled. If you want to act as spam bot for testing. Please click the button below. <br/><span class="wpa-button" onclick="wpa_act_as_spam()" data-actiontype="remove">Act as Spam Bot</span></div>';
37
  jQuery('span.wpa_hidden_field').after(checkingTest);
38
  }
39
 
30
  jQuery('.gform_wrapper form').append(wpa_hidden_field); // GRAVITY FORMS
31
  jQuery('.frm_forms form').append(wpa_hidden_field); // Formidible forms
32
  jQuery('.caldera-grid form').append(wpa_hidden_field); // Caldera forms
33
+ jQuery('.wp-block-toolset-cred-form form').append(wpa_hidden_field); // Toolset Forms
34
  }
35
 
36
  function wpa_add_test_block(){
37
+ checkingTest = '<div class="wpa-test-msg"><strong>WP Armour ( Only visible to site administrators. Not visible to other users. )</strong><br />This form has a honeypot trap enabled. If you want to act as spam bot for testing purposes, please click the button below.<br/><span class="wpa-button" onclick="wpa_act_as_spam()" data-actiontype="remove">Act as Spam Bot</span></div>';
38
  jQuery('span.wpa_hidden_field').after(checkingTest);
39
  }
40
 
includes/views/wpa_extended_version.php CHANGED
@@ -1,13 +1,13 @@
1
  <style type="text/css">
2
  .why_extended{padding: 10px; font-size: 14px;}
3
- .why_extended ul li{ padding-bottom: 20px; width: 285px; float: left; margin:10px 20px 10px 0px;border: 1px solid #d0d0d0; background: #d8d8d8; height: 110px; border-radius: 5px; padding: 10px; line-height: 1.5;}
4
  .why_extended ul label{display: block;padding-bottom: 10px; font-size: 15px; color: #000; font-weight: 500;}
5
  </style>
6
  <div class="why_extended">
7
  <h3>Extra Tools that WP Armour Extended offers to make WP Armour more powerfull.</h3>
8
  <ul>
9
  <li><label>Record Spammer IP</label>
10
- Can record Spammer IPs. Usefull if you want them to block for further submission.
11
  </li>
12
 
13
  <li><label>View Spam Submission</label>
@@ -19,13 +19,13 @@
19
  </li>
20
 
21
  <li><label>Get HoneyPot Extended Now !</label>
22
- Get WP Armour Extended and make WP Armour more powerfull.
23
  <br/>
24
  <a href="https://bit.ly/2CdkfqR" target="_blank" class="button" style="float: right;">GET IT NOW</a>
25
  </li>
26
 
27
  <li><label>Don't need WP Armour Extended Tools ?</label>
28
- In long run Spam bot learns to bypass the protection. So implementing new method is must. You can motivate us using the WP Armour Extended.
29
  </li>
30
 
31
 
1
  <style type="text/css">
2
  .why_extended{padding: 10px; font-size: 14px;}
3
+ .why_extended ul li{ padding-bottom: 20px; width: 285px; float: left; margin:10px 20px 10px 0px;border: 1px solid #d0d0d0; background: #d8d8d8; height: 150px; border-radius: 5px; padding: 10px; line-height: 1.5;}
4
  .why_extended ul label{display: block;padding-bottom: 10px; font-size: 15px; color: #000; font-weight: 500;}
5
  </style>
6
  <div class="why_extended">
7
  <h3>Extra Tools that WP Armour Extended offers to make WP Armour more powerfull.</h3>
8
  <ul>
9
  <li><label>Record Spammer IP</label>
10
+ Record spammers' IPs to block them from future submissions.
11
  </li>
12
 
13
  <li><label>View Spam Submission</label>
19
  </li>
20
 
21
  <li><label>Get HoneyPot Extended Now !</label>
22
+ Get WP Armour Extended and make WP Armour more powerful.
23
  <br/>
24
  <a href="https://bit.ly/2CdkfqR" target="_blank" class="button" style="float: right;">GET IT NOW</a>
25
  </li>
26
 
27
  <li><label>Don't need WP Armour Extended Tools ?</label>
28
+ In the long run, spam bots learn how to bypass antispam systems. Staying on top of new methodologies is key. You can motivate us to continue development of the plugin by getting a license for the WP Armour Extended.
29
  </li>
30
 
31
 
includes/views/wpa_notice.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ add_action('admin_notices', 'wpa_reviews_notice');
3
+ if (isset($_GET['wpa_reviews_notice_hide']) == 1){
4
+ update_option('wpa_reviews_notice_hide','yes');
5
+ }
6
+
7
+ function wpa_reviews_notice(){
8
+ if (get_option('wpa_reviews_notice_hide') != 'yes'){
9
+ $installedDate = strtotime(get_option('wpa_installed_date'));
10
+ $todayDate = time();
11
+ $installedDays = round(($todayDate - $installedDate) / (60 * 60 * 24));
12
+ $wpa_stats = json_decode(get_option('wpa_stats'),true);
13
+ $all_spam_blocked = $wpa_stats['total']['all_time'];
14
+
15
+
16
+ if ($installedDays > 30 && $all_spam_blocked > 30){
17
+ echo '<div class="updated success" style="padding:10px; font-size:16px; line-height:1.6;color:#205225;">
18
+ Hey, WP Armour Anti Spam has blocked <strong>'.$all_spam_blocked.'</strong> spam submissions till date - that’s awesome! Could you please do us a BIG favor and give it a 5-star rating on WordPress ? Just to help us spread the word and boost our motivation.<br/>
19
+
20
+ <ul style="padding-left:50px;list-style-type: square;">
21
+ <li><a href="https://wordpress.org/support/plugin/honeypot/reviews/?filter=5" target="_blank">Ok, you deserve it</a></li>
22
+ <li><a href="https://dineshkarki.com.np/contact" target="_blank">I still have problem !!</a></li>
23
+ <li><a href="?wpa_reviews_notice_hide=1">I already did</a></li>
24
+ <li><a href="?wpa_reviews_notice_hide=1">Hide this message</a></li>
25
+ </ul>
26
+
27
+ </div>';
28
+ }
29
+ }
30
+ }
includes/views/wpa_settings.php CHANGED
@@ -7,7 +7,7 @@
7
  </thead>
8
  <tbody>
9
  <tr>
10
- <td colspan="2"><strong>There is no much settings to mess with. This plugin should work fine with default settings.</strong></td>
11
  </tr>
12
 
13
  <form method="post" action="">
@@ -15,7 +15,7 @@
15
  <td width="250">Honey Pot Field Name</td>
16
  <td>
17
  <input name="wpa_field_name" style="width:300px;" value="<?php echo get_option('wpa_field_name');?>" type="text" /><br/>
18
- <em>Changing the field name regularly is a good idea. Should definately do if you are getting spam.</em>
19
  </td>
20
  </tr>
21
  <tr>
7
  </thead>
8
  <tbody>
9
  <tr>
10
+ <td colspan="2"><strong>This plugin should work with default settings, however if you begin to get spam, update the field name below.</strong></td>
11
  </tr>
12
 
13
  <form method="post" action="">
15
  <td width="250">Honey Pot Field Name</td>
16
  <td>
17
  <input name="wpa_field_name" style="width:300px;" value="<?php echo get_option('wpa_field_name');?>" type="text" /><br/>
18
+ <em>Changing the field name regularly is a good idea. Please do it if you are getting spam.</em>
19
  </td>
20
  </tr>
21
  <tr>
includes/views/wpa_stats.php CHANGED
@@ -67,7 +67,7 @@ $monthDate = $currentStats['total']['month']['date'];
67
 
68
  var options = {
69
  chart: {
70
- title: 'Spams Blocked By WP Armour',
71
  hAxis: {title: 'Source', titleTextStyle: {color: 'red'}},
72
 
73
  },
67
 
68
  var options = {
69
  chart: {
70
+ title: 'Spam blocked by WP Armour',
71
  hAxis: {title: 'Source', titleTextStyle: {color: 'red'}},
72
 
73
  },
readme.txt CHANGED
@@ -2,15 +2,15 @@
2
  Contributors: dnesscarkey
3
  Tags: anti spam, spam checker, spam filter, gravity forms, contact form 7
4
  Requires at least: 3.0
5
- Tested up to: 5.5
6
- Stable tag: 1.5.2
7
  License: GPLv2 or later
8
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
9
 
10
  Anti spam filter that blocks spam bots including russian spam in Contact Form 7, Gravity Forms, Ninja Forms, Formidable Forms, Comments, Registration and more..
11
 
12
  == Description ==
13
- This plugins block spammer submissions using honeypot technic. No Captcha or extra verification field hassle to the users. Only lets spam bots to suffer using our spam filter.
14
 
15
  <strong>What is honeypot anti spam ? </strong>
16
  As of now spam bots are unable to handle javascript and we exploit this point to add an extra fields to your forms using javascript as anti spam checker. Since spam bots are not able to see that field, we check if that field exists or not. If that field doesn't exists we will block spam submission.
@@ -26,6 +26,7 @@ As of now spam bots are unable to handle javascript and we exploit this point to
26
  * For WPForms
27
  * For Formidable Forms
28
  * For Caldera Forms
 
29
 
30
  <strong>How our plugin is different than other honeypot anti spam plugins ? </strong>
31
 
@@ -111,6 +112,10 @@ With WP Armour - Honeypot Anti Spam plugin it is No. But if you want you can use
111
 
112
  == Changelog ==
113
 
 
 
 
 
114
  = = 1.5.2 =
115
  * Removed anti spam filter from admin comment section. Before it was marking the comment as spam when trying to add from admin panel.
116
 
2
  Contributors: dnesscarkey
3
  Tags: anti spam, spam checker, spam filter, gravity forms, contact form 7
4
  Requires at least: 3.0
5
+ Tested up to: 5.5.1
6
+ Stable tag: 1.5.3
7
  License: GPLv2 or later
8
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
9
 
10
  Anti spam filter that blocks spam bots including russian spam in Contact Form 7, Gravity Forms, Ninja Forms, Formidable Forms, Comments, Registration and more..
11
 
12
  == Description ==
13
+ This plugins block spam submissions using honeypot anti spam technic. No Captcha or extra verification field hassle to the users. Only lets spam bots to suffer using our anti spam filter.
14
 
15
  <strong>What is honeypot anti spam ? </strong>
16
  As of now spam bots are unable to handle javascript and we exploit this point to add an extra fields to your forms using javascript as anti spam checker. Since spam bots are not able to see that field, we check if that field exists or not. If that field doesn't exists we will block spam submission.
26
  * For WPForms
27
  * For Formidable Forms
28
  * For Caldera Forms
29
+ * For Toolset Forms
30
 
31
  <strong>How our plugin is different than other honeypot anti spam plugins ? </strong>
32
 
112
 
113
  == Changelog ==
114
 
115
+ = = 1.5.3 =
116
+ * Added anti spam support for Toolset Forms.
117
+ * Fixed Caldera Forms anti spam message issue in Admin.
118
+
119
  = = 1.5.2 =
120
  * Removed anti spam filter from admin comment section. Before it was marking the comment as spam when trying to add from admin panel.
121
 
wp-armour.php CHANGED
@@ -4,20 +4,26 @@ 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.2
8
  Author URI: https://dineshkarki.com.np
9
  */
10
 
11
  include 'includes/wpa_config.php';
12
  include 'includes/wpa_functions.php';
13
- include 'includes/integration/wpa_bbpress.php';
14
- include 'includes/integration/wpa_wpcomment.php';
15
- include 'includes/integration/wpa_wpregistration.php';
16
- include 'includes/integration/wpa_contactform7.php';
17
- include 'includes/integration/wpa_wpforms.php';
18
- include 'includes/integration/wpa_gravityforms.php';
19
- include 'includes/integration/wpa_formidable.php';
20
- include 'includes/integration/wpa_calderaforms.php';
 
 
 
 
 
 
21
 
22
  add_action('wp_enqueue_scripts','wpa_load_scripts');
23
  add_action('login_enqueue_scripts','wpa_load_scripts');
4
  Plugin URI: http://wordpress.org/plugins/honeypot/
5
  Description: Add honeypot anti spam protection.
6
  Author: Dnesscarkey
7
+ Version: 1.5.3
8
  Author URI: https://dineshkarki.com.np
9
  */
10
 
11
  include 'includes/wpa_config.php';
12
  include 'includes/wpa_functions.php';
13
+
14
+ include 'includes/views/wpa_notice.php';
15
+
16
+ if( !is_admin() ){ // ONLY BLOCK SPAM IF IT IS NOT ADMIN PANEL
17
+ include 'includes/integration/wpa_bbpress.php';
18
+ include 'includes/integration/wpa_wpcomment.php';
19
+ include 'includes/integration/wpa_wpregistration.php';
20
+ include 'includes/integration/wpa_contactform7.php';
21
+ include 'includes/integration/wpa_wpforms.php';
22
+ include 'includes/integration/wpa_gravityforms.php';
23
+ include 'includes/integration/wpa_formidable.php';
24
+ include 'includes/integration/wpa_calderaforms.php';
25
+ include 'includes/integration/wpa_toolsetform.php';
26
+ }
27
 
28
  add_action('wp_enqueue_scripts','wpa_load_scripts');
29
  add_action('login_enqueue_scripts','wpa_load_scripts');