[wp-trac] [WordPress Trac] #65310: Emoji detection script not being printed in admin

WordPress Trac noreply at wordpress.org
Fri May 22 00:01:35 UTC 2026


#65310: Emoji detection script not being printed in admin
--------------------------+--------------------
 Reporter:  westonruter   |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  7.0.1
Component:  Emoji         |    Version:  6.9
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+--------------------
 This is a follow-up to an issue introduced in r60902
 ([https://github.com/WordPress/wordpress-
 develop/commit/3cba156da0aab1f55d2993d9a4bfc2ac1925f8be 3cba156]) to fix
 #63842 and #64076 in the 6.9 release.

 The change to print the emoji detection script in the footer instead of
 the head was only accounting for its use on the frontend. It neglected to
 account for the hooks in the admin, where the `wp_print_footer_scripts`
 action never fires. Instead, the `admin_print_footer_scripts` action
 fires. The following change is needed:

 {{{#!diff
 --- a/src/wp-includes/formatting.php
 +++ b/src/wp-includes/formatting.php
 @@ -5907,10 +5907,18 @@ function print_emoji_detection_script() {

         $printed = true;

 -       if ( did_action( 'wp_print_footer_scripts' ) ) {
 -               _print_emoji_detection_script();
 +       if ( is_admin() ) {
 +               if ( did_action( 'admin_print_footer_scripts' ) ) {
 +                       _print_emoji_detection_script();
 +               } else {
 +                       add_action( 'admin_print_footer_scripts',
 '_print_emoji_detection_script' );
 +               }
         } else {
 -               add_action( 'wp_print_footer_scripts',
 '_print_emoji_detection_script' );
 +               if ( did_action( 'wp_print_footer_scripts' ) ) {
 +                       _print_emoji_detection_script();
 +               } else {
 +                       add_action( 'wp_print_footer_scripts',
 '_print_emoji_detection_script' );
 +               }
         }
  }
 }}}

 Related: #65260

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/65310>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list