Make WordPress Core

Ticket #58634: 58634.diff

File 58634.diff, 22.2 KB (added by huzaifaalmesbah, 2 years ago)

I added a new update patch.

  • src/wp-content/themes/twentyeleven/inc/theme-options.php

    diff --git a/src/wp-content/themes/twentyeleven/inc/theme-options.php b/src/wp-content/themes/twentyeleven/inc/theme-options.php
    index c40768bcac..dbadd29763 100644
    a b function twentyeleven_customize_partial_blogdescription() { 
    673673 * @since Twenty Eleven 1.3
    674674 */
    675675function twentyeleven_customize_preview_js() {
    676         wp_enqueue_script( 'twentyeleven-customizer', get_template_directory_uri() . '/inc/theme-customizer.js', array( 'customize-preview' ), '20150401', true );
     676        wp_enqueue_script( 'twentyeleven-customizer', get_template_directory_uri() . '/inc/theme-customizer.js', array( 'customize-preview' ), '20150401', array( 'in_footer' => true ) );
    677677}
    678678add_action( 'customize_preview_init', 'twentyeleven_customize_preview_js' );
  • src/wp-content/themes/twentyfifteen/functions.php

    diff --git a/src/wp-content/themes/twentyfifteen/functions.php b/src/wp-content/themes/twentyfifteen/functions.php
    index 87149cee44..1132cff2dd 100644
    a b function twentyfifteen_scripts() { 
    444444        wp_style_add_data( 'twentyfifteen-ie7', 'conditional', 'lt IE 8' );
    445445
    446446        // Skip-link fix is no longer enqueued by default.
    447         wp_register_script( 'twentyfifteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20230526', true );
     447        wp_register_script( 'twentyfifteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20230526', array( 'in_footer' => true ) );
    448448
    449449        if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
    450450                wp_enqueue_script( 'comment-reply' );
    function twentyfifteen_scripts() { 
    454454                wp_enqueue_script( 'twentyfifteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20141210' );
    455455        }
    456456
    457         wp_enqueue_script( 'twentyfifteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20221101', true );
     457        wp_enqueue_script( 'twentyfifteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20221101', array( 'in_footer' => true ) );
    458458        wp_localize_script(
    459459                'twentyfifteen-script',
    460460                'screenReaderText',
  • src/wp-content/themes/twentyfifteen/inc/customizer.php

    diff --git a/src/wp-content/themes/twentyfifteen/inc/customizer.php b/src/wp-content/themes/twentyfifteen/inc/customizer.php
    index 8701c4908a..6e8451dd3e 100644
    a b add_action( 'wp_enqueue_scripts', 'twentyfifteen_color_scheme_css' ); 
    359359 * @since Twenty Fifteen 1.0
    360360 */
    361361function twentyfifteen_customize_control_js() {
    362         wp_enqueue_script( 'color-scheme-control', get_template_directory_uri() . '/js/color-scheme-control.js', array( 'customize-controls', 'iris', 'underscore', 'wp-util' ), '20141216', true );
     362        wp_enqueue_script( 'color-scheme-control', get_template_directory_uri() . '/js/color-scheme-control.js', array( 'customize-controls', 'iris', 'underscore', 'wp-util' ), '20141216', array( 'in_footer' => true ) );
    363363        wp_localize_script( 'color-scheme-control', 'colorScheme', twentyfifteen_get_color_schemes() );
    364364}
    365365add_action( 'customize_controls_enqueue_scripts', 'twentyfifteen_customize_control_js' );
    add_action( 'customize_controls_enqueue_scripts', 'twentyfifteen_customize_contr 
    370370 * @since Twenty Fifteen 1.0
    371371 */
    372372function twentyfifteen_customize_preview_js() {
    373         wp_enqueue_script( 'twentyfifteen-customize-preview', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20141216', true );
     373        wp_enqueue_script( 'twentyfifteen-customize-preview', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20141216', array( 'in_footer' => true ) );
    374374}
    375375add_action( 'customize_preview_init', 'twentyfifteen_customize_preview_js' );
    376376
  • src/wp-content/themes/twentyfourteen/functions.php

    diff --git a/src/wp-content/themes/twentyfourteen/functions.php b/src/wp-content/themes/twentyfourteen/functions.php
    index 33d39bb02d..6267c95f2e 100644
    a b function twentyfourteen_scripts() { 
    367367        }
    368368
    369369        if ( is_front_page() && 'slider' === get_theme_mod( 'featured_content_layout' ) ) {
    370                 wp_enqueue_script( 'twentyfourteen-slider', get_template_directory_uri() . '/js/slider.js', array( 'jquery' ), '20150120', true );
     370                wp_enqueue_script( 'twentyfourteen-slider', get_template_directory_uri() . '/js/slider.js', array( 'jquery' ), '20150120', array( 'in_footer' => true ) );
    371371                wp_localize_script(
    372372                        'twentyfourteen-slider',
    373373                        'featuredSliderDefaults',
    function twentyfourteen_scripts() { 
    378378                );
    379379        }
    380380
    381         wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20230526', true );
     381        wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20230526', array( 'in_footer' => true ) );
    382382}
    383383add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' );
    384384
  • src/wp-content/themes/twentyfourteen/inc/customizer.php

    diff --git a/src/wp-content/themes/twentyfourteen/inc/customizer.php b/src/wp-content/themes/twentyfourteen/inc/customizer.php
    index bcf2e2c6e8..eda5778c90 100644
    a b function twentyfourteen_sanitize_layout( $layout ) { 
    142142 * @since Twenty Fourteen 1.0
    143143 */
    144144function twentyfourteen_customize_preview_js() {
    145         wp_enqueue_script( 'twentyfourteen_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20141015', true );
     145        wp_enqueue_script( 'twentyfourteen_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20141015', array( 'in_footer' => true ) );
    146146}
    147147add_action( 'customize_preview_init', 'twentyfourteen_customize_preview_js' );
    148148
  • src/wp-content/themes/twentyfourteen/inc/featured-content.php

    diff --git a/src/wp-content/themes/twentyfourteen/inc/featured-content.php b/src/wp-content/themes/twentyfourteen/inc/featured-content.php
    index b8be4e6ff6..9e3310ff54 100644
    a b class Featured_Content { 
    434434         * @since Twenty Fourteen 1.0
    435435         */
    436436        public static function enqueue_scripts() {
    437                 wp_enqueue_script( 'featured-content-suggest', get_template_directory_uri() . '/js/featured-content-admin.js', array( 'jquery', 'suggest' ), '20211130', true );
     437                wp_enqueue_script( 'featured-content-suggest', get_template_directory_uri() . '/js/featured-content-admin.js', array( 'jquery', 'suggest' ), '20211130', array( 'in_footer' => true ) );
    438438        }
    439439
    440440        /**
  • src/wp-content/themes/twentynineteen/functions.php

    diff --git a/src/wp-content/themes/twentynineteen/functions.php b/src/wp-content/themes/twentynineteen/functions.php
    index 6aaa5ac7e9..0689b7e332 100644
    a b function twentynineteen_scripts() { 
    259259        wp_style_add_data( 'twentynineteen-style', 'rtl', 'replace' );
    260260
    261261        if ( has_nav_menu( 'menu-1' ) ) {
    262                 wp_enqueue_script( 'twentynineteen-priority-menu', get_theme_file_uri( '/js/priority-menu.js' ), array(), '20200129', true );
    263                 wp_enqueue_script( 'twentynineteen-touch-navigation', get_theme_file_uri( '/js/touch-keyboard-navigation.js' ), array(), '20230621', true );
     262                wp_enqueue_script( 'twentynineteen-priority-menu', get_theme_file_uri( '/js/priority-menu.js' ), array(), '20200129', array( 'in_footer' => true ) );
     263                wp_enqueue_script( 'twentynineteen-touch-navigation', get_theme_file_uri( '/js/touch-keyboard-navigation.js' ), array(), '20230621', array( 'in_footer' => true ) );
    264264        }
    265265
    266266        wp_enqueue_style( 'twentynineteen-print-style', get_template_directory_uri() . '/print.css', array(), wp_get_theme()->get( 'Version' ), 'print' );
  • src/wp-content/themes/twentynineteen/inc/customizer.php

    diff --git a/src/wp-content/themes/twentynineteen/inc/customizer.php b/src/wp-content/themes/twentynineteen/inc/customizer.php
    index ea093d23ce..052d46b6aa 100644
    a b function twentynineteen_customize_partial_blogdescription() { 
    125125 * Bind JS handlers to instantly live-preview changes.
    126126 */
    127127function twentynineteen_customize_preview_js() {
    128         wp_enqueue_script( 'twentynineteen-customize-preview', get_theme_file_uri( '/js/customize-preview.js' ), array( 'customize-preview' ), '20181214', true );
     128        wp_enqueue_script( 'twentynineteen-customize-preview', get_theme_file_uri( '/js/customize-preview.js' ), array( 'customize-preview' ), '20181214', array( 'in_footer' => true ) );
    129129}
    130130add_action( 'customize_preview_init', 'twentynineteen_customize_preview_js' );
    131131
    add_action( 'customize_preview_init', 'twentynineteen_customize_preview_js' ); 
    133133 * Load dynamic logic for the customizer controls area.
    134134 */
    135135function twentynineteen_panels_js() {
    136         wp_enqueue_script( 'twentynineteen-customize-controls', get_theme_file_uri( '/js/customize-controls.js' ), array(), '20181214', true );
     136        wp_enqueue_script( 'twentynineteen-customize-controls', get_theme_file_uri( '/js/customize-controls.js' ), array(), '20181214', array( 'in_footer' => true ) );
    137137}
    138138add_action( 'customize_controls_enqueue_scripts', 'twentynineteen_panels_js' );
    139139
  • src/wp-content/themes/twentyseventeen/functions.php

    diff --git a/src/wp-content/themes/twentyseventeen/functions.php b/src/wp-content/themes/twentyseventeen/functions.php
    index 83964158b1..26a7a1a3c0 100644
    a b function twentyseventeen_scripts() { 
    477477        wp_script_add_data( 'html5', 'conditional', 'lt IE 9' );
    478478
    479479        // Skip-link fix is no longer enqueued by default.
    480         wp_register_script( 'twentyseventeen-skip-link-focus-fix', get_theme_file_uri( '/assets/js/skip-link-focus-fix.js' ), array(), '20161114', true );
     480        wp_register_script( 'twentyseventeen-skip-link-focus-fix', get_theme_file_uri( '/assets/js/skip-link-focus-fix.js' ), array(), '20161114', array( 'in_footer' => true ) );
    481481
    482         wp_enqueue_script( 'twentyseventeen-global', get_theme_file_uri( '/assets/js/global.js' ), array( 'jquery' ), '20211130', true );
     482        wp_enqueue_script( 'twentyseventeen-global', get_theme_file_uri( '/assets/js/global.js' ), array( 'jquery' ), '20211130', array( 'in_footer' => true ) );
    483483
    484484        $twentyseventeen_l10n = array(
    485485                'quote' => twentyseventeen_get_svg( array( 'icon' => 'quote-right' ) ),
    486486        );
    487487
    488488        if ( has_nav_menu( 'top' ) ) {
    489                 wp_enqueue_script( 'twentyseventeen-navigation', get_theme_file_uri( '/assets/js/navigation.js' ), array( 'jquery' ), '20210122', true );
     489                wp_enqueue_script( 'twentyseventeen-navigation', get_theme_file_uri( '/assets/js/navigation.js' ), array( 'jquery' ), '20210122', array( 'in_footer' => true ) );
    490490                $twentyseventeen_l10n['expand']   = __( 'Expand child menu', 'twentyseventeen' );
    491491                $twentyseventeen_l10n['collapse'] = __( 'Collapse child menu', 'twentyseventeen' );
    492492                $twentyseventeen_l10n['icon']     = twentyseventeen_get_svg(
    function twentyseventeen_scripts() { 
    499499
    500500        wp_localize_script( 'twentyseventeen-global', 'twentyseventeenScreenReaderText', $twentyseventeen_l10n );
    501501
    502         wp_enqueue_script( 'jquery-scrollto', get_theme_file_uri( '/assets/js/jquery.scrollTo.js' ), array( 'jquery' ), '2.1.3', true );
     502        wp_enqueue_script( 'jquery-scrollto', get_theme_file_uri( '/assets/js/jquery.scrollTo.js' ), array( 'jquery' ), '2.1.3', array( 'in_footer' => true ) );
    503503
    504504        if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
    505505                wp_enqueue_script( 'comment-reply' );
  • src/wp-content/themes/twentyseventeen/inc/customizer.php

    diff --git a/src/wp-content/themes/twentyseventeen/inc/customizer.php b/src/wp-content/themes/twentyseventeen/inc/customizer.php
    index 43863d0dc9..0380c9a50b 100644
    a b function twentyseventeen_is_view_with_layout_option() { 
    245245 * Bind JS handlers to instantly live-preview changes.
    246246 */
    247247function twentyseventeen_customize_preview_js() {
    248         wp_enqueue_script( 'twentyseventeen-customize-preview', get_theme_file_uri( '/assets/js/customize-preview.js' ), array( 'customize-preview' ), '20161002', true );
     248        wp_enqueue_script( 'twentyseventeen-customize-preview', get_theme_file_uri( '/assets/js/customize-preview.js' ), array( 'customize-preview' ), '20161002', array( 'in_footer' => true ) );
    249249}
    250250add_action( 'customize_preview_init', 'twentyseventeen_customize_preview_js' );
    251251
    add_action( 'customize_preview_init', 'twentyseventeen_customize_preview_js' ); 
    253253 * Load dynamic logic for the customizer controls area.
    254254 */
    255255function twentyseventeen_panels_js() {
    256         wp_enqueue_script( 'twentyseventeen-customize-controls', get_theme_file_uri( '/assets/js/customize-controls.js' ), array(), '20161020', true );
     256        wp_enqueue_script( 'twentyseventeen-customize-controls', get_theme_file_uri( '/assets/js/customize-controls.js' ), array(), '20161020', array( 'in_footer' => true ) );
    257257}
    258258add_action( 'customize_controls_enqueue_scripts', 'twentyseventeen_panels_js' );
  • src/wp-content/themes/twentysixteen/functions.php

    diff --git a/src/wp-content/themes/twentysixteen/functions.php b/src/wp-content/themes/twentysixteen/functions.php
    index 82e9ee9a31..0c4c9237ee 100644
    a b function twentysixteen_scripts() { 
    413413        wp_script_add_data( 'twentysixteen-html5', 'conditional', 'lt IE 9' );
    414414
    415415        // Skip-link fix is no longer enqueued by default.
    416         wp_register_script( 'twentysixteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20230526', true );
     416        wp_register_script( 'twentysixteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20230526', array( 'in_footer' => true ) );
    417417
    418418        if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
    419419                wp_enqueue_script( 'comment-reply' );
    function twentysixteen_scripts() { 
    423423                wp_enqueue_script( 'twentysixteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20170530' );
    424424        }
    425425
    426         wp_enqueue_script( 'twentysixteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20230629', true );
     426        wp_enqueue_script( 'twentysixteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20230629', array( 'in_footer' => true ) );
    427427
    428428        wp_localize_script(
    429429                'twentysixteen-script',
  • src/wp-content/themes/twentysixteen/inc/customizer.php

    diff --git a/src/wp-content/themes/twentysixteen/inc/customizer.php b/src/wp-content/themes/twentysixteen/inc/customizer.php
    index 0cefa79ec7..5fc84bd60f 100644
    a b add_action( 'wp_enqueue_scripts', 'twentysixteen_color_scheme_css' ); 
    486486 * @since Twenty Sixteen 1.0
    487487 */
    488488function twentysixteen_customize_control_js() {
    489         wp_enqueue_script( 'color-scheme-control', get_template_directory_uri() . '/js/color-scheme-control.js', array( 'customize-controls', 'iris', 'underscore', 'wp-util' ), '20170530', true );
     489        wp_enqueue_script( 'color-scheme-control', get_template_directory_uri() . '/js/color-scheme-control.js', array( 'customize-controls', 'iris', 'underscore', 'wp-util' ), '20170530', array( 'in_footer' => true ) );
    490490        wp_localize_script( 'color-scheme-control', 'colorScheme', twentysixteen_get_color_schemes() );
    491491}
    492492add_action( 'customize_controls_enqueue_scripts', 'twentysixteen_customize_control_js' );
    add_action( 'customize_controls_enqueue_scripts', 'twentysixteen_customize_contr 
    497497 * @since Twenty Sixteen 1.0
    498498 */
    499499function twentysixteen_customize_preview_js() {
    500         wp_enqueue_script( 'twentysixteen-customize-preview', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20170530', true );
     500        wp_enqueue_script( 'twentysixteen-customize-preview', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20170530', array( 'in_footer' => true ) );
    501501}
    502502add_action( 'customize_preview_init', 'twentysixteen_customize_preview_js' );
    503503
  • src/wp-content/themes/twentythirteen/functions.php

    diff --git a/src/wp-content/themes/twentythirteen/functions.php b/src/wp-content/themes/twentythirteen/functions.php
    index 33ec533128..5ccf924536 100644
    a b function twentythirteen_scripts_styles() { 
    321321        }
    322322
    323323        // Loads JavaScript file with functionality specific to Twenty Thirteen.
    324         wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20230526', true );
     324        wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20230526', array( 'in_footer' => true ) );
    325325
    326326        // Add Source Sans Pro and Bitter fonts, used in the main stylesheet.
    327327        $font_version = ( 0 === strpos( (string) twentythirteen_fonts_url(), get_template_directory_uri() . '/' ) ) ? '20230328' : null;
    function twentythirteen_customize_partial_blogdescription() { 
    843843 * @since Twenty Thirteen 1.0
    844844 */
    845845function twentythirteen_customize_preview_js() {
    846         wp_enqueue_script( 'twentythirteen-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20200516', true );
     846        wp_enqueue_script( 'twentythirteen-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20200516', array( 'in_footer' => true ) );
    847847}
    848848add_action( 'customize_preview_init', 'twentythirteen_customize_preview_js' );
    849849
  • src/wp-content/themes/twentytwelve/functions.php

    diff --git a/src/wp-content/themes/twentytwelve/functions.php b/src/wp-content/themes/twentytwelve/functions.php
    index a4b83afbaf..0d7c4825e2 100644
    a b function twentytwelve_scripts_styles() { 
    188188        }
    189189
    190190        // Adds JavaScript for handling the navigation menu hide-and-show behavior.
    191         wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'jquery' ), '20141205', true );
     191        wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'jquery' ), '20141205', array( 'in_footer' => true ) );
    192192
    193193        $font_url = twentytwelve_get_font_url();
    194194        if ( ! empty( $font_url ) ) {
    function twentytwelve_customize_partial_blogdescription() { 
    692692 * @since Twenty Twelve 1.0
    693693 */
    694694function twentytwelve_customize_preview_js() {
    695         wp_enqueue_script( 'twentytwelve-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20200516', true );
     695        wp_enqueue_script( 'twentytwelve-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20200516', array( 'in_footer' => true ) );
    696696}
    697697add_action( 'customize_preview_init', 'twentytwelve_customize_preview_js' );
    698698
  • src/wp-content/themes/twentytwenty/functions.php

    diff --git a/src/wp-content/themes/twentytwenty/functions.php b/src/wp-content/themes/twentytwenty/functions.php
    index be61189ea2..cbb7957544 100644
    a b function twentytwenty_block_editor_styles() { 
    431431        }
    432432
    433433        // Enqueue the editor script.
    434         wp_enqueue_script( 'twentytwenty-block-editor-script', get_theme_file_uri( '/assets/js/editor-script-block.js' ), array( 'wp-blocks', 'wp-dom' ), wp_get_theme()->get( 'Version' ), true );
     434        wp_enqueue_script( 'twentytwenty-block-editor-script', get_theme_file_uri( '/assets/js/editor-script-block.js' ), array( 'wp-blocks', 'wp-dom' ), wp_get_theme()->get( 'Version' ), array( 'in_footer' => true ) );
    435435}
    436436
    437437add_action( 'enqueue_block_editor_assets', 'twentytwenty_block_editor_styles', 1, 1 );
    add_action( 'customize_controls_enqueue_scripts', 'twentytwenty_customize_contro 
    647647function twentytwenty_customize_preview_init() {
    648648        $theme_version = wp_get_theme()->get( 'Version' );
    649649
    650         wp_enqueue_script( 'twentytwenty-customize-preview', get_theme_file_uri( '/assets/js/customize-preview.js' ), array( 'customize-preview', 'customize-selective-refresh', 'jquery' ), $theme_version, true );
     650        wp_enqueue_script( 'twentytwenty-customize-preview', get_theme_file_uri( '/assets/js/customize-preview.js' ), array( 'customize-preview', 'customize-selective-refresh', 'jquery' ), $theme_version, array( 'in_footer' => true ) );
    651651        wp_localize_script( 'twentytwenty-customize-preview', 'twentyTwentyBgColors', twentytwenty_get_customizer_color_vars() );
    652652        wp_localize_script( 'twentytwenty-customize-preview', 'twentyTwentyPreviewEls', twentytwenty_get_elements_array() );
    653653
  • src/wp-content/themes/twentytwentyone/functions.php

    diff --git a/src/wp-content/themes/twentytwentyone/functions.php b/src/wp-content/themes/twentytwentyone/functions.php
    index eb80b67daa..ec57c1eb33 100644
    a b add_action( 'wp_enqueue_scripts', 'twenty_twenty_one_scripts' ); 
    473473 */
    474474function twentytwentyone_block_editor_script() {
    475475
    476         wp_enqueue_script( 'twentytwentyone-editor', get_theme_file_uri( '/assets/js/editor.js' ), array( 'wp-blocks', 'wp-dom' ), wp_get_theme()->get( 'Version' ), true );
     476        wp_enqueue_script( 'twentytwentyone-editor', get_theme_file_uri( '/assets/js/editor.js' ), array( 'wp-blocks', 'wp-dom' ), wp_get_theme()->get( 'Version' ), array( 'in_footer' => true ) );
    477477}
    478478
    479479add_action( 'enqueue_block_editor_assets', 'twentytwentyone_block_editor_script' );
  • src/wp-includes/script-loader.php

    diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php
    index 205cedda72..970a3568b3 100644
    a b function enqueue_editor_block_styles_assets() { 
    26922692        $register_script_lines[] = '} )();';
    26932693        $inline_script           = implode( "\n", $register_script_lines );
    26942694
    2695         wp_register_script( 'wp-block-styles', false, array( 'wp-blocks' ), true, true );
     2695        wp_register_script( 'wp-block-styles', false, array( 'wp-blocks' ), true, array( 'in_footer' => true ) );
    26962696        wp_add_inline_script( 'wp-block-styles', $inline_script );
    26972697        wp_enqueue_script( 'wp-block-styles' );
    26982698}