Version Description
- Fixed issue with plugin settings not saving. See #176.
- Fixed some PHP notices. See #175.
Download this release
Release Info
Developer | bmarshall511 |
Plugin | WordPress Zero Spam |
Version | 4.1.2 |
Comparing to | |
See all releases |
Code changes from version 4.1.1 to 4.1.2
- inc/admin.php +15 -1
- inc/helpers.php +2 -0
- readme.txt +12 -7
- wordpress-zero-spam.php +2 -2
inc/admin.php
CHANGED
@@ -32,8 +32,22 @@ function wpzerospam_options_page() {
|
|
32 |
<?php
|
33 |
}
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
function wpzerospam_admin_init() {
|
36 |
-
register_setting( 'wpzerospam', 'wpzerospam' );
|
37 |
|
38 |
add_settings_section( 'wpzerospam_general_settings', __( 'General Settings', 'wpzerospam' ), 'wpzerospam_general_settings_cb', 'wpzerospam' );
|
39 |
add_settings_section( 'wpzerospam_spam_checks', __( 'Spam Checks', 'wpzerospam' ), 'wpzerospam_spam_checks_cb', 'wpzerospam' );
|
32 |
<?php
|
33 |
}
|
34 |
|
35 |
+
function wpzerospam_validate_options( $input ) {
|
36 |
+
if ( empty( $input['log_spam'] ) ) { $input['log_spam'] = 'disabled'; }
|
37 |
+
if ( empty( $input['verify_comments'] ) ) { $input['verify_comments'] = 'disabled'; }
|
38 |
+
if ( empty( $input['verify_registrations'] ) ) { $input['verify_registrations'] = 'disabled'; }
|
39 |
+
if ( empty( $input['verify_cf7'] ) ) { $input['verify_cf7'] = 'disabled'; }
|
40 |
+
if ( empty( $input['verify_gform'] ) ) { $input['verify_gform'] = 'disabled'; }
|
41 |
+
if ( empty( $input['verify_ninja_forms'] ) ) { $input['verify_ninja_forms'] = 'disabled'; }
|
42 |
+
if ( empty( $input['verify_bp_registrations'] ) ) { $input['verify_bp_registrations'] = 'disabled'; }
|
43 |
+
if ( empty( $input['verify_wpforms'] ) ) { $input['verify_wpforms'] = 'disabled'; }
|
44 |
+
if ( empty( $input['log_blocked_ips'] ) ) { $input['log_blocked_ips'] = 'disabled'; }
|
45 |
+
|
46 |
+
return $input;
|
47 |
+
}
|
48 |
+
|
49 |
function wpzerospam_admin_init() {
|
50 |
+
register_setting( 'wpzerospam', 'wpzerospam', 'wpzerospam_validate_options' );
|
51 |
|
52 |
add_settings_section( 'wpzerospam_general_settings', __( 'General Settings', 'wpzerospam' ), 'wpzerospam_general_settings_cb', 'wpzerospam' );
|
53 |
add_settings_section( 'wpzerospam_spam_checks', __( 'Spam Checks', 'wpzerospam' ), 'wpzerospam_spam_checks_cb', 'wpzerospam' );
|
inc/helpers.php
CHANGED
@@ -132,6 +132,8 @@ if ( ! function_exists( 'wpzerospam_options' ) ) {
|
|
132 |
$options['verify_wpforms'] = 'enabled';
|
133 |
}
|
134 |
|
|
|
|
|
135 |
return $options;
|
136 |
}
|
137 |
}
|
132 |
$options['verify_wpforms'] = 'enabled';
|
133 |
}
|
134 |
|
135 |
+
if ( empty( $options['blocked_ips'] ) ) { $options['blocked_ips'] = []; }
|
136 |
+
|
137 |
return $options;
|
138 |
}
|
139 |
}
|
readme.txt
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
=== WordPress Zero Spam ===
|
2 |
-
Contributors: bmarshall511
|
3 |
Tags: comments, spam, antispam, anti-spam, comment spam, spambot, spammer, spam free, spam blocker, registration spam
|
4 |
Donate link: https://benmarshall.me
|
5 |
Requires at least: 5.2
|
6 |
Tested up to: 5.4.2
|
7 |
Requires PHP: 7.1
|
8 |
-
Stable tag: 4.1.
|
9 |
License: GNU GPLv3
|
10 |
License URI: https://choosealicense.com/licenses/gpl-3.0/
|
11 |
|
@@ -69,11 +69,16 @@ Yes, that's what does the magic and keeps spam bots out.
|
|
69 |
|
70 |
== Changelog ==
|
71 |
|
72 |
-
=
|
73 |
|
74 |
-
*
|
|
|
|
|
|
|
|
|
|
|
75 |
|
76 |
-
= v4.1.0
|
77 |
|
78 |
* Added support for [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
|
79 |
* Added support for [Gravity Forms](https://www.gravityforms.com/)
|
@@ -81,6 +86,6 @@ Yes, that's what does the magic and keeps spam bots out.
|
|
81 |
* Added support for [BuddyPress](https://wordpress.org/plugins/buddypress/)
|
82 |
* Added support for [Contact Form by WPForms](https://wordpress.org/plugins/wpforms-lite/)
|
83 |
|
84 |
-
= v4.
|
85 |
|
86 |
-
*
|
1 |
=== WordPress Zero Spam ===
|
2 |
+
Contributors: bmarshall511, jaredatch
|
3 |
Tags: comments, spam, antispam, anti-spam, comment spam, spambot, spammer, spam free, spam blocker, registration spam
|
4 |
Donate link: https://benmarshall.me
|
5 |
Requires at least: 5.2
|
6 |
Tested up to: 5.4.2
|
7 |
Requires PHP: 7.1
|
8 |
+
Stable tag: 4.1.2
|
9 |
License: GNU GPLv3
|
10 |
License URI: https://choosealicense.com/licenses/gpl-3.0/
|
11 |
|
69 |
|
70 |
== Changelog ==
|
71 |
|
72 |
+
= 4.1.2 =
|
73 |
|
74 |
+
* Fixed issue with plugin settings not saving. See [#176](https://github.com/bmarshall511/wordpress-zero-spam/issues/176).
|
75 |
+
* Fixed some PHP notices. See [#175](https://github.com/bmarshall511/wordpress-zero-spam/issues/175).
|
76 |
+
|
77 |
+
= v4.1.1 =
|
78 |
+
|
79 |
+
* Fixed missing JS for new 3rd-party plugin support
|
80 |
|
81 |
+
= v4.1.0 =
|
82 |
|
83 |
* Added support for [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
|
84 |
* Added support for [Gravity Forms](https://www.gravityforms.com/)
|
86 |
* Added support for [BuddyPress](https://wordpress.org/plugins/buddypress/)
|
87 |
* Added support for [Contact Form by WPForms](https://wordpress.org/plugins/wpforms-lite/)
|
88 |
|
89 |
+
= v4.0.0 =
|
90 |
|
91 |
+
* A complete rewrite of the original plugin
|
wordpress-zero-spam.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package WordPressZeroSpam
|
6 |
* @subpackage WordPress
|
7 |
-
* @since 4.1.
|
8 |
* @author Ben Marshall
|
9 |
* @copyright 2020 Ben Marshall
|
10 |
* @license GPL-2.0-or-later
|
@@ -13,7 +13,7 @@
|
|
13 |
* Plugin Name: WordPress Zero Spam
|
14 |
* Plugin URI: https://benmarshall.me/wordpress-zero-spam
|
15 |
* Description: Tired of all the useless and bloated WordPress spam plugins? The WordPress Zero Spam plugin makes blocking spam a cinch. <strong>Just install, activate and say goodbye to spam.</strong> Based on work by <a href="http://davidwalsh.name/wordpress-comment-spam" target="_blank">David Walsh</a>.
|
16 |
-
* Version: 4.1.
|
17 |
* Requires at least: 5.2
|
18 |
* Requires PHP: 7.2
|
19 |
* Author: Ben Marshall
|
4 |
*
|
5 |
* @package WordPressZeroSpam
|
6 |
* @subpackage WordPress
|
7 |
+
* @since 4.1.2
|
8 |
* @author Ben Marshall
|
9 |
* @copyright 2020 Ben Marshall
|
10 |
* @license GPL-2.0-or-later
|
13 |
* Plugin Name: WordPress Zero Spam
|
14 |
* Plugin URI: https://benmarshall.me/wordpress-zero-spam
|
15 |
* Description: Tired of all the useless and bloated WordPress spam plugins? The WordPress Zero Spam plugin makes blocking spam a cinch. <strong>Just install, activate and say goodbye to spam.</strong> Based on work by <a href="http://davidwalsh.name/wordpress-comment-spam" target="_blank">David Walsh</a>.
|
16 |
+
* Version: 4.1.2
|
17 |
* Requires at least: 5.2
|
18 |
* Requires PHP: 7.2
|
19 |
* Author: Ben Marshall
|