Skip to content

Commit 7121f63

Browse files
committed
fix(emojis): fix for fatal error when emojis are disabled
1 parent 1edfa24 commit 7121f63

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

modules/security/class-security.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function init() {
5757
remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
5858
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
5959
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
60-
add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' );
60+
add_filter( 'tiny_mce_plugins', array( $this, 'disable_emojis' ) );
6161
}
6262

6363
if (
@@ -178,6 +178,17 @@ public function settings( $settings ) {
178178
return $settings;
179179
}
180180

181+
/**
182+
* Disables emojis
183+
*/
184+
public function disable_emojis( $plugins ) {
185+
if ( is_array( $plugins ) ) {
186+
return array_diff( $plugins, array( 'wpemoji' ) );
187+
} else {
188+
return array();
189+
}
190+
}
191+
181192
/**
182193
* Disables RSS feeds
183194
*/

readme.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Donate link: https://www.zerospam.org/subscribe/
55
Requires at least: 5.2
66
Tested up to: 6.0.2
77
Requires PHP: 7.3
8-
Stable tag: 5.4.2
8+
Stable tag: 5.4.3
99
License: GNU GPLv3
1010
License URI: https://choosealicense.com/licenses/gpl-3.0/
1111

@@ -21,7 +21,7 @@ Protect against spam, malicious users, attacks like web & port scans, brute forc
2121

2222
* No captcha, spam isn't a users' problem
2323
* No moderation queues, spam isn't a administrators' problem
24-
* Advanced behavior detection engine able to dynamically block threats
24+
* Behavior detection engine able to dynamically block threats
2525
* Integrates with global IP reputation providers
2626
* Allows admins to block IPs temporarily or permanently
2727
* Geolocation integration to track where threats are coming from
@@ -107,6 +107,10 @@ If hosting with Pantheon, see their [known issues page](https://pantheon.io/docs
107107

108108
== Changelog ==
109109

110+
= v5.4.3 =
111+
112+
* fix(emojis): fix for fatal error when emojis are disabled
113+
110114
= v5.4.2 =
111115

112116
* feat(ipbase): added support for ipbase.com

wordpress-zero-spam.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Plugin Name: Zero Spam for WordPress
1414
* Plugin URI: https://www.highfivery.com/projects/zero-spam/
1515
* Description: Tired of all the ineffective WordPress anti-spam & security plugins? Zero Spam for WordPress makes blocking spam &amp; malicious activity a cinch. <strong>Just activate, configure, and say goodbye to spam.</strong>
16-
* Version: 5.4.2
16+
* Version: 5.4.3
1717
* Requires at least: 5.2
1818
* Requires PHP: 7.3
1919
* Author: Highfivery LLC
@@ -31,7 +31,7 @@
3131
define( 'ZEROSPAM', __FILE__ );
3232
define( 'ZEROSPAM_PATH', plugin_dir_path( ZEROSPAM ) );
3333
define( 'ZEROSPAM_PLUGIN_BASE', plugin_basename( ZEROSPAM ) );
34-
define( 'ZEROSPAM_VERSION', '5.4.2' );
34+
define( 'ZEROSPAM_VERSION', '5.4.3' );
3535

3636
if ( defined( 'ZEROSPAM_DEVELOPMENT_URL' ) ) {
3737
define( 'ZEROSPAM_URL', ZEROSPAM_DEVELOPMENT_URL );

0 commit comments

Comments
 (0)