,

How To Use Emoji One On Your Site

·

Sol 4707

·

Emoji One, an open-source emoji set, revealed their 2016 collection last month and it is beautiful!

WordPress natively uses Twiemoji, a “competing” set sponsored by Twitter when the browser can not display emoji, so how do you switch which is used?

The quick answer is to add this to a core functionality plugin or your theme’s functions.php:


add_filter( 'emoji_url', 'bk_replace_emoji' );

function bk_replace_emoji() {
return 'https://cdnjs.cloudflare.com/ajax/libs/emojione/2.0.0/assets/png/';
}

This utilizes a CloudFlare-sponsored CDN to serve the emoji images. Alternatively, you can download the PNG images from the Emoji One developers page, upload them to your own site, and use that URL instead.

In this case, we still rely on WordPress’ emoji-replacing JavaScript, so you’d still miss out on some Unicode 8 and diversity emoji on WordPress 4.4 (added in about-to-ship 4.4.1), but it is an easy, low-maintenance way to use a different icon set.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.