EMOJIS-HOW TO DISABLE THEM ON WORDPRESS

You already voted!
Disabling Emojis on WordPress

Table of Contents

PLUGIN OPTION

WordPress allows you to install and activate the Disable Emojis plugin if you want to disable emoji capabilities in your WordPress. On WordPress 4.2 and later versions, just activating this plugin disables emoji support. There are no settings to adjust, and it works right out of the box.

Emojis can also be disabled with many performance plugins (such as WP-Rocket). If you aren’t already doing so, this post will show you how to disable in WordPress using a plugin. I’ll also teach you how to disable Emoji support using a code snippet in your functions.php file.

DISABLE EMOJIS WITHOUT A PLUGIN

Emojis have been integrated into WordPress since version 4.2. It used JavaScript and other junk to add emoji characters. It causes the site to slow down for no apparent reason, and I don’t use it. Here’s how to speed up your site by removing needless HTML and emoji URL requests from every page. Add the following code to your functions.php file in the themes folder to disable, but make sure you create a backup first.

function disable_wp_emojicons() {
  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' );
  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();
  }
}
add_filter( 'emoji_svg_url', '__return_false' );

The above code when executed will turn off the emojis on your WordPress site.

Leave a Comment

Your email address will not be published.