Commit Graph

17 Commits

Author SHA1 Message Date
Gary Pendergast
9974c9b18d Emoji: Ensure twemoji kicks in on certain DOM mutations.
Twemoji will replace the `img` with the emoji character, in the event that the image fails to load. We deliberately avoid trying to change that emoji character when it's changed back. We do need to replace emoji characters that are changed by something other than Twemoji, which this rectifies.

Fixes #34640.


Built from https://develop.svn.wordpress.org/trunk@35637


git-svn-id: http://core.svn.wordpress.org/trunk@35601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-14 09:52:29 +00:00
Gary Pendergast
d3f30288e9 Emoji: Use twemoji in browsers that don't support Unicode 8 emoji.
Some less advanced browsers are yet to add support for the important advances made in Unicode 8. Let's make ensure that their users can experience emoji in their full glory.

See #33592.


Built from https://develop.svn.wordpress.org/trunk@35606


git-svn-id: http://core.svn.wordpress.org/trunk@35570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-11 02:25:25 +00:00
Gary Pendergast
1f24f52673 Emoji: Add some new flags, and a handful from Unicode 8.0.
Including the following that should be used as often as possible:

U+1F1E6 U+1F1FA Flag for Australia
U+1F3CF Cricket Bat and Ball
U+1F32F Burrito

See #33592.


Built from https://develop.svn.wordpress.org/trunk@35596


git-svn-id: http://core.svn.wordpress.org/trunk@35560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-10 03:35:25 +00:00
Ella Iseulde Van Dorpe
e098c0e9ee Editor: word count: exclude more characters
Also only exclude these characters for the `words` type. They should be counted for other types.
Add the ASCIIOnly option to the uglify config to preserve escaped unicode characters.

See #30966. Fixes #27391.


Built from https://develop.svn.wordpress.org/trunk@33292


git-svn-id: http://core.svn.wordpress.org/trunk@33264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-16 09:45:26 +00:00
Andrew Ozz
4857824377 Update Twemoji to 1.4.1 including up to 3c0c13d3a5 (exclude SVG elements). Remove our hacks and adapt wp-emoji.js to use the new image attributes callback.
Fixes #32203.
Built from https://develop.svn.wordpress.org/trunk@32959


git-svn-id: http://core.svn.wordpress.org/trunk@32930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-26 22:01:25 +00:00
Andrew Ozz
1c0419071f Emoji: make sure we parse only strings or DOM nodes that have children.
Props peterwilsoncc. Fixes #32300.
Built from https://develop.svn.wordpress.org/trunk@32679


git-svn-id: http://core.svn.wordpress.org/trunk@32649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-01 18:25:25 +00:00
Andrew Ozz
7ad60f3154 Emoji: do not try to replace emoji chars inside dynamic SVGs.
Fixes #32305 for trunk.
Built from https://develop.svn.wordpress.org/trunk@32478


git-svn-id: http://core.svn.wordpress.org/trunk@32448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-09 23:44:27 +00:00
Andrew Ozz
67f589654b Emoji: add shorter/faster regex for testing for emoji chars in added nodes.
See #32125.
Built from https://develop.svn.wordpress.org/trunk@32347


git-svn-id: http://core.svn.wordpress.org/trunk@32318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-05 01:41:27 +00:00
Andrew Ozz
a5cee54aea Emoji: rename the exclude class to wp-exclude-emoji.
Props Clorith. See #32197.
Built from https://develop.svn.wordpress.org/trunk@32337


git-svn-id: http://core.svn.wordpress.org/trunk@32308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-04 00:05:28 +00:00
Andrew Ozz
8eb93bc838 Emoji: add an exclude class to wp-emoji checked when monitoring for changes with mutationObserver. Use it for the hidden div used for resizing the Text editor.
See #32197.
Built from https://develop.svn.wordpress.org/trunk@32336


git-svn-id: http://core.svn.wordpress.org/trunk@32307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-03 20:18:26 +00:00
Andrew Ozz
86674d41af Emoji: before parsing added nodes test if the text in them contains emoji chars. That speeds up the processing quite a bit.
See #32125.
Built from https://develop.svn.wordpress.org/trunk@32335


git-svn-id: http://core.svn.wordpress.org/trunk@32306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-03 19:08:24 +00:00
Andrew Ozz
4e971bea9f Emoji:
- Fix loading errors in IE9 and IE10.
- Add fallbacks for the loading events.
Fixes #32109 for trunk.
Built from https://develop.svn.wordpress.org/trunk@32334


git-svn-id: http://core.svn.wordpress.org/trunk@32305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-03 18:45:29 +00:00
Andrew Ozz
01c26527ea Emoji: fix loop when replacement images fail to load.
Props iseulde. Fixes #32128 for trunk.
Built from https://develop.svn.wordpress.org/trunk@32323


git-svn-id: http://core.svn.wordpress.org/trunk@32294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-29 03:19:26 +00:00
Gary Pendergast
5ab25275a7 Emoji: Remove an errant / in Twemoji URLs.
Props tmatsuur.

Fixes #31893.


Built from https://develop.svn.wordpress.org/trunk@32024


git-svn-id: http://core.svn.wordpress.org/trunk@32003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-05 07:28:26 +00:00
Andrew Ozz
e053979219 Emoji:
- Enhance twemoji.js to support passing of additional attributes for the replacement images.
- Use that to add the needed attributes when replacing emoji inside the editor.
Fixes #31627.
Built from https://develop.svn.wordpress.org/trunk@31948


git-svn-id: http://core.svn.wordpress.org/trunk@31927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-01 02:39:28 +00:00
Andrew Ozz
62c3c1d798 Fix initialization of wp-emoji in IE8.
Props pento, azaozz. Fixes #31701.
Built from https://develop.svn.wordpress.org/trunk@31898


git-svn-id: http://core.svn.wordpress.org/trunk@31877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-26 02:40:28 +00:00
Gary Pendergast
b53b12ff8c Emoji: Instead of loading the emoji JS files automatically, we now include a small JS shim in the header, to test if the user's browser needs Twemoji. It then loads the emoji JS files only if they're needed.
Props pento, azaozz.

Fixes #31701.


Built from https://develop.svn.wordpress.org/trunk@31875


git-svn-id: http://core.svn.wordpress.org/trunk@31854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-24 23:33:32 +00:00