[How To] Disable Emojis To Make WordPress Faster

Since the release of WP 4.2 version, WordPress offers out of the box support for a host of new characters that include emojis, hieroglyphs, musical & mathematical symbols and so on. Needless to say, it can be quite a useful feature for publishers who want to decorate or include in their content characters like emojis.

On the contrary, since it loads an additional JavaScript on every page of your website, it can slightly slow down your site - and of course you always would want a fast Wordpress website.

 

Contents[Show]

If you are a blogger who doesn’t usually include in your emojis content, you might want to remove the this core functionality from your WordPress theme. In this post, we’ll explain how to remove the emoji support from your WordPress theme.

Please note that if your browser and operating system is bundled with the built-in emoji support, it will still work. What this tutorial does is that it disables the extra code bloat that is being added to the WordPress core in order to provide support for emojis in older browsers.

Removing emojis using a plugin

If you are looking for a plugin solution to remove the emoji functionality from your WordPress, just install and activate the Disable Emojis plugin. Simply activating this plugin will disable the emoji support on WordPress 4.2 and later versions. It works out of the box, and there are no settings for you to configure.

Removing emojis without a plugin

For removing emoji support, simply add the following code snippet to your functions.php file.

function disable_wp_emojicons() {

 // all actions related to emojis

 remove_action( 'admin_print_styles', 'print_emoji_styles' );

 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_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );

 remove_filter( 'the_content_feed', 'wp_staticize_emoji' );

 remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );

 // filter to remove TinyMCE emojis

 add_filter( 'tiny_mce_plugins', 'disable_emojicons_tinymce' );

}

add_action( 'init', 'disable_wp_emojicons' );

function disable_emojicons_tinymce( $plugins ) {

 if ( is_array( $plugins ) ) {

 return array_diff( $plugins, array( 'wpemoji' ) );

 } else {

 return array();

 }

}

The above code will remove the code and disable the emojis from your WordPress site. If you'd like to see other short WordPress tips and tricks, check out our full list here. If you want other tips to make WordPress faster, do check out our extensive article here: https://www.collectiveray.com/speed-up-wordpress

 

About the Author
Shahzad Saeed
Shahzaad Saaed has been featured in a large number of authority websites, as a WordPress expert. He specializes in content marketing to help business grow their traffic.

One more thing... Did you know that people who share useful stuff like this post look AWESOME too? ;-)
Please leave a useful comment with your thoughts, then share this on your Facebook group(s) who would find this useful and let's reap the benefits together. Thank you for sharing and being nice!

Disclosure: This page may contain links to external sites for products which we love and wholeheartedly recommend. If you buy products we suggest, we may earn a referral fee. Such fees do not influence our recommendations and we do not accept payments for positive reviews.

Author(s) Featured On:  Inc Magazine Logo   Sitepoint logo   CSS Tricks logo    webdesignerdepot logo   WPMU DEV logo   and many more ...