Skip to content

Remove Emoji Metadata and Scripts from WordPress

TeroVesalainen / Pixabay

In Version 4.2 WordPress introduced Emoji Support. No you can messs with all those tiny icons that tend to express emotions better and shorter than words. While Emojis prove very useful in mobile environments, they are not so much present in the desktop-world.

Anyways WordPress can show them and to do that it neeeds a script that creates a tiny overhead. If you are like me and don’t regularly use Emoji on your website, then you therefore do not neet that script in your code and can reduce filesize and keep your sourcecode slick and clean.

Fortunately there is a simple trick to remove that unwanted functionality. Just drop these lines in your functions.php and you are done.

remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'wp_print_styles', 'print_emoji_styles' ); 

 

Dieser Beitrag hat 0 Kommentare

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

An den Anfang scrollen