Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#32080 closed enhancement (duplicate)

Emoji inline styles & script to not get loaded when convert emoticons is disabled in the admin (>=4.2)

Reported by: mihai2u's profile mihai2u Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.2
Component: Formatting Keywords:
Focuses: performance Cc:


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


by adding
!( get_option( 'use_smilies' ) ) before the return condition.
function print_emoji_styles() {
	static $printed = false;

	if ( $printed || !( get_option( 'use_smilies' ) ) ) {


function print_emoji_detection_script() {
	global $wp_version;
	static $printed = false;

	if ( $printed || !( get_option( 'use_smilies' ) ) ) {

Attachments (1)

formatting.php (141.3 KB) - added by mihai2u 9 years ago.
Tested formatting.php file

Download all attachments as: .zip

Change History (5)

9 years ago

Tested formatting.php file

#1 @mihai2u
9 years ago

  • Resolution set to invalid
  • Status changed from new to closed

#2 @mihai2u
9 years ago

It was just a caching issue causing the option not to update the removal of the emoji styles & script.

#3 @SergeyBiryukov
9 years ago

  • Resolution changed from invalid to duplicate

#32102 has a patch.

#4 @SergeyBiryukov
9 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.