• 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

This Article Has Been Shared 892 Times!

Facebook Twitter Pinterest
Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Orthopaedic 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

  • Responsive Web Design, Grid System and Mobile Website

    Responsive Web Design, Grid System and Mobile Website are used for making a website easily viewable on any mobile devices including Tablets. Here is a guide.

  • Podcast and WordPress : Tips

    Podcast and WordPress can make the older posts more lively again. A small introduction Podcast can increase the conversion. Here is a detailed guide.

  • Post Specific Widget with Semantic Markup for WordPress

    Post specific widget with Semantic Markup for WordPress is a kind of template Plugin for more flexibility. You can create infobox like Wikipedia.

  • RESTful API for WordPress to Enable Public HTTP GET Request for Posts

    RESTful API for WordPress Can Enable Many Features to a Website Like We Can Fetch Data for Facebook Page from Widget via HTTP GET Request.

  • InnoDB Table Optimization for WordPress

    InnoDB Table Optimization for WordPress is followup for our previous guide to use InnoDB Engine. Most plugins will not support optimization.

Additionally, 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

You can subscribe to our Free Once a Day, Regular Newsletter by clicking the subscribe button below.

Click To Subscribe

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 (20K Followers)
  • Twitter (4.9k Followers)
  • Facebook (5.8k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.2k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • What is Inertial Navigation System? January 25, 2021
  • What is Miniaturization? January 24, 2021
  • What is Domain-Driven Design (DDD)? January 23, 2021
  • Top 10 Anti Hacking Software for Microsoft Windows January 22, 2021
  • What is Software Modernization? January 21, 2021

 

About This Article

Cite this article as: Abhishek Ghosh, "Remove wp-emoji-release.min.js Loading From WordPress," in The Customize Windows, May 20, 2015, January 25, 2021, https://thecustomizewindows.com/2015/05/remove-wp-emoji-release-min-js-loading-from-wordpress/.

Source:The Customize Windows, JiMA.in

 

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Cookie Policy.

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

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

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