This plugin disables the WordPress emoji functionality, removing unnecessary code bloat that adds support for emojis in older browsers.
What it does
- Removes the emoji detection script from
wp_headand the admin - Removes emoji styles from
wp_print_stylesand admin - Removes emoji DNS prefetching, preventing connections to
s.w.org - Removes the
wpemojiTinyMCE plugin - Strips emoji CDN hostname from DNS prefetch hints
Performance & Privacy
Emojis will still display in modern browsers that have built-in support. This plugin simply removes the extra HTTP requests and JavaScript overhead for browsers that don’t need it. Additionally, it prevents DNS prefetching to WordPress.org’s emoji CDN, improving privacy.
Note: Emoticons like :) will continue to work as expected.
Requirements
- PHP 7.4+
- WordPress 5.0+
GDPR compliancy
This plugin does not send any data to external servers. It disables DNS prefetching of emojis within WordPress, which should ensure improved privacy. To determine if your site is GDPR compliant, please seek legal advice. I have done my best to ensure the plugin is 100% GDPR compliant, but I am not a lawyer so cannot guarantee anything.
Architecture
The plugin uses:
- PSR-4 autoloading — classes in
src/are autoloaded via Composer under theRyanHellyer\DisableEmojisnamespace. - Inpsyde Modularity — the plugin is structured as a module implementing
ExecutableModule, bootstrapped via the library’sPackageclass.
Quality
All code uses declare(strict_types=1) and follows PSR-12. The plugin runs the following tooling:
- PHP_CodeSniffer (run via
composer phpcs) — sniffs for PSR-12 violations - PHP-CS-Fixer (run via
composer cs) — dry-run style check - PHPStan at level 6 (run via
composer phpstan) — static analysis
