Commit Graph

11 Commits

Author SHA1 Message Date
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
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