• 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 415 Times!

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

  • 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

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

  • What is ChatGPT? February 3, 2023
  • Zebronics Pixaplay 16 : Entry Level Movie Projector Review February 2, 2023
  • What is Voice User Interface (VUI) January 31, 2023
  • Proxy Server: Design Pattern in Programming January 30, 2023
  • Cyberpunk Aesthetics: What’s in it Special January 27, 2023

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, February 5, 2023, https://thecustomizewindows.com/2015/05/remove-wp-emoji-release-min-js-loading-from-wordpress/.

Source:The Customize Windows, JiMA.in

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

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT