Andrew Ozz
dee2f6ccb7
Fix typo in wp-emoji.js.
...
See #35977 .
Built from https://develop.svn.wordpress.org/trunk@36981
git-svn-id: http://core.svn.wordpress.org/trunk@36948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-13 20:30:27 +00:00
Gary Pendergast
5285483e6f
Emoji: Fix some jshint warnings introduced in [36816].
...
See #35300 .
Built from https://develop.svn.wordpress.org/trunk@36818
git-svn-id: http://core.svn.wordpress.org/trunk@36785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-03 05:48:25 +00:00
Gary Pendergast
7803ae4cea
Emoji: Add some extra IE11 compatibility.
...
IE 11's implementation of MutationObserver is buggy. It unnecessarily splits text nodes when it encounters a HTML template interpolation symbol ( "{{", for example ). So, we join the text nodes back together as a work-around.
Fixes #35977 for trunk.
Built from https://develop.svn.wordpress.org/trunk@36817
git-svn-id: http://core.svn.wordpress.org/trunk@36784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-03 05:21:26 +00:00
Gary Pendergast
2c277e3952
Emoji: Clean up the emoji browser support tests.
...
As new sets of emoji are added to Unicode, and browsers add support for them at random intervals, we'll inevitably need to add new tests to the emoji loader. This change makes it much easier to add new tests as they're needed.
Fixes #35300 .
Built from https://develop.svn.wordpress.org/trunk@36816
git-svn-id: http://core.svn.wordpress.org/trunk@36783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-03 05:17:26 +00:00
Gary Pendergast
5a0f8ca847
Emoji: Add a test to the emoji loader, to see if the browser supports emoji diversity. If it doesn't, fall back to twemoji.
...
See #33592 .
Built from https://develop.svn.wordpress.org/trunk@36160
git-svn-id: http://core.svn.wordpress.org/trunk@36126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-03 04:26:27 +00:00
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
Drew Jaynes
5b34f6faff
Add a true return description to the test()
method added to wpEmoji in 4.3.
...
See [32335]. See #32891 .
Built from https://develop.svn.wordpress.org/trunk@33203
git-svn-id: http://core.svn.wordpress.org/trunk@33175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-13 17:59:24 +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
Gary Pendergast
01fd948b90
Emoji: The regex for checking if the current glyph is a flag was checking the incorrect byte range, which was causing the South Korean flag to not be replaced in Firefox.
...
Built from https://develop.svn.wordpress.org/trunk@31869
git-svn-id: http://core.svn.wordpress.org/trunk@31848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-24 09:58:28 +00:00
Gary Pendergast
faac51cad0
Emoji: Move a comment to match the restructure in [31779], and add an extra comment explaining how emoji rendering support is detected.
...
See #31242
Built from https://develop.svn.wordpress.org/trunk@31788
git-svn-id: http://core.svn.wordpress.org/trunk@31768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-16 00:06:28 +00:00
Andrew Ozz
c18ef513a0
Emoji: fix few typos. See #31242 .
...
Built from https://develop.svn.wordpress.org/trunk@31787
git-svn-id: http://core.svn.wordpress.org/trunk@31767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-15 23:29:26 +00:00
Andrew Ozz
a7fd4a3774
Emoji:
...
- Add the styling for the replacement images to the admin CSS.
- Revert to using `.emoji` as replacement image class.
- When pasting in the editor, convert emoji images to our format so we can replace them with chars on saving.
- Some more clean up of both the plugin and wp-emoji.js.
See #31242 .
Built from https://develop.svn.wordpress.org/trunk@31786
git-svn-id: http://core.svn.wordpress.org/trunk@31766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-15 23:16:29 +00:00
Andrew Ozz
1fc8c98fd7
Emoji: always export the methods in wp-emoji.js, even when dependencies are missing and we cannot initialize.
...
See #31242 .
Built from https://develop.svn.wordpress.org/trunk@31780
git-svn-id: http://core.svn.wordpress.org/trunk@31760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-15 00:17:27 +00:00
Andrew Ozz
8a402aa701
Emoji:
...
- Move the TinyMCE plugin CSS to wp-content.css.
- Change the replacement images class to `wp-emoji` inside the editor.
- Clean up both the plugin and wp-emoji.js, abstract and restructure a bit.
See #31242 .
Built from https://develop.svn.wordpress.org/trunk@31779
git-svn-id: http://core.svn.wordpress.org/trunk@31759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-14 23:49:30 +00:00
Andrew Ozz
c8129335b5
Emoji: better regex when testing for only char emoji. Props iseulde. See #31242 .
...
Built from https://develop.svn.wordpress.org/trunk@31772
git-svn-id: http://core.svn.wordpress.org/trunk@31752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-13 20:27:26 +00:00
Andrew Ozz
e7131def4d
Emoji:
...
- Patch twemoji.js to prevent infinite loop.
- Fix some `undefined` errors in old IE.
Props iseulde. See #31242 .
Built from https://develop.svn.wordpress.org/trunk@31756
git-svn-id: http://core.svn.wordpress.org/trunk@31737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-12 19:53:26 +00:00
Gary Pendergast
b7546d798f
Emoji: Instead of having custom hooks for Ajax callbacks, use MutationObserver to re-parse any changed elements in the DOM.
...
Props iseulde
See #31242
Built from https://develop.svn.wordpress.org/trunk@31750
git-svn-id: http://core.svn.wordpress.org/trunk@31731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-12 12:52:26 +00:00
Andrew Nacin
78679bfb3f
Emoji JS cleanup.
...
* Filename: emoji.js => wp-emoji.js
* Script handle: emoji => wp-emoji
* Object: WPEmoji => wp.emoji
* Script settings: EmojiSettings => _wpemojiSettings
* Setting key: base_url => baseUrl
* Remove executable bit from files
see #31242 .
Built from https://develop.svn.wordpress.org/trunk@31744
git-svn-id: http://core.svn.wordpress.org/trunk@31725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-12 03:17:26 +00:00