Version Description
- Added random field name generate button
- Fixed stats issue.
Download this release
Release Info
Developer | dnesscarkey |
Plugin | WP Armour – Honeypot Anti Spam |
Version | 1.7.2 |
Comparing to | |
See all releases |
Code changes from version 1.7.1 to 1.7.2
- includes/views/wpa_settings.php +21 -3
- includes/views/wpa_stats.php +1 -1
- includes/wpa_functions.php +5 -0
- readme.txt +5 -1
- wp-armour.php +2 -2
includes/views/wpa_settings.php
CHANGED
@@ -15,8 +15,12 @@
|
|
15 |
<tr>
|
16 |
<td width="250">Honey Pot Field Name</td>
|
17 |
<td>
|
18 |
-
<input name="wpa_field_name" style="width:300px;" value="<?php echo esc_attr(get_option('wpa_field_name'));?>" type="text"
|
19 |
-
|
|
|
|
|
|
|
|
|
20 |
</td>
|
21 |
</tr>
|
22 |
<tr>
|
@@ -46,4 +50,18 @@
|
|
46 |
</form>
|
47 |
|
48 |
</tbody>
|
49 |
-
</table><br/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
<tr>
|
16 |
<td width="250">Honey Pot Field Name</td>
|
17 |
<td>
|
18 |
+
<input id="wpa_field_name" name="wpa_field_name" style="width:300px;" value="<?php echo esc_attr(get_option('wpa_field_name'));?>" type="text" readonly="readonly" />
|
19 |
+
|
20 |
+
<span class="dashicons dashicons-update" style="font-size: 28px; cursor: pointer;" onclick="wpa_unqiue_field_name()"></span>
|
21 |
+
|
22 |
+
<br/>
|
23 |
+
<em>Changing the field name regularly is a good idea. Please click on icon above to generate new field name.</em>
|
24 |
</td>
|
25 |
</tr>
|
26 |
<tr>
|
50 |
</form>
|
51 |
|
52 |
</tbody>
|
53 |
+
</table><br/>
|
54 |
+
|
55 |
+
<script type="text/javascript">
|
56 |
+
function wpa_unqiue_field_name(){
|
57 |
+
var randomChars = 'abcdefghijklmnopqrstuvwxyz';
|
58 |
+
var length = 6;
|
59 |
+
var string = '';
|
60 |
+
for ( var i = 0; i < length; i++ ) {
|
61 |
+
string += randomChars.charAt(Math.floor(Math.random() * randomChars.length));
|
62 |
+
}
|
63 |
+
var number = Math.floor(1000 + Math.random() * 9000);
|
64 |
+
|
65 |
+
jQuery('#wpa_field_name').val(string+number);
|
66 |
+
}
|
67 |
+
</script>
|
includes/views/wpa_stats.php
CHANGED
@@ -29,7 +29,7 @@ $currentStats = json_decode(get_option('wpa_stats'), true);
|
|
29 |
<td><strong><?php echo ucfirst($source); ?></strong></td>
|
30 |
<td><?php echo @wpa_check_date($statData['today']['date'],'today')?$statData['today']['count']:'0'; ?></td>
|
31 |
<td><?php echo @wpa_check_date($statData['week']['date'],'week')?$statData['week']['count']:'0'; ?></td>
|
32 |
-
<td><?php echo @wpa_check_date($statData['month']['date'],'
|
33 |
<td><?php echo $statData['all_time']; ?></td>
|
34 |
</tr>
|
35 |
<?php endforeach;
|
29 |
<td><strong><?php echo ucfirst($source); ?></strong></td>
|
30 |
<td><?php echo @wpa_check_date($statData['today']['date'],'today')?$statData['today']['count']:'0'; ?></td>
|
31 |
<td><?php echo @wpa_check_date($statData['week']['date'],'week')?$statData['week']['count']:'0'; ?></td>
|
32 |
+
<td><?php echo @wpa_check_date($statData['month']['date'],'month')?$statData['month']['count']:'0'; ?></td>
|
33 |
<td><?php echo $statData['all_time']; ?></td>
|
34 |
</tr>
|
35 |
<?php endforeach;
|
includes/wpa_functions.php
CHANGED
@@ -107,4 +107,9 @@ function wpa_check_date($timestamp, $comparision){
|
|
107 |
}
|
108 |
break;
|
109 |
}
|
|
|
|
|
|
|
|
|
|
|
110 |
}
|
107 |
}
|
108 |
break;
|
109 |
}
|
110 |
+
}
|
111 |
+
|
112 |
+
function wpa_unqiue_field_name(){
|
113 |
+
$permitted_chars = 'abcdefghijklmnopqrstuvwxyz';
|
114 |
+
return substr(str_shuffle($permitted_chars), 0, 6).rand(1,9999);
|
115 |
}
|
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.7.
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -126,6 +126,10 @@ With WP Armour - Honeypot Anti Spam plugin it is No. But if you want you can use
|
|
126 |
|
127 |
== Changelog ==
|
128 |
|
|
|
|
|
|
|
|
|
129 |
= = 1.7.1 =
|
130 |
* Fixed Test Widget not showing issue
|
131 |
* Fixed stats issue.
|
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.7.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
126 |
|
127 |
== Changelog ==
|
128 |
|
129 |
+
= = 1.7.2 =
|
130 |
+
* Added random field name generate button
|
131 |
+
* Fixed stats issue.
|
132 |
+
|
133 |
= = 1.7.1 =
|
134 |
* Fixed Test Widget not showing issue
|
135 |
* Fixed stats issue.
|
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.7.
|
9 |
Author URI: https://dineshkarki.com.np/wp-armour-anti-spam
|
10 |
*/
|
11 |
|
@@ -42,7 +42,7 @@ register_activation_hook( __FILE__, 'wpa_plugin_activation' );
|
|
42 |
|
43 |
function wpa_plugin_activation(){
|
44 |
add_option('wpa_installed_date',date('Ymd'));
|
45 |
-
add_option('wpa_field_name',
|
46 |
add_option('wpa_error_message',' Spamming or your Javascript is disabled !!');
|
47 |
add_option('wpa_disable_test_widget','no');
|
48 |
add_option('wpa_stats','{"total":{"today":{"date":"'.date('Ymd').'","count":0},"week":{"date":"'.date('Ymd').'","count":0},"month":{"date":"'.date('Ymd').'","count":0},"all_time":0}}');
|
5 |
Plugin URI: http://wordpress.org/plugins/honeypot/
|
6 |
Description: Add honeypot anti spam protection.
|
7 |
Author: Dnesscarkey
|
8 |
+
Version: 1.7.2
|
9 |
Author URI: https://dineshkarki.com.np/wp-armour-anti-spam
|
10 |
*/
|
11 |
|
42 |
|
43 |
function wpa_plugin_activation(){
|
44 |
add_option('wpa_installed_date',date('Ymd'));
|
45 |
+
add_option('wpa_field_name',wpa_unqiue_field_name());
|
46 |
add_option('wpa_error_message',' Spamming or your Javascript is disabled !!');
|
47 |
add_option('wpa_disable_test_widget','no');
|
48 |
add_option('wpa_stats','{"total":{"today":{"date":"'.date('Ymd').'","count":0},"week":{"date":"'.date('Ymd').'","count":0},"month":{"date":"'.date('Ymd').'","count":0},"all_time":0}}');
|