[wp-trac] [WordPress Trac] #64076: Emoji loader script can be moved to the footer since non-critical

WordPress Trac noreply at wordpress.org
Fri May 22 19:31:31 UTC 2026


#64076: Emoji loader script can be moved to the footer since non-critical
--------------------------------------+--------------------------
 Reporter:  westonruter               |       Owner:  westonruter
     Type:  enhancement               |      Status:  closed
 Priority:  normal                    |   Milestone:  6.9
Component:  Emoji                     |     Version:  4.2
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------+--------------------------

Comment (by westonruter):

 In [changeset:"62410" 62410]:
 {{{
 #!CommitTicketReference repository="" revision="62410"
 Emoji: Use the `admin_print_footer_scripts` action for printing the emoji
 detection script in the admin.

 This corrects an oversight in an optimization made to
 `print_emoji_detection_script()` which moved the emoji detection script to
 the `wp_print_footer_scripts` action. Since this action doesn't fire in
 the admin, no script was printed. Now in the admin, the script is printed
 at the `admin_print_footer_scripts` action. Existing sites that wish to
 omit emoji can continue to do `remove_action( 'admin_print_scripts',
 'print_emoji_detection_script' )`.

 Tests are added covering all four branches of
 `print_emoji_detection_script()`: hooking the script onto the appropriate
 footer action, and printing it directly when that action has already
 fired, in both the admin and the frontend.

 Missing parameter and return types are added to the `get_echo()` test
 helper.

 Developed in https://github.com/WordPress/wordpress-develop/pull/11931.
 Follow-up to r60902.

 Props westonruter, jonsurrell.
 See #64076, #65260.
 Fixes #65310.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64076#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list