• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Remove wp-emoji-release.min.js Loading From WordPress

By Abhishek Ghosh May 20, 2015 7:10 pm Updated on May 20, 2015

Remove wp-emoji-release.min.js Loading From WordPress

Advertisement

This new javascript of emoji is added in WordPress 4.2 which force loading wp-emoji-release.min.js at front end. Here is how to easily remove. Instead of doing these kind of “modern development”, re-writing WordPress in Python would be a better idea for the sake of page loading speed and eating resources by PHP. They have abnormal logic (we saw on official support page’s answer by a core developer) – the javascript loads asynchronously, so it does not impact the page loading speed. Obviously, it can not happen plus why we’ll load an unwanted javascript? It also loads the uncanny style sheets. Most serious websites do not use Emoji.

 

Understanding How We Will Remove wp-emoji-release.min.js Loading From WordPress

 

Frankly, adding these 4 lines in theme or child theme’s functions.php file will stop the stuffs to get loaded at front end, at least this works for latest Genesis Framework :

Vim
1
2
3
4
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); // no php needed above it
remove_action( 'wp_print_styles', 'print_emoji_styles' );
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'admin_print_styles', 'print_emoji_styles' ); // php is not closed in the last line

those admin_print_scripts things are for WordPress backend / admin panel. You can flush caches after adding the snippet and test on webpagetest dot org to see if anything is loading anymore. Here is our “success story” :

Advertisement

---

Remove wp-emoji-release.min.js Loading From WordPress

We found another alternative difficult logical way to remove along with removal from mail function, RSS etc. :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
if (!function_exists(disable_emojis)) {
function disable_emojis() {
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_action( 'admin_print_styles', 'print_emoji_styles' );
remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
}
add_action( 'init', 'disable_emojis' );
}

First snippet will work fine, we are using that.

 

Remove wp-emoji-release.min.js Loading From WordPress With Your Custom Plugin

 

You can read this article cum guide on how to create a basic plugin to add these kind snippets in one plugin instead of adding them on theme or child theme’s functions.php file.

We have that plugin on Github Gist, it is very light. You can wget it directly in /wp-content/plugins/ directory and activate it. It is basically for our own need, so you might not need all the functions.

 

Conditionally Load wp-emoji-release.min.js

 

It is quite obvious, you might want to have these stuffs on specific posts only. At this point we are beating all other others on guide on the same topic! Everyone can remove, but if we want to load conditionally, then? First, yo should only remove the stuffs from front end :

Vim
1
2
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); // no php needed above it
remove_action( 'wp_print_styles', 'print_emoji_styles' ); // php is not closed in the last line

Two lines chopped off. Now, you have to load these :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<script type="text/javascript">
window._wpemojiSettings = {"baseUrl":"http://s.w.org/images/core/emoji/72x72/","ext":".png","source":{"concatemoji":"http://127.0.0.1/HRIND/wp-includes/js/wp-emoji-release.min.js?ver=4.2.1"}};
            !function(a,b,c){function d(a){var c=b.createElement("canvas"),d=c.getContext&&c.getContext("2d");return d&&d.fillText?(d.textBaseline="top",d.font="600 32px Arial","flag"===a?(d.fillText(String.fromCharCode(55356,56812,55356,56807),0,0),c.toDataURL().length>3e3):(d.fillText(String.fromCharCode(55357,56835),0,0),0!==d.getImageData(16,16,1,1).data[0])):!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f;c.supports={simple:d("simple"),flag:d("flag")},c.supports.simple&&c.supports.flag||(f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);
</script>
<style type="text/css">
img.wp-smiley,
img.emoji {
    display: inline !important;
    border: none !important;
    box-shadow: none !important;
    height: 1em !important;
    width: 1em !important;
    margin: 0 .07em !important;
    vertical-align: -0.1em !important;
    background: none !important;
    padding: 0 !important;
}
</style>

on specific post via Theme’s snippet or script adding function. Genesis has this function. Frankly, you can add these on the post in text mode of Editor of the post.

Tagged With wp-emoji-release min js , papers by Abhishek Ghosh , wp-emoji-release , wp-emoji-release min , window _wpemojiSettings , wp emoji release , _wpemojiSettings , remove emoji wp , how to stop wp-emoji-release min js from loading , Source: wp-includes/js/twemoji min js
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Remove wp-emoji-release.min.js Loading From WordPress

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • Remove Junks From WordPress Header

    Remove RSD Link, RSS Feed, WordPress version, Version of Scripts & All Possible Junks From WordPress Header. Create Own Head & Shoulder Plugin.

  • Changing Data With cURL for OpenStack Swift (HP Cloud CDN)

    Changing Data With cURL For Object is Quite Easy in OpenStack Swift. Here Are Examples With HP Cloud CDN To Make it Clear. Official Examples Are Bad.

  • Steps To Install Nginx Plus on Ubuntu Server (HP Cloud)

    Here Are the Steps To Install Nginx Plus on Ubuntu Server Running on HP Cloud. Nginx Plus is the Paid Version of Nginx with Extra Features.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy