Properly remove emojis from WordPress admin and site

An emoji is a pictural representation of humans’ face expression which is used in a writing form. In other words, an emoji is a smiley face we all use on a daily basis through smartphones and computers. The first digital usage of a smiley face can be tracked down back 1982, and we don’t have to express how popular they have become. To learn more about the whole thing, visit Wikipedia pages on Emoticons.

Although terms “emoji”, “emoticon” and “smiley” sound like synonyms, there are differences between them. But if you’re not a developer, that shouldn’t concern you much.

WordPress emoji shortcuts

Emoji support was introduced to WordPress 4.2. By default, WordPress will convert text smileys into cute pictures, and you can use them anywhere – from posts and pages to comments and admin area.

We definitely recommend removing emoji. It’ll speed up your site.

Although they look adorable, for most people, emoji support is just one big mess that’s slowing their site down. By default, emojis are enabled and there’s no option to disable them. Thankfully you can easily remove them with a few lines of code in the theme’s functions.php or by using the Disable Emojis plugin.

Remove emoji by copy/pasting code

Follow the usual procedure – copy/paste the following code in your active theme’s functions.php file or to your site-specific plugin.

// Disable Emoji Mess
function disable_wp_emojicons() {
  add_filter( 'tiny_mce_plugins', 'disable_emojicons_tinymce');
  remove_action('admin_print_styles', 'print_emoji_styles');
  remove_action('wp_head', 'print_emoji_detection_script', 1);
  remove_action('admin_print_scripts', 'print_emoji_detection_script');
  remove_action('wp_print_styles', 'print_emoji_styles');
  remove_filter('wp_mail', 'wp_staticize_emoji_for_email');
  remove_filter('the_content_feed', 'wp_staticize_emoji');
  remove_filter('comment_text_rss', 'wp_staticize_emoji'); 
}

function disable_emojicons_tinymce( $plugins ) {
  if (is_array($plugins)) {
    return array_diff($plugins, array('wpemoji'));
  } else {
    return array();
  }
}

add_action('init', 'disable_wp_emojicons');

Disable Emojis plugin

PRICE: Free

We recommend that you disable emojis by adding your code, but if you’re not confident enough to modify the functions.php, here’s a free plugin that can save you. All that you have to do is to install the plugin from the WordPress repository and activate it. The rest will be done by the plugin so there are no any additional things you will need to deal with.

If emojis are showing up on your website even after you install this plugin, don’t worry. Some browsers will automatically convert text to emoticons so don’t blame the plugin. Disable Emojis will only remove the additional code from your site, and this can help you in speeding up your site. You can continue your work on speeding up the site by checking out these 10 things.

START YOUR OWN BLOG

This guide is an introduction to mastering the art of blogging. It provides easy to follow steps to start, maintain, and grow your blog.

Read the guide

One thought on “Properly remove emojis from WordPress admin and site

Leave a Reply

Your email address will not be published. Required fields are marked *