In addition to our article on Fonts Scripts, ihere are concerns about data protection when using the Twemoji Font Script.
In this guide, we’ll walk you through the steps necessary to remove Twemoji from your WordPress site.
Twemoji is a Font Script project developed by X (formerly Twitter) that offers a comprehensive set of emojis compatible with various platforms.
Launched in 2014, Twemoji aims to provide emojis that are uniform in design and appearance, regardless of the device or operating system used.
Few know it, but since version 4.2, released in April 2015, WordPress has included Twemoji by default.
However, some users may prefer to disable Twemoji for a variety of reasons, such as performance optimization, preference for native device emojis or the visual style of emojis.
Twemoji’s default integration in WordPress means that emojis are loaded from X’s servers (e.g. Twitter).
This may raise data protection and privacy concerns:
One of the easiest ways to disable Twemoji is to use a plugin.
Here’s how:
If you prefer not to use a plugin, you can add code to your functions.php file.
Follow these steps:
Please note that this method is more advanced.
Modifying functions.php is for advanced users only.
/**
* Disable the emoji's
*/
function disable_emojis() {
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
remove_action( 'admin_print_styles', 'print_emoji_styles' );
remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
// Remove from TinyMCE
add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' );
}
add_action( 'init', 'disable_emojis' );
/**
* Filter out the tinymce emoji plugin.
*/
function disable_emojis_tinymce( $plugins ) {
if ( is_array( $plugins ) ) {
return array_diff( $plugins, array( 'wpemoji' ) );
} else {
return array();
}
}
3. Check emoji deactivation:
Once you’ve added the code, you can check by visiting a page or article on your site containing emojis to see if they now appear using the device’s native style.
Using Font Scripts like Twemoji involves nFADP and GDPR compliance issues.
Disabling Twemoji on your WordPress site is easy and can be achieved in a variety of ways, depending on your preferences.
Whether you choose to use a plugin or add code directly, these methods will allow you to revert to native device emojis, potentially improve your site’s performance and better protect your users’ privacy.
Our support team is available at the following address address below: support@biskoui.ch