[wp-trac] [WordPress Trac] #31701: Emoji: Avoid enqueueing JS by default
WordPress Trac
noreply at wordpress.org
Fri Mar 20 04:16:48 UTC 2015
#31701: Emoji: Avoid enqueueing JS by default
--------------------------+--------------------------------------
Reporter: obenland | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.2
Component: General | Version: trunk
Severity: normal | Resolution:
Keywords: emoji | Focuses: javascript, performance
--------------------------+--------------------------------------
Comment (by pento):
[attachment:31701.diff] only loads the emoji JS files if they're needed
(currently only works with `SCRIPT_DEBUG` set to `true`).
Still to do:
* Load the scripts from the correct URL (it's currently assuming that WP
is in the root directory).
* We've already detected browser emoji support once, we don't need to do
it a second time in `wp-emoji.js`.
* Combine `wp-emoji.js` and `twemoji.js` during the build process, so that
we only need to load `wp-emoji.min.js`.
* Figure out a nice way to build and maintain the minified version of the
inline script.
Anyway, this is a proof of concept. It looks like it might be a viable
option.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31701#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list