[wp-trac] [WordPress Trac] #32080: Emoji inline styles & script to not get loaded when convert emoticons is disabled in the admin (>=4.2)
WordPress Trac
noreply at wordpress.org
Thu Apr 23 17:35:31 UTC 2015
#32080: Emoji inline styles & script to not get loaded when convert emoticons is
disabled in the admin (>=4.2)
-------------------------+-----------------------------
Reporter: mihai2u | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version: trunk
Severity: normal | Keywords:
Focuses: performance |
-------------------------+-----------------------------
Since the option discards the conversion of emoji, there would be no need
for the styles and script to load at all.
I had manually set this up by removing the action from inside the theme
according to the value of the get_option( 'use_smilies' ), but I think
this would be worth to be included inside
wp-includes/formatting.php
by adding || !( get_option( 'use_smilies' ) ) before the return
condition.
{{{
function print_emoji_styles() {
static $printed = false;
if ( $printed || !( get_option( 'use_smilies' ) ) ) {
return;
}
}}}
and
{{{
function print_emoji_detection_script() {
global $wp_version;
static $printed = false;
if ( $printed || !( get_option( 'use_smilies' ) ) ) {
return;
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32080>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list