Disable Emojis in WordPress with WPMasterToolKit
Since WordPress 4.2, emojis (those little smileys and visual icons) are natively supported by the CMS. However, this feature isn't always useful for all sites. Worse still, it can add unnecessary scripts and make page loading slightly heavier, which can impact performance. It's precisely to solve this problem that we've developed the Disable Emoji Support in WPMasterToolKit. This module completely disables emoji support on your WordPress site, optimizing its performance.
Which plugin can this module replace?
The module Disable Emoji Support can replace specific plugins designed to disable emojis, such as :
- Disable Emojis (GDPR friendly)
- Remove Emoji CSS and JS
With this module from WPMasterToolKit, you benefit from a native, lightweight solution, with no need to install an additional plugin.
Why disable emojis on WordPress?
While emojis are fun and useful for certain types of site (such as personal blogs or social media-oriented sites), they're rarely essential for professional or corporate sites. Plus:
- Performance enhancement Emoji scripts and styles are loaded on every page, even when not in use.
- RGPD Compliance emojis sometimes use external resources (for example, the
s.w.org
), which can pose problems for privacy-conscious sites. - Reduce unnecessary requests : By disabling emojis, you limit HTTP requests, contributing to a faster site.
How the Disable Emoji Support module works
The module Disable Emoji Support has been designed to be minimalist and efficient. Once activated, it disables all emoji-related aspects in WordPress. Here are the main actions performed by this module:
Removing emoji scripts and styles
- In the front-end : WordPress added emoji scripts and styles are removed via hooks
wp_head
,embed_head
andwp_print_styles
. - In administration (wp-admin) Scripts and styles linked to emojis are also disabled in the dashboard with hooks.
admin_print_scripts
andadmin_print_styles
.
Deactivating emoji features
- Filters that add emojis to RSS feeds or emails (e.g.
the_content_feed
,wp_mail
) are deleted. - The filter
emoji_svg_url
which provides the path to SVG emojis, is disabled by returningfalse
.
Removing emojis from the TinyMCE editor
In the visual editor (TinyMCE), the module removes the emoji plugin with the filter tiny_mce_plugins
.
No more DNS queries for emojis
The module deletes preloaded DNS queries (dns-prefetch
) related to the emoji domain, thus avoiding unnecessary requests to s.w.org
.
Deactivating smileys
If your site uses "smileys" (such as :-)
), these will also be disabled, as WordPress automatically converts them to emojis.
How to use this module
Using the Disable Emoji Support is disconcertingly simple.
- Install and activate the WPMasterToolKit plugin on your WordPress site.
- Activate the "Disable Emoji Support" module from the WPMasterToolKit dashboard. That's all there is to it! Once activated, emojis will be disabled throughout your site.
Our technical choices for this module
We've adopted a simple, optimized approach to ensure complete emoji deactivation. Here are some key technical choices:
- Modular approach : The module is only loaded if you activate it, in line with the "one module activated = one module loaded" philosophy.
- Using native hooks : We used hooks
remove_action
andremove_filter
to disable native WordPress emoji functionality. This avoids direct modification of the WordPress core and guarantees compatibility with future updates. - Targeted filtering Changes are applied only to specific emoji features, minimizing any impact on other parts of the site.
Conclusion
The module Disable Emoji Support from WPMasterToolKit is a perfect solution for WordPress site administrators who want to lighten their site and improve its performance. Whether it's for speed, privacy or simply because you don't need emojis, this module is a simple and effective option. Try it today and enjoy a faster, cleaner site!