The Most straightforward Way to Disable Emojis in WordPress

Are you wanting for a way to disable emojis in WordPress? ✋ Disabling the WordPress emoji file can eradicate an HTTP request on your web-site, without impacting the encounter for most of your readers.

Thankfully, it’s actually uncomplicated to disable emojis in WordPress using a no cost plugin. Nevertheless, for extra technological customers, you might favor to disable emojis using code. This involves you to edit your child theme’s capabilities.php file (or apply the code to a code snippets plugin).

Why you may well want to disable emojis in WordPress

✌️ 🍸 😷 🏆 💫 🌱 🍠 ⏯ 🙍 🍑 😐 🐞 🎢 💡 🐼 📘 🚁 📅 💻 😗 ☂ ⛎ 📣 🙃 📲 👥 ✂️

The key cause to disable WordPress emojis is to make improvements to functionality on your web-site.

By default, WordPress now supports most emojis in modern day browsers without having the have to have for any extra files. However, to be certain help for more mature browsers, WordPress additional additional emoji assistance in WordPress 4.2. In current versions, this emoji support provides a one wp-emoji-release.min.js file to every single page on your web page.

Loading this file adds an extra HTTP ask for to your web site. But at the similar time, it is not wanted to make emojis perform for most of your buyers. As this sort of, disabling this file can help you lower your HTTP requests and attain a really smaller effectiveness enhance.

It’s important to be apparent that when we talk about “disabling emojis in WordPress,” we’re actually targeted on disabling the extra emoji file bloat that WordPress hundreds. Even if you disable this file, most people will nevertheless be ready to insert and see emojis.

👉 For instance, they could use their device’s emoji keyboard or copy and paste from a web page like Emojipedia.

The simplest way to disable emojis in WordPress

Now that you know why you could possibly want to disable emojis in WordPress, let’s just take a appear at the easiest way to do so.

  1. Disable emojis in WordPress making use of a plugin
  2. Disable emojis in WordPress working with code

1. Disable emojis in WordPress utilizing a plugin

The most straightforward way to disable emojis in WordPress is to use a plugin like Disable Emojis (GDPR friendly). When the plugin does not take out emojis, it disables the additional checks and scripts that cause bloat on your web site.

This way, you can continue to allow for website visitors to use (and see) emojis as prolonged as their browser supports this operation.

Additionally, you can assure that your web site continues to be GDPR-helpful, and sustain a sleek person practical experience (UX).

One particular of the greatest elements about Disable Emojis is that it is totally absolutely free and tremendous quick to established up. All you need to do is head to Plugins > Insert New inside of your WordPress dashboard. Then, lookup for “Disable Emojis:”

Install the Disable Emojis plugin.

Below, click on Put in Now > Activate. The plugin starts off operating instantly. In actuality, there are no configuration settings that need to have to be utilized, so at this stage, you are all established.

2. Disable emojis in WordPress working with code

Even though a plugin is the simplest way to disable emojis in WordPress, you can also disable emojis employing code. However, you’d have to have to edit your child theme’s features.php file which demands some technical understanding. As well as, it can be dangerous given that a incorrect line of code can split your website.

That is why you may possibly like to make the improve by making use of the code to a plugin like Code Snippets.

It is ideal for rookies given that it allows you to edit crucial factors of your web site with out the possibility of breaking it. Additionally, it is completely totally free, so you can go proper forward and install the plugin from your dashboard.

At the time you have activated the plugin, just head to Snippets from your admin location. Then, click on on Increase New. You are going to see a blank snippet box like this one particular:

Adding new snippet.

Give your snippet a title initially – a thing like “disable emojis” would make sense. Subsequent, paste in the subsequent code snippet into the key snippet box:

/**
 * Disable the emoji's
 */
functionality disable_emojis() 
 get rid of_motion( 'wp_head', 'print_emoji_detection_script', 7 )
 take away_motion( 'admin_print_scripts', 'print_emoji_detection_script' )
 get rid of_action( 'wp_print_styles', 'print_emoji_styles' )
 take out_motion( 'admin_print_styles', 'print_emoji_styles' ) 
 remove_filter( 'the_material_feed', 'wp_staticize_emoji' )
 clear away_filter( 'comment_textual content_rss', 'wp_staticize_emoji' ) 
 clear away_filter( 'wp_mail', 'wp_staticize_emoji_for_email' )
 add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' )
 increase_filter( 'wp_resource_hints', 'disable_emojis_take away_dns_prefetch', 10, 2 )

add_action( 'init', 'disable_emojis' )
 
/**
 * Filter functionality used to remove the tinymce emoji plugin.
 * 
 * @param array $plugins 
 * @return array Big difference betwen the two arrays
 */
function disable_emojis_tinymce( $plugins ) 
 if ( is_array( $plugins ) ) 
 return array_diff( $plugins, array( 'wpemoji' ) )
  else 
 return array()
 

 
/**
 * Remove emoji CDN hostname from DNS prefetching hints.
 *
 * @param array $urls URLs to print for useful resource hints.
 * @param string $relation_kind The relation type the URLs are printed for.
 * @return array Variance betwen the two arrays.
 */
purpose disable_emojis_get rid of_dns_prefetch( $urls, $relation_form ) 
 if ( 'dns-prefetch' == $relation_type ) 
 /** This filter is documented in wp-consists of/formatting.php */
 $emoji_svg_url = implement_filters( 'emoji_svg_url', 'https://s.w.org/photos/main/emoji/2/svg/' )
 
$urls = array_diff( $urls, array( $emoji_svg_url ) )
 
 
return $urls

Lastly, select the selection to Operate the snippet just about everywhere (picture previously mentioned) and click on on Help save Improvements and Activate.

Your snippet is now functioning and the emojis have been disabled from your WordPress web-site. 🙋‍♂️

Disable emojis in WordPress to boost overall performance 📈

WordPress launched emojis to insert indigenous help to language character sets. Nevertheless, because of to the additional scripts and code they involve, emojis can gradual down your web-site. Consequently, you might want to disable emojis in WordPress to make improvements to your general performance.

To recap, here are two very simple techniques to disable emojis in WordPress:

  1. 🔌 Disable emojis in WordPress applying the straightforwardly-named plugin, Disable Emojis (GDPR helpful).
  2. 👨‍💻 Disable emojis in WordPress employing code. You can do this immediately by modifying your functions.php file, or use a code snippets plugin like Code Snippets.

Do you have any issues about how to disable emojis in WordPress? Allow us know in the feedback part down below!

&#13

Leave a Reply