Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@ module.exports = function(grunt) {
}

// Fetch a list of the files that Twemoji supplies.
query = 'query={repository(owner: "jdecked", name: "twemoji") {object(expression: "v16.0.1:assets/svg") {... on Tree {entries {name}}}}}';
query = 'query={repository(owner: "jdecked", name: "twemoji") {object(expression: "v17.0.1:assets/svg") {... on Tree {entries {name}}}}}';
files = spawn( 'gh', [ 'api', 'graphql', '-f', query] );

if ( 0 !== files.status ) {
Expand Down
12 changes: 6 additions & 6 deletions src/js/_enqueues/lib/emoji-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,20 +271,20 @@ function browserSupportsEmoji( context, type, emojiSetsRenderIdentically, emojiR
return ! isIdentical;
case 'emoji':
/*
* Does Emoji 16.0 cause the browser to go splat?
* Is there a large, hairy, humanoid mythical creature living in the browser?
*
* To test for Emoji 16.0 support, try to render a new emoji: Splatter.
* To test for Emoji 17.0 support, try to render a new emoji: Hairy Creature.
*
* The splatter emoji is a single code point emoji. Testing for browser support
* required testing the center point of the emoji to see if it is empty.
* The hairy creature emoji is a single code point emoji. Testing for browser
* support required testing the center point of the emoji to see if it is empty.
*
* 0xD83E 0xDEDF (\uD83E\uDEDF) == 🫟 Splatter.
* 0xD83E 0x1FAC8 (\uD83E\u1FAC8) == 🫈 Hairy creature.
*
* When updating this test, please ensure that the emoji is either a single code point
* or switch to using the emojiSetsRenderIdentically function and testing with a zero-width
* joiner vs a zero-width space.
*/
const notSupported = emojiRendersEmptyCenterPoint( context, '\uD83E\uDEDF' );
const notSupported = emojiRendersEmptyCenterPoint( context, '\uD83E\u1FAC8' );
return ! notSupported;
}

Expand Down
20 changes: 2 additions & 18 deletions src/js/_enqueues/vendor/twemoji.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/wp-includes/formatting.php

Large diffs are not rendered by default.

14 changes: 12 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/16.0.1/72x72/';
private $svg_cdn = 'https://s.w.org/images/core/emoji/16.0.1/svg/';
private $png_cdn = 'https://s.w.org/images/core/emoji/17.0.1-1/72x72/';
private $svg_cdn = 'https://s.w.org/images/core/emoji/17.0.1-1/svg/';

/**
* @ticket 63842
Expand Down Expand Up @@ -157,6 +157,11 @@ public function data_wp_encode_emoji() {
'🧚',
'🧚',
),
array(
// Hairy creature (Unicode 17).
'🫈',
'🫈',
),
);
}

Expand Down Expand Up @@ -192,6 +197,11 @@ public function data_wp_staticize_emoji() {
'🧚',
'<img src="' . $this->png_cdn . '1f9da.png" alt="🧚" class="wp-smiley" style="height: 1em; max-height: 1em;" />',
),
array(
// Hairy creature (Unicode 17).
'🫈',
'<img src="' . $this->png_cdn . '1fac8.png" alt="🫈" class="wp-smiley" style="height: 1em; max-height: 1em;" />',
),
);

return $data;
Expand Down
Loading