- Joined
- Sep 3, 2014
- Messages
- 6,244
- Likes
- 13,130
- Degree
- 9
With Wordpress 4.2, I just discovered that it's forcing the call of a javascript file and adding some CSS in the header called:
I'm never going to use emoji's and I'm not happy with the two additional HTTP requests and extra bandwidth bulk. So I discovered that there's already a plugin to get rid of it:
You can use that, but all it does is what I'm about to paste. You can simply go to your functions.php file from within the Wordpress Dashboard and add the following:
Viola. Problem resolved.
I HATE smilies
P.S. Don't forget to clear your cache or CDN or it'll keep loading.
Code:
<script type="text/javascript">
window._wpemojiSettings = {"baseUrl":"http:\/\/s.w.org\/images\/core\/emoji\/72x72\/","ext":".png","source":{"concatemoji":"http:\/\/www.mysite.com\/wp\/wp-includes\/js\/wp-emoji-release.min.js?ver=4.2"}};
!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>
I'm never going to use emoji's and I'm not happy with the two additional HTTP requests and extra bandwidth bulk. So I discovered that there's already a plugin to get rid of it:
You can use that, but all it does is what I'm about to paste. You can simply go to your functions.php file from within the Wordpress Dashboard and add the following:
Code:
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
Viola. Problem resolved.
I HATE smilies
P.S. Don't forget to clear your cache or CDN or it'll keep loading.