Version Description
- Fixed session issue.
Download this release
Release Info
Developer | dnesscarkey |
Plugin | WP Armour – Honeypot Anti Spam |
Version | 1.8.1 |
Comparing to | |
See all releases |
Code changes from version 1.8 to 1.8.1
- includes/wpa_functions.php +7 -6
- readme.txt +4 -1
- wp-armour.php +8 -6
includes/wpa_functions.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
if ( ! defined( 'ABSPATH' ) ) exit;
|
3 |
function wpa_load_scripts(){
|
4 |
if (current_user_can('activate_plugins') && (get_option('wpa_disable_test_widget') != 'yes')){
|
5 |
$wpa_add_test = 'yes';
|
@@ -7,11 +7,11 @@ function wpa_load_scripts(){
|
|
7 |
$wpa_add_test = 'no';
|
8 |
}
|
9 |
|
10 |
-
$GLOBALS['wpa_hidden_field'] = "<span class='wpa_hidden_field' style='display:none;height:0;width:0;'><input type='text' name='".$GLOBALS['wpa_field_name']."' value='
|
11 |
|
12 |
echo '<script>var wpa_hidden_field = "'.$GLOBALS['wpa_hidden_field'].'"; var wpa_add_test = "'.$wpa_add_test.'";</script>';
|
13 |
-
wp_enqueue_script( 'wpascript', plugins_url( '/js/wpa.js', __FILE__ ), array ( 'jquery' ), 1.8, true);
|
14 |
-
wp_enqueue_style( 'wpa-css', plugins_url( '/css/wpa.css', __FILE__ ), array(), '1.8');
|
15 |
}
|
16 |
|
17 |
function wpa_plugin_menu(){
|
@@ -117,8 +117,9 @@ function wpa_unqiue_field_name(){
|
|
117 |
}
|
118 |
|
119 |
function wpa_check_is_spam($form_data){
|
120 |
-
if(!session_id()) { session_start(); }
|
121 |
-
if (isset($form_data[$GLOBALS['wpa_field_name']]) && ($form_data[$GLOBALS['wpa_field_name']] == $_SESSION['wpa_unique_id'])){
|
|
|
122 |
return false;
|
123 |
} else {
|
124 |
return true;
|
1 |
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
3 |
function wpa_load_scripts(){
|
4 |
if (current_user_can('activate_plugins') && (get_option('wpa_disable_test_widget') != 'yes')){
|
5 |
$wpa_add_test = 'yes';
|
7 |
$wpa_add_test = 'no';
|
8 |
}
|
9 |
|
10 |
+
$GLOBALS['wpa_hidden_field'] = "<span class='wpa_hidden_field' style='display:none;height:0;width:0;'><input type='text' name='".$GLOBALS['wpa_field_name']."' value='1' /></span>";
|
11 |
|
12 |
echo '<script>var wpa_hidden_field = "'.$GLOBALS['wpa_hidden_field'].'"; var wpa_add_test = "'.$wpa_add_test.'";</script>';
|
13 |
+
wp_enqueue_script( 'wpascript', plugins_url( '/js/wpa.js', __FILE__ ), array ( 'jquery' ), '1.8.1', true);
|
14 |
+
wp_enqueue_style( 'wpa-css', plugins_url( '/css/wpa.css', __FILE__ ), array(), '1.8.1');
|
15 |
}
|
16 |
|
17 |
function wpa_plugin_menu(){
|
117 |
}
|
118 |
|
119 |
function wpa_check_is_spam($form_data){
|
120 |
+
//if(!session_id()) { session_start(); }
|
121 |
+
//if (isset($form_data[$GLOBALS['wpa_field_name']]) && ($form_data[$GLOBALS['wpa_field_name']] == $_SESSION['wpa_unique_id'])){
|
122 |
+
if ( isset($form_data[$GLOBALS['wpa_field_name']]) ){
|
123 |
return false;
|
124 |
} else {
|
125 |
return true;
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ 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.7
|
7 |
-
Stable tag: 1.8
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -132,6 +132,9 @@ With WP Armour - Honeypot Anti Spam plugin it is No. But if you want you can use
|
|
132 |
|
133 |
== Changelog ==
|
134 |
|
|
|
|
|
|
|
135 |
= = 1.8 =
|
136 |
* Added dynamic value for honeypot field test
|
137 |
|
4 |
Tags: anti spam, spam checker, spam filter, gravity forms, contact form 7
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.7
|
7 |
+
Stable tag: 1.8.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
132 |
|
133 |
== Changelog ==
|
134 |
|
135 |
+
= = 1.8.1 =
|
136 |
+
* Fixed session issue.
|
137 |
+
|
138 |
= = 1.8 =
|
139 |
* Added dynamic value for honeypot field test
|
140 |
|
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.8
|
9 |
Author URI: https://dineshkarki.com.np/wp-armour-anti-spam
|
10 |
*/
|
11 |
|
@@ -15,12 +15,14 @@ include 'includes/wpa_dashboard_widget.php';
|
|
15 |
include 'includes/views/wpa_notice.php';
|
16 |
|
17 |
add_action( 'init', function(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
if( !is_admin() ){ // ONLY BLOCK SPAM IF IT IS NOT ADMIN PANEL
|
19 |
-
if(!session_id()) { session_start(); }
|
20 |
-
if (!isset($_SESSION['wpa_unique_id'])){
|
21 |
-
$_SESSION['wpa_unique_id'] = rand(1, 99999);
|
22 |
-
}
|
23 |
-
|
24 |
include 'includes/integration/wpa_bbpress.php';
|
25 |
include 'includes/integration/wpa_wpcomment.php';
|
26 |
include 'includes/integration/wpa_wpregistration.php';
|
5 |
Plugin URI: http://wordpress.org/plugins/honeypot/
|
6 |
Description: Add honeypot anti spam protection.
|
7 |
Author: Dnesscarkey
|
8 |
+
Version: 1.8.1
|
9 |
Author URI: https://dineshkarki.com.np/wp-armour-anti-spam
|
10 |
*/
|
11 |
|
15 |
include 'includes/views/wpa_notice.php';
|
16 |
|
17 |
add_action( 'init', function(){
|
18 |
+
|
19 |
+
/*
|
20 |
+
if(!session_id()) { session_start(); }
|
21 |
+
if (!isset($_SESSION['wpa_unique_id'])){
|
22 |
+
$_SESSION['wpa_unique_id'] = rand(1, 99999);
|
23 |
+
}*/
|
24 |
+
|
25 |
if( !is_admin() ){ // ONLY BLOCK SPAM IF IT IS NOT ADMIN PANEL
|
|
|
|
|
|
|
|
|
|
|
26 |
include 'includes/integration/wpa_bbpress.php';
|
27 |
include 'includes/integration/wpa_wpcomment.php';
|
28 |
include 'includes/integration/wpa_wpregistration.php';
|