Version Description
Download this release
Release Info
Developer | bmarshall511 |
Plugin | WordPress Zero Spam |
Version | 5.2.15 |
Comparing to | |
See all releases |
Code changes from version 5.2.14 to 5.2.15
- includes/class-plugin.php +7 -0
- modules/class-ukraine.php +88 -0
- readme.txt +7 -1
- wordpress-zero-spam.php +2 -2
includes/class-plugin.php
CHANGED
@@ -70,6 +70,13 @@ class Plugin {
|
|
70 |
* Initializes modules
|
71 |
*/
|
72 |
private function init_modules() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
if ( is_admin() ) {
|
74 |
// Plugin admin module.
|
75 |
new \ZeroSpam\Core\Admin\Admin();
|
70 |
* Initializes modules
|
71 |
*/
|
72 |
private function init_modules() {
|
73 |
+
// We support the Ukrainians!
|
74 |
+
$ukraine = new \ZeroSpam\Modules\Ukraine();
|
75 |
+
|
76 |
+
if ( $ukraine->supports_putin() ) {
|
77 |
+
return false;
|
78 |
+
}
|
79 |
+
|
80 |
if ( is_admin() ) {
|
81 |
// Plugin admin module.
|
82 |
new \ZeroSpam\Core\Admin\Admin();
|
modules/class-ukraine.php
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Ukraine support class
|
4 |
+
*
|
5 |
+
* As the invasion of Ukraine continues, we at Zero Spam support those fighting
|
6 |
+
* to preserve freedom, democracy, and sovereignty in their country. Because of
|
7 |
+
* this unlawful invasion by Russia, supported by Belarus, we will no longer
|
8 |
+
* provide protection for .ru, .su, and .by domains that have the plugin
|
9 |
+
* installed and will display a Ukrainian support banner on those sites.
|
10 |
+
*
|
11 |
+
* Not a fan, please feel free to deactivate and uninstall the plugin.
|
12 |
+
*
|
13 |
+
* @package ZeroSpam
|
14 |
+
*/
|
15 |
+
|
16 |
+
namespace ZeroSpam\Modules;
|
17 |
+
|
18 |
+
// Security Note: Blocks direct access to the plugin PHP files.
|
19 |
+
defined( 'ABSPATH' ) || die();
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Ukrainian support class
|
23 |
+
*/
|
24 |
+
class Ukraine {
|
25 |
+
/**
|
26 |
+
* Constructor
|
27 |
+
*/
|
28 |
+
public function __construct() {
|
29 |
+
$host = $this->get_site_host();
|
30 |
+
|
31 |
+
if ( $this->supports_putin() ) {
|
32 |
+
add_action( 'wp_footer', array( $this, 'output_banner' ), 1 );
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Determines if the domain is .ru or .by
|
38 |
+
*/
|
39 |
+
public function supports_putin() {
|
40 |
+
$host = $this->get_site_host();
|
41 |
+
|
42 |
+
if ( rest_is_ip_address( $host ) || strpos( $host, '.' ) === false ) {
|
43 |
+
return false;
|
44 |
+
}
|
45 |
+
|
46 |
+
$tld = substr( $host, strrpos( $host, '.' ) + 1 );
|
47 |
+
|
48 |
+
if ( in_array( $tld, array( 'ru', 'by', 'su' ), true ) ) {
|
49 |
+
return true;
|
50 |
+
}
|
51 |
+
|
52 |
+
return false;
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Returns the site host.
|
57 |
+
*/
|
58 |
+
public function get_site_host() {
|
59 |
+
if ( function_exists( 'get_clean_basedomain' ) ) {
|
60 |
+
return get_clean_basedomain();
|
61 |
+
}
|
62 |
+
|
63 |
+
return wp_parse_url( get_site_url(), PHP_URL_HOST );
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Displays the Ukrainian support banner.
|
68 |
+
*/
|
69 |
+
public function output_banner() {
|
70 |
+
ob_start();
|
71 |
+
?>
|
72 |
+
<aside style="display:flex !important;align-items:center !important;position:fixed !important;bottom:40px !important;left:40px !important;z-index:99999999999999 !important;background:#fff !important;padding:15px 20px 15px !important;border-radius:3px !important;box-shadow: 2px 2px 4px rgb(0 0 0 / 10%) !important;visibility:visible !important;opacity:1 !important;">
|
73 |
+
<svg width="1200px" height="800px" viewBox="0 0 1200 800" style="width:65px !important;height:auto !important;display:inline-block !important;vertical-align:middle !important;margin-right:10px !important;visibility:visible !important;opacity:1 !important;box-shadow: 1px 1px 2px rgb(0 0 0 / 20%) !important;">
|
74 |
+
<title><?php esc_html_e( 'Flag of Ukraine' ); ?></title>
|
75 |
+
<g>
|
76 |
+
<rect fill="#005BBB" x="0" y="0" width="1200" height="800"></rect>
|
77 |
+
<rect fill="#FFD500" x="0" y="400" width="1200" height="400"></rect>
|
78 |
+
</g>
|
79 |
+
</svg>
|
80 |
+
<div style="display:block !important;visibility:visible !important;line-height:1 !important;opacity:1 !important;">
|
81 |
+
<strong style="font-weight:bold !important;display:block !important;visibility:visible !important;font-size:14px !important;margin-bottom:5px !important;line-height:1 !important;color:#000 !important;opacity:1 !important;"><?php esc_html_e( 'We stand with the Ukrainian people' ); ?></strong>
|
82 |
+
<a href="https://www.highfivery.com/united-with-ukraine/" target="_blank" rel="noreferrer noopener" style="color:#1a0dab !important;text-decoration:underline !important;display:block !important;visibility:visible !important;font-size:13px !important;line-height:1 !important;opacity:1 !important;"><?php esc_html_e( 'Learn how you can support the civilians of Ukraine.' ); ?></a>
|
83 |
+
</div>
|
84 |
+
</aside>
|
85 |
+
<?php
|
86 |
+
echo ob_get_clean();
|
87 |
+
}
|
88 |
+
}
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ 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.
|
9 |
License: GNU GPLv3
|
10 |
License URI: https://choosealicense.com/licenses/gpl-3.0/
|
11 |
|
@@ -13,6 +13,8 @@ No captcha needed, behind the scenes protection against spam & malicious attacks
|
|
13 |
|
14 |
== Description ==
|
15 |
|
|
|
|
|
16 |
Quit forcing people to answer questions or confusing captchas to prove they're not spam. Stop malicious users before they ever have a chance to infiltrate your site — **introducing Zero Spam for WordPress**.
|
17 |
|
18 |
[Zero Spam for WordPress](https://www.highfivery.com/projects/zero-spam/?utm_source=wordpress.org&utm_medium=plugin&utm_campaign=wordpress_zero_spam) uses AI in combination with proven spam detection techniques and databases of known malicious IPs from around the world to detect and block unwanted visitors.
|
@@ -104,6 +106,10 @@ If hosting with Pantheon, see their [known issues page](https://pantheon.io/docs
|
|
104 |
|
105 |
== Changelog ==
|
106 |
|
|
|
|
|
|
|
|
|
107 |
= v5.2.14 =
|
108 |
|
109 |
* fix(woocommerce): fixes issues with woocommerce login not working, resolves #310
|
5 |
Requires at least: 5.2
|
6 |
Tested up to: 5.9.1
|
7 |
Requires PHP: 7.3
|
8 |
+
Stable tag: 5.2.15
|
9 |
License: GNU GPLv3
|
10 |
License URI: https://choosealicense.com/licenses/gpl-3.0/
|
11 |
|
13 |
|
14 |
== Description ==
|
15 |
|
16 |
+
**We stand with the Ukrainian people.** We at Zero Spam support those fighting to preserve freedom, democracy, and sovereignty in Ukraine. Because of this unlawful invasion by Russia, supported by Belarus, we will no longer provide protection for .ru, .su, and .by domains that have the plugin installed and will display a Ukrainian support banner on those sites.
|
17 |
+
|
18 |
Quit forcing people to answer questions or confusing captchas to prove they're not spam. Stop malicious users before they ever have a chance to infiltrate your site — **introducing Zero Spam for WordPress**.
|
19 |
|
20 |
[Zero Spam for WordPress](https://www.highfivery.com/projects/zero-spam/?utm_source=wordpress.org&utm_medium=plugin&utm_campaign=wordpress_zero_spam) uses AI in combination with proven spam detection techniques and databases of known malicious IPs from around the world to detect and block unwanted visitors.
|
106 |
|
107 |
== Changelog ==
|
108 |
|
109 |
+
= v5.2.15 =
|
110 |
+
|
111 |
+
* feat(ukraine): we'll no longer provide protection for .ru, .su, and .by domains & will display a banner of support for the ukrainian people on those sites - united with ukraine
|
112 |
+
|
113 |
= v5.2.14 =
|
114 |
|
115 |
* fix(woocommerce): fixes issues with woocommerce login not working, resolves #310
|
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.15
|
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.15' );
|
35 |
|
36 |
if ( defined( 'ZEROSPAM_DEVELOPMENT_URL' ) ) {
|
37 |
define( 'ZEROSPAM_URL', ZEROSPAM_DEVELOPMENT_URL );
|