Version Description
- Added composer. See #150.
- Temporarily disabled sharing spam detection information.
Download this release
Release Info
Developer | bmarshall511 |
Plugin | WordPress Zero Spam |
Version | 4.10.2 |
Comparing to | |
See all releases |
Code changes from version 4.10.1 to 4.10.2
- classes/class-wpzerospam.php +2 -2
- composer.json +36 -0
- inc/admin.php +31 -16
- inc/helpers.php +2 -2
- inc/utilities.php +1 -1
- readme.txt +10 -5
- wordpress-zero-spam.php +2 -2
classes/class-wpzerospam.php
CHANGED
@@ -366,9 +366,9 @@ class WPZeroSpam {
|
|
366 |
|
367 |
|
368 |
// If sharing detections is enabled, send the detection to Zero Spam.
|
369 |
-
if ( 'enabled' === $this->options['share_detections'] ) {
|
370 |
$this->share_detection( $record['user_ip'], $record['log_type'] );
|
371 |
-
}
|
372 |
|
373 |
// Check if logging detections & 'blocks' are enabled.
|
374 |
if (
|
366 |
|
367 |
|
368 |
// If sharing detections is enabled, send the detection to Zero Spam.
|
369 |
+
/*if ( 'enabled' === $this->options['share_detections'] ) {
|
370 |
$this->share_detection( $record['user_ip'], $record['log_type'] );
|
371 |
+
}*/
|
372 |
|
373 |
// Check if logging detections & 'blocks' are enabled.
|
374 |
if (
|
composer.json
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "bmarshall511/wordpress_zero_spam",
|
3 |
+
"description": "WordPress Zero Spam makes blocking spam & malicious visitors a cinch. Just install, activate and enjoy a spam-free site.",
|
4 |
+
"keywords": ["wordpress-plugin"],
|
5 |
+
"type": "wordpress-plugin",
|
6 |
+
"homepage": "https://www.benmarshall.me/wordpress-zero-spam",
|
7 |
+
"authors": [
|
8 |
+
{
|
9 |
+
"name": "Ben Marshall (bmarshall)",
|
10 |
+
"homepage": "https://www.benmarshall.me",
|
11 |
+
"role": "Maintainer"
|
12 |
+
}
|
13 |
+
],
|
14 |
+
"support": {
|
15 |
+
"issues": "https://github.com/bmarshall511/wordpress-zero-spam/issues"
|
16 |
+
},
|
17 |
+
"license": "GPL-2.0-or-later",
|
18 |
+
"minimum-stability": "stable",
|
19 |
+
"repositories": [
|
20 |
+
{
|
21 |
+
"type": "package",
|
22 |
+
"package": {
|
23 |
+
"name": "bmarshall511/wordpress-zero-spam",
|
24 |
+
"version": "master",
|
25 |
+
"source": {
|
26 |
+
"url": "git://github.com/bmarshall511/wordpress-zero-spam.git",
|
27 |
+
"type": "git",
|
28 |
+
"reference": "master"
|
29 |
+
}
|
30 |
+
}
|
31 |
+
}
|
32 |
+
],
|
33 |
+
"require": {
|
34 |
+
"php" : ">=7.1"
|
35 |
+
}
|
36 |
+
}
|
inc/admin.php
CHANGED
@@ -433,10 +433,33 @@ function wpzerospam_admin_init() {
|
|
433 |
|
434 |
register_setting( 'wpzerospam', 'wpzerospam', 'wpzerospam_validate_options' );
|
435 |
|
436 |
-
add_settings_section( 'wpzerospam_general_settings', __( 'General Settings', 'zero-spam' ), 'wpzerospam_general_settings_cb', 'wpzerospam' );
|
437 |
add_settings_section( 'wpzerospam_autoblocks', __( 'Auto-block Settings', 'zero-spam' ), 'wpzerospam_autoblock_settings_cb', 'wpzerospam' );
|
438 |
add_settings_section( 'wpzerospam_onsite', __( 'On-site Spam Prevention', 'zero-spam' ), 'wpzerospam_onsite_cb', 'wpzerospam' );
|
439 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
440 |
|
441 |
// Cookie expiration
|
442 |
add_settings_field( 'cookie_expiration', __( 'Cookie Expiration', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
|
@@ -451,20 +474,6 @@ function wpzerospam_admin_init() {
|
|
451 |
'suffix' => __( 'days', 'zero-spam' )
|
452 |
]);
|
453 |
|
454 |
-
// Determines is spam detections should be shared with WordPress Zero Spam
|
455 |
-
add_settings_field( 'share_detections', __( 'Share Spam Detections', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
|
456 |
-
'label_for' => 'share_detections',
|
457 |
-
'type' => 'checkbox',
|
458 |
-
'multi' => false,
|
459 |
-
'desc' => wp_kses(
|
460 |
-
__( 'Help support WordPress Zero Spam and strenghten its ability to detect spammers by sharing spam detections. The only data that\'s shared is the IP address, type & site where the spam was detected. <strong>Absolutely no personal data is shared.</strong>.', 'zero-spam' ),
|
461 |
-
[ 'strong' => [] ]
|
462 |
-
),
|
463 |
-
'options' => [
|
464 |
-
'enabled' => __( 'Enabled', 'zero-spam' )
|
465 |
-
]
|
466 |
-
]);
|
467 |
-
|
468 |
// Determines is spam detected IPs should automatically be blocked
|
469 |
add_settings_field( 'auto_block_ips', __( 'Auto-block IPs', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_autoblocks', [
|
470 |
'label_for' => 'auto_block_ips',
|
@@ -754,6 +763,12 @@ function wpzerospam_admin_init() {
|
|
754 |
add_action( 'admin_init', 'wpzerospam_admin_init' );
|
755 |
|
756 |
function wpzerospam_general_settings_cb() {
|
|
|
|
|
|
|
|
|
|
|
|
|
757 |
}
|
758 |
|
759 |
function wpzerospam_autoblock_settings_cb() {
|
433 |
|
434 |
register_setting( 'wpzerospam', 'wpzerospam', 'wpzerospam_validate_options' );
|
435 |
|
436 |
+
add_settings_section( 'wpzerospam_general_settings', __( 'General Plugin Settings', 'zero-spam' ), 'wpzerospam_general_settings_cb', 'wpzerospam' );
|
437 |
add_settings_section( 'wpzerospam_autoblocks', __( 'Auto-block Settings', 'zero-spam' ), 'wpzerospam_autoblock_settings_cb', 'wpzerospam' );
|
438 |
add_settings_section( 'wpzerospam_onsite', __( 'On-site Spam Prevention', 'zero-spam' ), 'wpzerospam_onsite_cb', 'wpzerospam' );
|
439 |
+
add_settings_section( 'wpzerospam_spam_checks', __( 'Integrations & Third-party APIs', 'zero-spam' ), 'wpzerospam_spam_checks_cb', 'wpzerospam' );
|
440 |
+
|
441 |
+
/*add_settings_field( 'share_detections', __( 'Share Spam/Malicious IP Detections', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
|
442 |
+
'label_for' => 'share_detections',
|
443 |
+
'type' => 'checkbox',
|
444 |
+
'multi' => false,
|
445 |
+
'desc' => sprintf(
|
446 |
+
wp_kses(
|
447 |
+
__( 'Help support WordPress Zero Spam and strengthen its ability to detect spammers by sharing spam detections. For more information about what\'s being shared, see the plugin\'s <a href="%1$s" target="_blank" rel="noreferrer noopener">documentation</a>.', 'wpzerospam' ),
|
448 |
+
array(
|
449 |
+
'strong' => array(),
|
450 |
+
'a' => array(
|
451 |
+
'href' => array(),
|
452 |
+
'rel' => array(),
|
453 |
+
'target' => array(),
|
454 |
+
)
|
455 |
+
)
|
456 |
+
),
|
457 |
+
esc_url('https://www.benmarshall.me/wordpress-zero-spam/')
|
458 |
+
),
|
459 |
+
'options' => [
|
460 |
+
'enabled' => __( 'Enabled', 'wpzerospam' )
|
461 |
+
]
|
462 |
+
]);*/
|
463 |
|
464 |
// Cookie expiration
|
465 |
add_settings_field( 'cookie_expiration', __( 'Cookie Expiration', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
|
474 |
'suffix' => __( 'days', 'zero-spam' )
|
475 |
]);
|
476 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
477 |
// Determines is spam detected IPs should automatically be blocked
|
478 |
add_settings_field( 'auto_block_ips', __( 'Auto-block IPs', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_autoblocks', [
|
479 |
'label_for' => 'auto_block_ips',
|
763 |
add_action( 'admin_init', 'wpzerospam_admin_init' );
|
764 |
|
765 |
function wpzerospam_general_settings_cb() {
|
766 |
+
echo wp_kses(
|
767 |
+
__( '<strong>WordPress Zero Spam just works — no need for additional configuration.</strong> However, for more control over its functionality, you can configure the general settings below.', 'wpzerospam' ),
|
768 |
+
array(
|
769 |
+
'strong' => array(),
|
770 |
+
)
|
771 |
+
);
|
772 |
}
|
773 |
|
774 |
function wpzerospam_autoblock_settings_cb() {
|
inc/helpers.php
CHANGED
@@ -47,10 +47,10 @@ if ( ! function_exists( 'wpzerospam_log_detection' ) ) {
|
|
47 |
|
48 |
// If sharing detections is enabled, send the detection to Zero Spam.
|
49 |
if ( 'enabled' == $options['share_detections'] ) {
|
50 |
-
wpzerospam_share_detection([
|
51 |
'ip' => $record['user_ip'],
|
52 |
'type' => $record['log_type']
|
53 |
-
])
|
54 |
}
|
55 |
|
56 |
// Check if logging detections & 'blocks' are enabled.
|
47 |
|
48 |
// If sharing detections is enabled, send the detection to Zero Spam.
|
49 |
if ( 'enabled' == $options['share_detections'] ) {
|
50 |
+
/*wpzerospam_share_detection([
|
51 |
'ip' => $record['user_ip'],
|
52 |
'type' => $record['log_type']
|
53 |
+
]);*/
|
54 |
}
|
55 |
|
56 |
// Check if logging detections & 'blocks' are enabled.
|
inc/utilities.php
CHANGED
@@ -124,7 +124,7 @@ if ( ! function_exists( 'wpzerospam_options' ) ) {
|
|
124 |
if ( empty( $options['cookie_expiration'] ) ) { $options['cookie_expiration'] = 7; }
|
125 |
|
126 |
if ( empty( $options['share_detections'] ) ) {
|
127 |
-
$options['share_detections'] = '
|
128 |
}
|
129 |
|
130 |
if ( empty( $options['verify_bp_registrations'] ) ) {
|
124 |
if ( empty( $options['cookie_expiration'] ) ) { $options['cookie_expiration'] = 7; }
|
125 |
|
126 |
if ( empty( $options['share_detections'] ) ) {
|
127 |
+
$options['share_detections'] = 'disabled';
|
128 |
}
|
129 |
|
130 |
if ( empty( $options['verify_bp_registrations'] ) ) {
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Donate link: https://www.benmarshall.me/donate/?utm_source=wordpress_zero_spam&u
|
|
5 |
Requires at least: 5.2
|
6 |
Tested up to: 5.5
|
7 |
Requires PHP: 7.1
|
8 |
-
Stable tag: 4.10.
|
9 |
License: GNU GPLv3
|
10 |
License URI: https://choosealicense.com/licenses/gpl-3.0/
|
11 |
|
@@ -133,10 +133,6 @@ It's easy as adding the class `wpzerospam` to the `form` element, then adding a
|
|
133 |
|
134 |
Yes. One of the many techniques WordPress Zero Spam employs requires JavaScript be enabled to work properly.
|
135 |
|
136 |
-
= Does WordPress Zero Spam use cookies? =
|
137 |
-
|
138 |
-
**Yes. It does not store any kind of personally identifiable information.** Only one cookie is stored (`wpzerospam_api_blacklist`) to log the last time the site queried the blacklist APIs. This is used to boost performance so each page visit doesn't trigger an API call. The expiration can be set in *Admin > WP Zero Spam > Settings*
|
139 |
-
|
140 |
== Screenshots ==
|
141 |
|
142 |
1. WordPress Zero Spam dashboard
|
@@ -147,6 +143,15 @@ Yes. One of the many techniques WordPress Zero Spam employs requires JavaScript
|
|
147 |
|
148 |
== Changelog ==
|
149 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
= 4.10.1 =
|
151 |
|
152 |
* Fix - PHP notice `Warning: array_merge(): Expected parameter 2 to be an array, bool given in /wp-content/plugins/zero-spam/classes/class-wordpress-zero-spam.php on line 532`. See https://wordpress.org/support/topic/warning-array_merge-14/#post-13319702.
|
5 |
Requires at least: 5.2
|
6 |
Tested up to: 5.5
|
7 |
Requires PHP: 7.1
|
8 |
+
Stable tag: 4.10.2
|
9 |
License: GNU GPLv3
|
10 |
License URI: https://choosealicense.com/licenses/gpl-3.0/
|
11 |
|
133 |
|
134 |
Yes. One of the many techniques WordPress Zero Spam employs requires JavaScript be enabled to work properly.
|
135 |
|
|
|
|
|
|
|
|
|
136 |
== Screenshots ==
|
137 |
|
138 |
1. WordPress Zero Spam dashboard
|
143 |
|
144 |
== Changelog ==
|
145 |
|
146 |
+
= 4.10.2 =
|
147 |
+
|
148 |
+
* Added composer. See [#150](https://github.com/bmarshall511/wordpress-zero-spam/pull/150/).
|
149 |
+
* Temporarily disabled sharing spam detection information.
|
150 |
+
|
151 |
+
= 4.10.2 =
|
152 |
+
|
153 |
+
* Update to comply with the GDPR/CCPA. See [#216](https://github.com/bmarshall511/wordpress-zero-spam/issues/216).
|
154 |
+
|
155 |
= 4.10.1 =
|
156 |
|
157 |
* Fix - PHP notice `Warning: array_merge(): Expected parameter 2 to be an array, bool given in /wp-content/plugins/zero-spam/classes/class-wordpress-zero-spam.php on line 532`. See https://wordpress.org/support/topic/warning-array_merge-14/#post-13319702.
|
wordpress-zero-spam.php
CHANGED
@@ -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.10.
|
17 |
* Requires at least: 5.2
|
18 |
* Requires PHP: 7.2
|
19 |
* Author: Ben Marshall
|
@@ -30,7 +30,7 @@ defined( 'ABSPATH' ) || die();
|
|
30 |
// Define plugin constants.
|
31 |
define( 'WORDPRESS_ZERO_SPAM', __FILE__ );
|
32 |
define( 'WORDPRESS_ZERO_SPAM_DB_VERSION', '0.6' );
|
33 |
-
define( 'WORDPRESS_ZERO_SPAM_VERSION', '4.10.
|
34 |
|
35 |
/**
|
36 |
* Include the WordPress Zero Spam plugin class.
|
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.10.2
|
17 |
* Requires at least: 5.2
|
18 |
* Requires PHP: 7.2
|
19 |
* Author: Ben Marshall
|
30 |
// Define plugin constants.
|
31 |
define( 'WORDPRESS_ZERO_SPAM', __FILE__ );
|
32 |
define( 'WORDPRESS_ZERO_SPAM_DB_VERSION', '0.6' );
|
33 |
+
define( 'WORDPRESS_ZERO_SPAM_VERSION', '4.10.2' );
|
34 |
|
35 |
/**
|
36 |
* Include the WordPress Zero Spam plugin class.
|