How to disable emojis from WP 4.2+

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.

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.

 

One more thing...

Do you have friends or a Facebook group who you think would find this useful? Share this with them and then let me know what they think.

Want to supercharge your website?

 
Our website loads FAST ... just 1.29 seconds. We're hosted on FAST InMotion VPS servers We want YOUR website to be fast too, so we've gotten you an exclusive deal - 47% OFF for DART Creations friends + FREE domain! Check it out NOW!