Version Description
Download this release
Release Info
Developer | bmarshall511 |
Plugin | WordPress Zero Spam |
Version | 5.2.14 |
Comparing to | |
See all releases |
Code changes from version 5.2.13 to 5.2.14
modules/davidwalsh/assets/js/davidwalsh.js
CHANGED
@@ -34,7 +34,7 @@
|
|
34 |
|
35 |
$(function () {
|
36 |
var selectors =
|
37 |
-
"#commentform,
|
38 |
if (
|
39 |
typeof ZeroSpamDavidWalsh.selectors != "undefined" &&
|
40 |
ZeroSpamDavidWalsh.selectors
|
34 |
|
35 |
$(function () {
|
36 |
var selectors =
|
37 |
+
"#commentform, .wpforms-form, .wpcf7-form, .frm-fluent-form, .mepr-signup-form, .mc4wp-form, #mepr_loginform";
|
38 |
if (
|
39 |
typeof ZeroSpamDavidWalsh.selectors != "undefined" &&
|
40 |
ZeroSpamDavidWalsh.selectors
|
modules/davidwalsh/class-davidwalsh.php
CHANGED
@@ -41,13 +41,10 @@ class DavidWalsh {
|
|
41 |
add_action( 'zerospam_comment_scripts', array( $this, 'enqueue_script' ) );
|
42 |
// See https://contactform7.com/loading-javascript-and-stylesheet-only-when-it-is-necessary/.
|
43 |
add_action( 'zerospam_wpcf7_scripts', array( $this, 'enqueue_script' ) );
|
44 |
-
add_action( 'zerospam_register_form', array( $this, 'enqueue_script' ) );
|
45 |
add_action( 'zerospam_wpforms_scripts', array( $this, 'enqueue_script' ) );
|
46 |
add_action( 'zerospam_fluentforms_scripts', array( $this, 'enqueue_script' ) );
|
47 |
-
add_action( 'zerospam_login_scripts', array( $this, 'enqueue_script' ) );
|
48 |
add_action( 'zerospam_mailchimp4wp_scripts', array( $this, 'enqueue_script' ) );
|
49 |
add_action( 'zerospam_memberpress_login_scripts', array( $this, 'enqueue_script' ) );
|
50 |
-
add_action( 'zerospam_woocommerce_registration_scripts', array( $this, 'enqueue_script' ) );
|
51 |
add_filter(
|
52 |
'zerospam_memberpress_registration_scripts',
|
53 |
function( $scripts ) {
|
41 |
add_action( 'zerospam_comment_scripts', array( $this, 'enqueue_script' ) );
|
42 |
// See https://contactform7.com/loading-javascript-and-stylesheet-only-when-it-is-necessary/.
|
43 |
add_action( 'zerospam_wpcf7_scripts', array( $this, 'enqueue_script' ) );
|
|
|
44 |
add_action( 'zerospam_wpforms_scripts', array( $this, 'enqueue_script' ) );
|
45 |
add_action( 'zerospam_fluentforms_scripts', array( $this, 'enqueue_script' ) );
|
|
|
46 |
add_action( 'zerospam_mailchimp4wp_scripts', array( $this, 'enqueue_script' ) );
|
47 |
add_action( 'zerospam_memberpress_login_scripts', array( $this, 'enqueue_script' ) );
|
|
|
48 |
add_filter(
|
49 |
'zerospam_memberpress_registration_scripts',
|
50 |
function( $scripts ) {
|
modules/login/class-login.php
CHANGED
@@ -40,18 +40,19 @@ class Login {
|
|
40 |
add_filter( 'wp_authenticate_user', array( $this, 'process_form' ), 10, 2 );
|
41 |
|
42 |
// Load scripts.
|
43 |
-
add_action( 'login_enqueue_scripts', array( $this, '
|
44 |
-
|
45 |
-
// Add script to WooCommerce login.
|
46 |
-
add_action( 'woocommerce_login_form_start', array( $this, 'scripts' ), 10 );
|
47 |
}
|
48 |
}
|
49 |
|
50 |
/**
|
51 |
* Load the scripts
|
52 |
*/
|
53 |
-
public function
|
54 |
-
|
|
|
|
|
|
|
|
|
55 |
}
|
56 |
|
57 |
/**
|
@@ -72,6 +73,21 @@ class Login {
|
|
72 |
// @codingStandardsIgnoreLine
|
73 |
$post = \ZeroSpam\Core\Utilities::sanitize_array( $_POST );
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
// Check Zero Spam's honeypot field.
|
76 |
$honeypot_field_name = \ZeroSpam\Core\Utilities::get_honeypot();
|
77 |
|
40 |
add_filter( 'wp_authenticate_user', array( $this, 'process_form' ), 10, 2 );
|
41 |
|
42 |
// Load scripts.
|
43 |
+
add_action( 'login_enqueue_scripts', array( $this, 'add_scripts' ), 10 );
|
|
|
|
|
|
|
44 |
}
|
45 |
}
|
46 |
|
47 |
/**
|
48 |
* Load the scripts
|
49 |
*/
|
50 |
+
public function add_scripts() {
|
51 |
+
// Only add scripts to the appropriate pages.
|
52 |
+
if ( 'enabled' === \ZeroSpam\Core\Settings::get_settings( 'davidwalsh' ) ) {
|
53 |
+
wp_enqueue_script( 'zerospam-davidwalsh' );
|
54 |
+
wp_add_inline_script( 'zerospam-davidwalsh', 'jQuery("#loginform").ZeroSpamDavidWalsh();' );
|
55 |
+
}
|
56 |
}
|
57 |
|
58 |
/**
|
73 |
// @codingStandardsIgnoreLine
|
74 |
$post = \ZeroSpam\Core\Utilities::sanitize_array( $_POST );
|
75 |
|
76 |
+
/**
|
77 |
+
* Fix for https://github.com/Highfivery/wordpress-zero-spam/issues/310
|
78 |
+
*
|
79 |
+
* Don't process WooCommerce login forms, this module is only for core login
|
80 |
+
* forms. Would be nice if there was a hook specific to core logins that
|
81 |
+
* wasn't fired for other 3rd-party login forms. A bit of a hacky solution,
|
82 |
+
* but checking if the woocommerce nonce was submitted, if so, ignore
|
83 |
+
* processing. WooCommerce login forms will eventually be processed by a
|
84 |
+
* WooCommerce login hook in the WooCommerce Zero Spam module.
|
85 |
+
*/
|
86 |
+
if ( ! empty( $post['woocommerce-login-nonce'] ) ) {
|
87 |
+
// Submitted via a WooCommerce login form, ignore processing.
|
88 |
+
return $user;
|
89 |
+
}
|
90 |
+
|
91 |
// Check Zero Spam's honeypot field.
|
92 |
$honeypot_field_name = \ZeroSpam\Core\Utilities::get_honeypot();
|
93 |
|
modules/registration/class-registration.php
CHANGED
@@ -33,8 +33,8 @@ class Registration {
|
|
33 |
'enabled' === \ZeroSpam\Core\Settings::get_settings( 'verify_registrations' ) &&
|
34 |
\ZeroSpam\Core\Access::process()
|
35 |
) {
|
36 |
-
add_action( 'register_form', array( $this, '
|
37 |
-
add_action( 'register_form', array( $this, '
|
38 |
add_filter( 'registration_errors', array( $this, 'process_form' ), 10, 3 );
|
39 |
}
|
40 |
}
|
@@ -53,8 +53,12 @@ class Registration {
|
|
53 |
/**
|
54 |
* Load the scripts
|
55 |
*/
|
56 |
-
public function
|
57 |
-
|
|
|
|
|
|
|
|
|
58 |
}
|
59 |
|
60 |
/**
|
@@ -134,7 +138,7 @@ class Registration {
|
|
134 |
/**
|
135 |
* Add a 'honeypot' field to the registration form
|
136 |
*/
|
137 |
-
public function
|
138 |
// @codingStandardsIgnoreLine
|
139 |
echo \ZeroSpam\Core\Utilities::honeypot_field();
|
140 |
}
|
33 |
'enabled' === \ZeroSpam\Core\Settings::get_settings( 'verify_registrations' ) &&
|
34 |
\ZeroSpam\Core\Access::process()
|
35 |
) {
|
36 |
+
add_action( 'register_form', array( $this, 'add_scripts' ) );
|
37 |
+
add_action( 'register_form', array( $this, 'add_honeypot_field' ) );
|
38 |
add_filter( 'registration_errors', array( $this, 'process_form' ), 10, 3 );
|
39 |
}
|
40 |
}
|
53 |
/**
|
54 |
* Load the scripts
|
55 |
*/
|
56 |
+
public function add_scripts() {
|
57 |
+
// Only add scripts to the appropriate pages.
|
58 |
+
if ( 'enabled' === \ZeroSpam\Core\Settings::get_settings( 'davidwalsh' ) ) {
|
59 |
+
wp_enqueue_script( 'zerospam-davidwalsh' );
|
60 |
+
wp_add_inline_script( 'zerospam-davidwalsh', 'jQuery("#registerform").ZeroSpamDavidWalsh();' );
|
61 |
+
}
|
62 |
}
|
63 |
|
64 |
/**
|
138 |
/**
|
139 |
* Add a 'honeypot' field to the registration form
|
140 |
*/
|
141 |
+
public function add_honeypot_field() {
|
142 |
// @codingStandardsIgnoreLine
|
143 |
echo \ZeroSpam\Core\Utilities::honeypot_field();
|
144 |
}
|
modules/woocommerce/class-woocommerce.php
CHANGED
@@ -106,8 +106,8 @@ class WooCommerce {
|
|
106 |
'enabled' === \ZeroSpam\Core\Settings::get_settings( 'verify_woocommerce_registrations' ) &&
|
107 |
\ZeroSpam\Core\Access::process()
|
108 |
) {
|
109 |
-
add_action( 'woocommerce_register_form', array( $this, '
|
110 |
-
add_action( 'woocommerce_register_form', array( $this, '
|
111 |
add_action( 'woocommerce_register_post', array( $this, 'process_registration' ), 10, 3 );
|
112 |
}
|
113 |
}
|
@@ -115,7 +115,7 @@ class WooCommerce {
|
|
115 |
/**
|
116 |
* Adds the 'honeypot' field to the WooCommerce registration form
|
117 |
*/
|
118 |
-
public function
|
119 |
woocommerce_form_field(
|
120 |
\ZeroSpam\Core\Utilities::get_honeypot(),
|
121 |
array(
|
@@ -128,8 +128,12 @@ class WooCommerce {
|
|
128 |
/**
|
129 |
* Load the scripts
|
130 |
*/
|
131 |
-
public function
|
132 |
-
|
|
|
|
|
|
|
|
|
133 |
}
|
134 |
|
135 |
/**
|
106 |
'enabled' === \ZeroSpam\Core\Settings::get_settings( 'verify_woocommerce_registrations' ) &&
|
107 |
\ZeroSpam\Core\Access::process()
|
108 |
) {
|
109 |
+
add_action( 'woocommerce_register_form', array( $this, 'add_honeypot_field' ) );
|
110 |
+
add_action( 'woocommerce_register_form', array( $this, 'add_scripts' ) );
|
111 |
add_action( 'woocommerce_register_post', array( $this, 'process_registration' ), 10, 3 );
|
112 |
}
|
113 |
}
|
115 |
/**
|
116 |
* Adds the 'honeypot' field to the WooCommerce registration form
|
117 |
*/
|
118 |
+
public function add_honeypot_field() {
|
119 |
woocommerce_form_field(
|
120 |
\ZeroSpam\Core\Utilities::get_honeypot(),
|
121 |
array(
|
128 |
/**
|
129 |
* Load the scripts
|
130 |
*/
|
131 |
+
public function add_scripts() {
|
132 |
+
// Only add scripts to the appropriate pages.
|
133 |
+
if ( 'enabled' === \ZeroSpam\Core\Settings::get_settings( 'davidwalsh' ) ) {
|
134 |
+
wp_enqueue_script( 'zerospam-davidwalsh' );
|
135 |
+
wp_add_inline_script( 'zerospam-davidwalsh', 'jQuery(".woocommerce-form-register").ZeroSpamDavidWalsh();' );
|
136 |
+
}
|
137 |
}
|
138 |
|
139 |
/**
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: bmarshall511
|
|
3 |
Tags: protection, firewall, security, spam, spam blocker
|
4 |
Donate link: https://www.zerospam.org/subscribe/
|
5 |
Requires at least: 5.2
|
6 |
-
Tested up to: 5.9
|
7 |
Requires PHP: 7.3
|
8 |
-
Stable tag: 5.2.
|
9 |
License: GNU GPLv3
|
10 |
License URI: https://choosealicense.com/licenses/gpl-3.0/
|
11 |
|
@@ -104,6 +104,10 @@ If hosting with Pantheon, see their [known issues page](https://pantheon.io/docs
|
|
104 |
|
105 |
== Changelog ==
|
106 |
|
|
|
|
|
|
|
|
|
107 |
= v5.2.13 =
|
108 |
|
109 |
* feat(woocommerce): added support for woocommerce registrations, resolves #306
|
3 |
Tags: protection, firewall, security, spam, spam blocker
|
4 |
Donate link: https://www.zerospam.org/subscribe/
|
5 |
Requires at least: 5.2
|
6 |
+
Tested up to: 5.9.1
|
7 |
Requires PHP: 7.3
|
8 |
+
Stable tag: 5.2.14
|
9 |
License: GNU GPLv3
|
10 |
License URI: https://choosealicense.com/licenses/gpl-3.0/
|
11 |
|
104 |
|
105 |
== Changelog ==
|
106 |
|
107 |
+
= v5.2.14 =
|
108 |
+
|
109 |
+
* fix(woocommerce): fixes issues with woocommerce login not working, resolves #310
|
110 |
+
|
111 |
= v5.2.13 =
|
112 |
|
113 |
* feat(woocommerce): added support for woocommerce registrations, resolves #306
|
wordpress-zero-spam.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* Plugin Name: Zero Spam for WordPress
|
14 |
* Plugin URI: https://www.highfivery.com/projects/zero-spam/
|
15 |
* Description: Tired of all the ineffective WordPress anti-spam & security plugins? Zero Spam for WordPress makes blocking spam & malicious activity a cinch. <strong>Just activate, configure, and say goodbye to spam.</strong>
|
16 |
-
* Version: 5.2.
|
17 |
* Requires at least: 5.2
|
18 |
* Requires PHP: 7.3
|
19 |
* Author: Highfivery LLC
|
@@ -31,7 +31,7 @@ defined( 'ABSPATH' ) || die();
|
|
31 |
define( 'ZEROSPAM', __FILE__ );
|
32 |
define( 'ZEROSPAM_PATH', plugin_dir_path( ZEROSPAM ) );
|
33 |
define( 'ZEROSPAM_PLUGIN_BASE', plugin_basename( ZEROSPAM ) );
|
34 |
-
define( 'ZEROSPAM_VERSION', '5.2.
|
35 |
|
36 |
if ( defined( 'ZEROSPAM_DEVELOPMENT_URL' ) ) {
|
37 |
define( 'ZEROSPAM_URL', ZEROSPAM_DEVELOPMENT_URL );
|
13 |
* Plugin Name: Zero Spam for WordPress
|
14 |
* Plugin URI: https://www.highfivery.com/projects/zero-spam/
|
15 |
* Description: Tired of all the ineffective WordPress anti-spam & security plugins? Zero Spam for WordPress makes blocking spam & malicious activity a cinch. <strong>Just activate, configure, and say goodbye to spam.</strong>
|
16 |
+
* Version: 5.2.14
|
17 |
* Requires at least: 5.2
|
18 |
* Requires PHP: 7.3
|
19 |
* Author: Highfivery LLC
|
31 |
define( 'ZEROSPAM', __FILE__ );
|
32 |
define( 'ZEROSPAM_PATH', plugin_dir_path( ZEROSPAM ) );
|
33 |
define( 'ZEROSPAM_PLUGIN_BASE', plugin_basename( ZEROSPAM ) );
|
34 |
+
define( 'ZEROSPAM_VERSION', '5.2.14' );
|
35 |
|
36 |
if ( defined( 'ZEROSPAM_DEVELOPMENT_URL' ) ) {
|
37 |
define( 'ZEROSPAM_URL', ZEROSPAM_DEVELOPMENT_URL );
|