Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull latest twemoji code from WP #421

Merged
merged 11 commits into from Jun 17, 2019

Conversation

@nylen
Copy link
Member

commented Jun 17, 2019

This PR backports all code changes from WordPress related to emoji. In version 2 we'll be moving emoji support out into a separate plugin, but for now we need to do this in order to fix our build. This will also let ClassicPress support a bunch of new emoji.

Fixes #413.

Note, src/wp-includes/twemoji.js was removed in WP's big JS reorganization: https://core.trac.wordpress.org/changeset/43309

In WP it's now copied from node_modules: https://github.com/WordPress/wordpress-develop/blob/5.2.1/Gruntfile.js#L176

ClassicPress isn't using that approach, so I've updated the file manually from the latest version at https://github.com/twitter/twemoji/blob/v12.0.4/2/twemoji.js.

pento and others added some commits Jan 25, 2018

WP-r43360: Docs: Improve JSDoc for `emoji.js`.
WP:Props lisannekluitmans, hansjovisyoast, igorsch, nicollle.
Fixes https://core.trac.wordpress.org/ticket/44367.

Conflicts:
  src/wp-includes/js/wp-emoji.js
----
Merges https://core.trac.wordpress.org/changeset/43360 / WordPress/wordpress-develop@885cd0f to ClassicPress.
WP-r44554: Emoji: Improve performance when encoding or staticizing em…
…oji.

Both `wp_encode_emoji()` and `wp_staticize_emoji()` perform a PHP version check when deciding how to apply their behaviour, but this check only needs to happen once, rather than every time in their internal looks.

Moving the check outside of the loop reduces processing time by 50%.

WP:Props johnbillion.
Fixes https://core.trac.wordpress.org/ticket/45930.

Conflicts:
  src/wp-includes/formatting.php
----
Merges https://core.trac.wordpress.org/changeset/44554 / WordPress/wordpress-develop@d32cead to ClassicPress.
WP-r44644: Emoji: Upgrade Twemoji to 11.2.0.
This upgrade includes general improvements to the style of a variety of emoji.

Full changelog: twitter/twemoji@v11.0.0...v11.2.0

WP:Props desrosj, pento.
Fixes https://core.trac.wordpress.org/ticket/45133.

Conflicts:
  package-lock.json
  package.json
  src/wp-includes/formatting.php
  src/wp-includes/general-template.php
  tests/phpunit/tests/formatting/Emoji.php
----
Merges https://core.trac.wordpress.org/changeset/44644 / WordPress/wordpress-develop@d3ee420 to ClassicPress.

ClassicPress note: The emoji URLs in this commit are temporary only - no
files are hosted there!
WP-r45134: Emoji: Update Twemoji to version 12.0.0.
WP:Props pento, superpoincare.
Fixes https://core.trac.wordpress.org/ticket/46404, https://core.trac.wordpress.org/ticket/46805.

Conflicts:
  package-lock.json
  package.json
  src/wp-includes/formatting.php
  src/wp-includes/general-template.php
  src/wp-includes/js/wp-emoji-loader.js
  tests/phpunit/tests/formatting/Emoji.php
----
Merges https://core.trac.wordpress.org/changeset/45134 / WordPress/wordpress-develop@11e97aa to ClassicPress.
WP-r45240: Emoji: Upgrade Twemoji to 12.0.1.
As this point release doesn't modify any images, only adding a few missing ones, we don't need to change the CDN location.

WP:Props earnjam.
Fixes https://core.trac.wordpress.org/ticket/46805.

Conflicts:
  package-lock.json
  package.json
----
Merges https://core.trac.wordpress.org/changeset/45240 / WordPress/wordpress-develop@0da79e2 to ClassicPress.

@nylen nylen merged commit 21faf47 into develop Jun 17, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@nylen nylen deleted the merge/wp-emoji-changes branch Jun 17, 2019

@nylen nylen added this to the Future: v1.0.2 or v1.1.0 milestone Jun 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.