Skip to content

Commit

Permalink
Emoji: Update the Twemoji to version 14.0.2.
Browse files Browse the repository at this point in the history
This version introduces support for the latest Emoji added in Emoji 14. 

"Insert witty comment newly supported emoji."

Props kraftbj, desrosj, dd32, milana_cap.
Fixes #55395.




git-svn-id: https://develop.svn.wordpress.org/trunk@53150 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
peterwilsoncc authored and adamziel committed Apr 12, 2022
1 parent 424a700 commit 8800abc
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 23 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
"react": "17.0.1",
"react-dom": "17.0.1",
"regenerator-runtime": "0.13.9",
"twemoji": "13.1.0",
"twemoji": "14.0.2",
"underscore": "1.13.1",
"whatwg-fetch": "3.6.2"
},
Expand Down
19 changes: 11 additions & 8 deletions src/js/_enqueues/lib/emoji-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,23 +115,26 @@
return ! isIdentical;
case 'emoji':
/*
* Burning Love: Just a hunk, a hunk of burnin' love.
* Why can't we be friends? Everyone can now shake hands in emoji, regardless of skin tone!
*
* To test for Emoji 13.1 support, try to render a new emoji: Heart on Fire!
* To test for Emoji 14.0 support, try to render a new emoji: Handshake: Light Skin Tone, Dark Skin Tone.
*
* The Heart on Fire emoji is a ZWJ sequence combining ❤️ Red Heart, a Zero Width Joiner and 🔥 Fire.
* The Handshake: Light Skin Tone, Dark Skin Tone emoji is a ZWJ sequence combining 🫱 Rightwards Hand,
* 🏻 Light Skin Tone, a Zero Width Joiner, 🫲 Leftwards Hand, and 🏿 Dark Skin Tone.
*
* 0x2764, 0xfe0f == Red Heart emoji.
* 0x200D == Zero-Width Joiner (ZWJ) that links the two code points for the new emoji or
* 0x1FAF1 == Rightwards Hand
* 0x1F3FB == Light Skin Tone
* 0x200D == Zero-Width Joiner (ZWJ) that links the code points for the new emoji or
* 0x200B == Zero-Width Space (ZWS) that is rendered for clients not supporting the new emoji.
* 0xD83D, 0xDD25 == Fire.
* 0x1FAF2 == Leftwards Hand
* 0x1F3FF == Dark Skin Tone.
*
* When updating this test for future Emoji releases, ensure that individual emoji that make up the
* sequence come from older emoji standards.
*/
isIdentical = emojiSetsRenderIdentically(
[0x2764, 0xfe0f, 0x200D, 0xD83D, 0xDD25],
[0x2764, 0xfe0f, 0x200B, 0xD83D, 0xDD25]
[0x1FAF1, 0x1F3FB, 0x200D, 0x1FAF2, 0x1F3FF],
[0x1FAF1, 0x1F3FB, 0x200B, 0x1FAF2, 0x1F3FF]
);

return ! isIdentical;
Expand Down
10 changes: 5 additions & 5 deletions src/wp-includes/formatting.php

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions tests/phpunit/tests/formatting/emoji.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*/
class Tests_Formatting_Emoji extends WP_UnitTestCase {

private $png_cdn = 'https://s.w.org/images/core/emoji/13.1.0/72x72/';
private $svn_cdn = 'https://s.w.org/images/core/emoji/13.1.0/svg/';
private $png_cdn = 'https://s.w.org/images/core/emoji/14.0.0/72x72/';
private $svn_cdn = 'https://s.w.org/images/core/emoji/14.0.0/svg/';

/**
* @ticket 36525
Expand Down

0 comments on commit 8800abc

Please sign in to comment.