How to disable emojis in WordPress 4.2

How to Disable Emojis in WordPress (Stage by Action)

Are you searching to disable emojis on your WordPress internet site?

Emojis are modest icons that are utilised to specific emotions or feelings. WordPress hundreds added CSS and a JavaScript file to insert emoji support and some users may perhaps want to clear away it to make improvements to overall performance and pace.

In this article, we’ll show you how to quickly disable emojis in WordPress.

How to disable emojis in WordPress 4.2

What Are Emojis?

Emojis are the tiny icons or smileys used on the net.

Originating from Japan, emojis have created their way into the Unicode character set and are now supported by desktop computers as properly as iOS and Android cellular units.

The emojis aspect was initially introduced in WordPress 4.2 and the most important reason for introducing this feature was to include native assist for Chinese, Japanese, and Korean language character sets.

Emojis example

By default, WordPress loads an extra JavaScript file and some CSS to insert emoji guidance.

You can see it by viewing your website’s supply code or by using the Inspect device.

Emoji JavaScript in WordPress

Even so, some web page owners may want to disable this further emoji help to strengthen WordPress velocity and effectiveness by not downloading additional code and scripts.

Note: When we say disabling Emoji in WordPress, we imply disabling the more checks and scripts utilised by WordPress to handle Emojis. You can however use Emoji on your web-site, and the browsers that support them will nevertheless be equipped to display them.

Acquiring reported that, let’s acquire a search at how to conveniently disable Emoji assist in WordPress.

Approach 1. Disabling Emojis in WordPress Making use of Code

For this process, we’ll be using a personalized code snippet to disable emoji help in WordPress.

You can increase this code snippet to your WordPress theme’ functions.php file or a web-site-distinct plugin. On the other hand, a small error in the code could quickly break your internet site and make it inaccessible.

To avoid this, we suggest using WPCode. It is the best code snippets plugin for WordPress and gives the most secure way to increase custom made code to your web page with out breaking it.

Very first, you require to install and activate the WPCode plugin. For much more recommendations, see our guide on how to set up a WordPress plugin.

Just after activation, basically go to the Code Snippets » All Snippets website page from the WordPress admin dashboard.

From listed here, you have to have to click on the ‘Add New’ button at the best.

Add new code snippet

This will get you to the ‘Add Snippet’ website page.

From listed here, take your mouse over to the ‘Add Your Customized Code (New Snippet)’ selection and then click on the ‘Use snippet’ button.

Click Use Snippet button

This will carry you to the ‘Create Custom Snippet’ site. You can begin by typing a title for your code snippet. It can be anything at all you like.

Following that, you have to have to find ‘PHP Snippet’ as your ‘Code Type’ from the drop-down menu existing in the appropriate corner.

Type a name for your code snippet and choose PHP as code type

Now all you have to have to do is duplicate and paste the subsequent code in the ‘Code Preview’ box.

 * Disable the emoji's
function disable_emojis() 
 take out_motion( 'wp_head', 'print_emoji_detection_script', 7 )
 eliminate_motion( 'admin_print_scripts', 'print_emoji_detection_script' )
 clear away_motion( 'wp_print_styles', 'print_emoji_styles' )
 remove_action( 'admin_print_styles', 'print_emoji_styles' ) 
 take out_filter( 'the_information_feed', 'wp_staticize_emoji' )
 take away_filter( 'comment_textual content_rss', 'wp_staticize_emoji' ) 
 get rid of_filter( 'wp_mail', 'wp_staticize_emoji_for_email' )
 insert_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' )
 add_filter( 'wp_useful resource_hints', 'disable_emojis_get rid of_dns_prefetch', 10, 2 )

increase_action( 'init', 'disable_emojis' )

 * Filter perform used to remove the tinymce emoji plugin.
 * @param array $plugins 
 * @return array Variation betwen the two arrays
perform disable_emojis_tinymce( $plugins ) 
 if ( is_array( $plugins ) ) 
 return array_diff( $plugins, array( 'wpemoji' ) )
 return array()

 * Eliminate emoji CDN hostname from DNS prefetching hints.
 * @param array $urls URLs to print for source hints.
 * @param string $relation_style The relation type the URLs are printed for.
 * @return array Change betwen the two arrays.
purpose disable_emojis_get rid of_dns_prefetch( $urls, $relation_kind ) 
 if ( 'dns-prefetch' == $relation_type ) 
 /** This filter is documented in wp-contains/formatting.php */
 $emoji_svg_url = implement_filters( 'emoji_svg_url', '' )

$urls = array_diff( $urls, array( $emoji_svg_url ) )

return $urls

Paste your code snippet

Soon after that, scroll down to the ‘Insertion’ segment to pick out an insert strategy for your code.

Just choose the ‘Auto Insert’ method so that the code can be mechanically executed on your internet site on activation.

Choose Auto Insert as insert method

Now go back again to the top rated of the web page and toggle the switch on the right from ‘Inactive’ to ‘Active’.

At last, click the ‘Save Snippet’ button to save your personalized code snippet.

Click the Save Snippet button to save changes

That is all, you have effectively disabled emojis in WordPress.

Method 2. Disable Emojis in WordPress Working with a Plugin

For this approach, we’ll be making use of a plugin to disable Emojis in WordPress.

Initial, you require to put in and activate the Disable Emojis plugin. See our tutorial on how to put in a WordPress plugin for more instructions.

The plugin works out of the box and there are no options for you to configure.

On activation, it will mechanically disable emoji assist from your WordPress website.

We hope this article served you understand how to disable Emojis on your WordPress web site. You may also want to check out our tutorial on how to create a tailor made Fb feed in WordPress and our posting on how to incorporate world-wide-web force notifications to your WordPress web page.

If you liked this short article, then remember to subscribe to our YouTube Channel for WordPress movie tutorials. You can also uncover us on Twitter and Fb.

7 thoughts on “How to Disable Emojis in WordPress (Stage by Action)

  1. I love it whenever people get together and share ideas.
    Great website, stick with it!

Leave a Reply

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