| 1 | 1 | The inline script used for emoji detection, output in the `head` by `_print_emoji_detection_script()`, needlessly adds parser/render blocking to the page. If emoji loader already waits for `DOMContentLoaded` before it proceeds to load the add load the `wp-emoji.js` and `twemoji.js` scripts. This means the inline script need not be in the `head` at all. It could be moved to the footer, and it would also be better if it were added as an inline script module so that its execution is deferred until the DOM has loaded. Similarly, the emoji settings object exported from PHP need not be added as an inline script but it can instead be [https://core.trac.wordpress.org/ticket/58873#comment:4 output as JSON] to be parsed when the emoji detection script module executes. |