WordPress emoji’s and how to remove them

Remove WordPress emoji’s

disable emoji scripts completely

Remove WordPress emoji'sWordPress introduced emoticons (well, they call them emoji’s, don’t ask me why) in version 4.2 of the popular Content Management System (CMS).

To be honest, we don’t understand why they did that. WordPress has evolved from a simple blogging platform to a full-blown CMS. Introducing emoticons as a standard feature to us seems like going back to their roots: a blogging platform, where emoticons (or emoji’s) would have a role.

But NOT in serious websites serving businesses, artists portfolio’s, online shopping, and so on. So, why WordPress has not introduced it as an option (“Would you like to enable emojicons? YES/NO”) is beyond us.

Anyway, to completely disable emojicons in WordPress (including in the editor screen) is simple. Add the following code to the ‘functions.php’ file of your WordPress theme:

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();