How to Disable Emoji Smileys in WordPress? Completely Remove Emojis

In the latest WordPress versions (since WP 4.2), all your emoticons are shown as Emoji 🙂 smileys. For most, it is a nice little update to make the website livelier. ✌️ Some might not want the Emoji emoticons @:- on their WordPress blogs/websites. How to disable Emoji smileys in WordPress? 🙁

Since WP 4.2, emojis (smileys) were added, which adds JS and CSS on your pages so that your text emoticons are shown as Emoji smileys. Emojis are supported on iOS, Android, macOS, Windows, and Linux. Use Emoji Classic for older systems.

If Emoji smileys are not your thing or you don’t want to burden your website with extra JS & CSS, you can disable Emoji emoticons on your WordPress website. How does one remove ⚒ Emoji from WordPress?

Here’s the quick recipe to disable and remove Emojis from your WordPress website. Simply copy-paste the code to your WordPress theme’s functions.php file and you are good to go.

// Function to Disable Emojis in TinyMCE Editor 
function kill_emojis_on_tinymce( $plugins ) {
  if ( is_array( $plugins ) ) {
    return array_diff( $plugins, array( 'wpemoji' ) );
  } else {
    return array();
  }
}

// Function to Disable Emoji-Specific Functions
function kill_wp_emojis() {

  // Remove Emoji
  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' );

  // Remove TinyMCE emojis via Filter
  add_filter( 'tiny_mce_plugins', 'kill_emojis_on_tinymce' );

  // Remove DNS Prefetch for Emojis via Filter
  add_filter( 'emoji_svg_url', '__return_false' );

 }

add_action( 'init', 'kill_wp_emojis' );

Want an easier option? You can use WordPress plugins to Disable Emojis. Alternatively, you can revert to the good old smilies of WordPress using Classic Smilies. 🐵 Yo!

Leave a Reply

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