Make WordPress Core


Ignore:
Timestamp:
02/13/2024 02:34:17 PM (13 months ago)
Author:
desrosj
Message:

Emoji: Replace twitter/twemoji with jdecked/twemoji.

After a chaotic change of ownership, the twitter/twemoji library is now considered abandoned.

After waiting for this moment to arise, a fork was created by several former employees who had maintained the library which lives at jdecked/twemoji on GitHub.

This switches out where the underlying source code comes from for the library, and applies the 15.0.3 update, which adheres to the Unicode 15 spec and adds support for all Emoji introduced in Emoji 15.0.

This does not update the underlying precommit:emoji Grunt script responsible for updating formatting.php. After GitHub recently sunset support for SVN, the current process needs to be replaced with a new one. This will be handled in #60520.

Let the masses rejoice for the 🐦‍⬛ singing in the dead of night, secure 🛜, aromatic 🫚, and some very silly 🪿🪿.

RIP Twemoji. Long live Twemoji!

Props peterwilsoncc, kraftbj, jeffpaul, azaozz, dd32, hareesh-pillai, jorbin.
Fixes #57600.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/formatting/emoji.php

    r53562 r57626  
    77class Tests_Formatting_Emoji extends WP_UnitTestCase {
    88
    9     private $png_cdn = 'https://s.w.org/images/core/emoji/14.0.0/72x72/';
    10     private $svn_cdn = 'https://s.w.org/images/core/emoji/14.0.0/svg/';
     9    private $png_cdn = 'https://s.w.org/images/core/emoji/15.0.3/72x72/';
     10    private $svn_cdn = 'https://s.w.org/images/core/emoji/15.0.3/svg/';
    1111
    1212    /**
     
    8181    public function test_wp_emoji_list_returns_data() {
    8282        $default = _wp_emoji_list();
    83         $this->assertNotEmpty( $default );
     83        $this->assertNotEmpty( $default, 'Default should not be empty' );
    8484
    8585        $entities = _wp_emoji_list( 'entities' );
    86         $this->assertNotEmpty( $entities );
    87 
    88         $this->assertSame( $default, $entities );
     86        $this->assertNotEmpty( $entities, 'Entities should not be empty' );
     87        $this->assertIsArray( $entities, 'Entities should be an array' );
     88        // Emoji 15 contains 3718 entities, this number will only increase.
     89        $this->assertGreaterThanOrEqual( 3718, count( $entities ), 'Entities should contain at least 3718 items' );
     90        $this->assertSame( $default, $entities, 'Entities should be returned by default' );
    8991
    9092        $partials = _wp_emoji_list( 'partials' );
    91         $this->assertNotEmpty( $partials );
     93        $this->assertNotEmpty( $partials, 'Partials should not be empty' );
     94        $this->assertIsArray( $partials, 'Partials should be an array' );
     95        // Emoji 15 contains 1424 partials, this number will only increase.
     96        $this->assertGreaterThanOrEqual( 1424, count( $partials ), 'Partials should contain at least 1424 items' );
    9297
    9398        $this->assertNotSame( $default, $partials );
     
    107112            ),
    108113            array(
    109                 // Skin tone, gender, ZWJ, emoji selector.
    110                 '👮🏼‍♀️',
    111                 '👮🏼‍♀️',
     114                // Bird, ZWJ, black large squre, emoji selector.
     115                '🐦‍⬛',
     116                '🐦‍⬛',
    112117            ),
    113118            array(
Note: See TracChangeset for help on using the changeset viewer.