Skip to content

Commit 875e8e8

Browse files
committed
Emoji: Update Twemoji to 17.0.2.
Updates the endpoint for Twemoji images to use those released in 17.0.2, following an upstream minor release optimizing the SVG images. Modifies the build script to pull the image file names from the `gh-pages`/deploy branch of Twemoji upon the advice of their contributors. Props peterwilsoncc, paulkevan, wildworks, desrosj. Fixes #64184. git-svn-id: https://develop.svn.wordpress.org/trunk@61194 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 61bde4a commit 875e8e8

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,7 @@ module.exports = function(grunt) {
11591159
}
11601160

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

11651165
if ( 0 !== files.status ) {

src/js/_enqueues/vendor/twemoji.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ var twemoji = (function (
534534
how = {callback: how};
535535
}
536536

537-
// WP start
537+
// WP start
538538
// Allow passing of the doNotParse() callback in the settings.
539539
// The callback is used in `grabAllTextNodes()` (DOM mode only) as a filter
540540
// that allows bypassing of some of the text nodes. It gets the current subnode as argument.

src/wp-includes/formatting.php

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

tests/phpunit/tests/formatting/emoji.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
*/
77
class Tests_Formatting_Emoji extends WP_UnitTestCase {
88

9-
private $png_cdn = 'https://s.w.org/images/core/emoji/17.0.1-1/72x72/';
10-
private $svg_cdn = 'https://s.w.org/images/core/emoji/17.0.1-1/svg/';
9+
private $png_cdn = 'https://s.w.org/images/core/emoji/17.0.2/72x72/';
10+
private $svg_cdn = 'https://s.w.org/images/core/emoji/17.0.2/svg/';
1111

1212
/**
1313
* @ticket 63842
@@ -122,15 +122,15 @@ public function test_wp_emoji_list_returns_data() {
122122
$entities = _wp_emoji_list( 'entities' );
123123
$this->assertNotEmpty( $entities, 'Entities should not be empty' );
124124
$this->assertIsArray( $entities, 'Entities should be an array' );
125-
// Emoji 15 contains 3718 entities, this number will only increase.
126-
$this->assertGreaterThanOrEqual( 3718, count( $entities ), 'Entities should contain at least 3718 items' );
125+
// Emoji 17 contains 4007 entities, this number will only increase.
126+
$this->assertGreaterThanOrEqual( 4007, count( $entities ), 'Entities should contain at least 4007 items' );
127127
$this->assertSame( $default, $entities, 'Entities should be returned by default' );
128128

129129
$partials = _wp_emoji_list( 'partials' );
130130
$this->assertNotEmpty( $partials, 'Partials should not be empty' );
131131
$this->assertIsArray( $partials, 'Partials should be an array' );
132-
// Emoji 15 contains 1424 partials, this number will only increase.
133-
$this->assertGreaterThanOrEqual( 1424, count( $partials ), 'Partials should contain at least 1424 items' );
132+
// Emoji 17 contains 1438 partials, this number will only increase.
133+
$this->assertGreaterThanOrEqual( 1438, count( $partials ), 'Partials should contain at least 1438 items' );
134134

135135
$this->assertNotSame( $default, $partials );
136136
}

0 commit comments

Comments
 (0)