-
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() { |
| 673 | 673 | * @since Twenty Eleven 1.3 |
| 674 | 674 | */ |
| 675 | 675 | function 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 ) ); |
| 677 | 677 | } |
| 678 | 678 | add_action( 'customize_preview_init', 'twentyeleven_customize_preview_js' ); |
-
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() { |
| 444 | 444 | wp_style_add_data( 'twentyfifteen-ie7', 'conditional', 'lt IE 8' ); |
| 445 | 445 | |
| 446 | 446 | // 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 ) ); |
| 448 | 448 | |
| 449 | 449 | if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { |
| 450 | 450 | wp_enqueue_script( 'comment-reply' ); |
| … |
… |
function twentyfifteen_scripts() { |
| 454 | 454 | wp_enqueue_script( 'twentyfifteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20141210' ); |
| 455 | 455 | } |
| 456 | 456 | |
| 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 ) ); |
| 458 | 458 | wp_localize_script( |
| 459 | 459 | 'twentyfifteen-script', |
| 460 | 460 | 'screenReaderText', |
-
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' ); |
| 359 | 359 | * @since Twenty Fifteen 1.0 |
| 360 | 360 | */ |
| 361 | 361 | function 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 ) ); |
| 363 | 363 | wp_localize_script( 'color-scheme-control', 'colorScheme', twentyfifteen_get_color_schemes() ); |
| 364 | 364 | } |
| 365 | 365 | add_action( 'customize_controls_enqueue_scripts', 'twentyfifteen_customize_control_js' ); |
| … |
… |
add_action( 'customize_controls_enqueue_scripts', 'twentyfifteen_customize_contr |
| 370 | 370 | * @since Twenty Fifteen 1.0 |
| 371 | 371 | */ |
| 372 | 372 | function 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 ) ); |
| 374 | 374 | } |
| 375 | 375 | add_action( 'customize_preview_init', 'twentyfifteen_customize_preview_js' ); |
| 376 | 376 | |
-
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() { |
| 367 | 367 | } |
| 368 | 368 | |
| 369 | 369 | 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 ) ); |
| 371 | 371 | wp_localize_script( |
| 372 | 372 | 'twentyfourteen-slider', |
| 373 | 373 | 'featuredSliderDefaults', |
| … |
… |
function twentyfourteen_scripts() { |
| 378 | 378 | ); |
| 379 | 379 | } |
| 380 | 380 | |
| 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 ) ); |
| 382 | 382 | } |
| 383 | 383 | add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' ); |
| 384 | 384 | |
-
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 ) { |
| 142 | 142 | * @since Twenty Fourteen 1.0 |
| 143 | 143 | */ |
| 144 | 144 | function 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 ) ); |
| 146 | 146 | } |
| 147 | 147 | add_action( 'customize_preview_init', 'twentyfourteen_customize_preview_js' ); |
| 148 | 148 | |
-
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 { |
| 434 | 434 | * @since Twenty Fourteen 1.0 |
| 435 | 435 | */ |
| 436 | 436 | 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 ) ); |
| 438 | 438 | } |
| 439 | 439 | |
| 440 | 440 | /** |
-
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() { |
| 259 | 259 | wp_style_add_data( 'twentynineteen-style', 'rtl', 'replace' ); |
| 260 | 260 | |
| 261 | 261 | 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 ) ); |
| 264 | 264 | } |
| 265 | 265 | |
| 266 | 266 | wp_enqueue_style( 'twentynineteen-print-style', get_template_directory_uri() . '/print.css', array(), wp_get_theme()->get( 'Version' ), 'print' ); |
-
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() { |
| 125 | 125 | * Bind JS handlers to instantly live-preview changes. |
| 126 | 126 | */ |
| 127 | 127 | function 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 ) ); |
| 129 | 129 | } |
| 130 | 130 | add_action( 'customize_preview_init', 'twentynineteen_customize_preview_js' ); |
| 131 | 131 | |
| … |
… |
add_action( 'customize_preview_init', 'twentynineteen_customize_preview_js' ); |
| 133 | 133 | * Load dynamic logic for the customizer controls area. |
| 134 | 134 | */ |
| 135 | 135 | function 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 ) ); |
| 137 | 137 | } |
| 138 | 138 | add_action( 'customize_controls_enqueue_scripts', 'twentynineteen_panels_js' ); |
| 139 | 139 | |
-
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() { |
| 477 | 477 | wp_script_add_data( 'html5', 'conditional', 'lt IE 9' ); |
| 478 | 478 | |
| 479 | 479 | // 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 ) ); |
| 481 | 481 | |
| 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 ) ); |
| 483 | 483 | |
| 484 | 484 | $twentyseventeen_l10n = array( |
| 485 | 485 | 'quote' => twentyseventeen_get_svg( array( 'icon' => 'quote-right' ) ), |
| 486 | 486 | ); |
| 487 | 487 | |
| 488 | 488 | 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 ) ); |
| 490 | 490 | $twentyseventeen_l10n['expand'] = __( 'Expand child menu', 'twentyseventeen' ); |
| 491 | 491 | $twentyseventeen_l10n['collapse'] = __( 'Collapse child menu', 'twentyseventeen' ); |
| 492 | 492 | $twentyseventeen_l10n['icon'] = twentyseventeen_get_svg( |
| … |
… |
function twentyseventeen_scripts() { |
| 499 | 499 | |
| 500 | 500 | wp_localize_script( 'twentyseventeen-global', 'twentyseventeenScreenReaderText', $twentyseventeen_l10n ); |
| 501 | 501 | |
| 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 ) ); |
| 503 | 503 | |
| 504 | 504 | if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { |
| 505 | 505 | wp_enqueue_script( 'comment-reply' ); |
-
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() { |
| 245 | 245 | * Bind JS handlers to instantly live-preview changes. |
| 246 | 246 | */ |
| 247 | 247 | function 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 ) ); |
| 249 | 249 | } |
| 250 | 250 | add_action( 'customize_preview_init', 'twentyseventeen_customize_preview_js' ); |
| 251 | 251 | |
| … |
… |
add_action( 'customize_preview_init', 'twentyseventeen_customize_preview_js' ); |
| 253 | 253 | * Load dynamic logic for the customizer controls area. |
| 254 | 254 | */ |
| 255 | 255 | function 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 ) ); |
| 257 | 257 | } |
| 258 | 258 | add_action( 'customize_controls_enqueue_scripts', 'twentyseventeen_panels_js' ); |
-
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() { |
| 413 | 413 | wp_script_add_data( 'twentysixteen-html5', 'conditional', 'lt IE 9' ); |
| 414 | 414 | |
| 415 | 415 | // 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 ) ); |
| 417 | 417 | |
| 418 | 418 | if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { |
| 419 | 419 | wp_enqueue_script( 'comment-reply' ); |
| … |
… |
function twentysixteen_scripts() { |
| 423 | 423 | wp_enqueue_script( 'twentysixteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20170530' ); |
| 424 | 424 | } |
| 425 | 425 | |
| 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 ) ); |
| 427 | 427 | |
| 428 | 428 | wp_localize_script( |
| 429 | 429 | 'twentysixteen-script', |
-
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' ); |
| 486 | 486 | * @since Twenty Sixteen 1.0 |
| 487 | 487 | */ |
| 488 | 488 | function 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 ) ); |
| 490 | 490 | wp_localize_script( 'color-scheme-control', 'colorScheme', twentysixteen_get_color_schemes() ); |
| 491 | 491 | } |
| 492 | 492 | add_action( 'customize_controls_enqueue_scripts', 'twentysixteen_customize_control_js' ); |
| … |
… |
add_action( 'customize_controls_enqueue_scripts', 'twentysixteen_customize_contr |
| 497 | 497 | * @since Twenty Sixteen 1.0 |
| 498 | 498 | */ |
| 499 | 499 | function 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 ) ); |
| 501 | 501 | } |
| 502 | 502 | add_action( 'customize_preview_init', 'twentysixteen_customize_preview_js' ); |
| 503 | 503 | |
-
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() { |
| 321 | 321 | } |
| 322 | 322 | |
| 323 | 323 | // 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 ) ); |
| 325 | 325 | |
| 326 | 326 | // Add Source Sans Pro and Bitter fonts, used in the main stylesheet. |
| 327 | 327 | $font_version = ( 0 === strpos( (string) twentythirteen_fonts_url(), get_template_directory_uri() . '/' ) ) ? '20230328' : null; |
| … |
… |
function twentythirteen_customize_partial_blogdescription() { |
| 843 | 843 | * @since Twenty Thirteen 1.0 |
| 844 | 844 | */ |
| 845 | 845 | function 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 ) ); |
| 847 | 847 | } |
| 848 | 848 | add_action( 'customize_preview_init', 'twentythirteen_customize_preview_js' ); |
| 849 | 849 | |
-
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() { |
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | // 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 ) ); |
| 192 | 192 | |
| 193 | 193 | $font_url = twentytwelve_get_font_url(); |
| 194 | 194 | if ( ! empty( $font_url ) ) { |
| … |
… |
function twentytwelve_customize_partial_blogdescription() { |
| 692 | 692 | * @since Twenty Twelve 1.0 |
| 693 | 693 | */ |
| 694 | 694 | function 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 ) ); |
| 696 | 696 | } |
| 697 | 697 | add_action( 'customize_preview_init', 'twentytwelve_customize_preview_js' ); |
| 698 | 698 | |
-
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() { |
| 431 | 431 | } |
| 432 | 432 | |
| 433 | 433 | // 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 ) ); |
| 435 | 435 | } |
| 436 | 436 | |
| 437 | 437 | add_action( 'enqueue_block_editor_assets', 'twentytwenty_block_editor_styles', 1, 1 ); |
| … |
… |
add_action( 'customize_controls_enqueue_scripts', 'twentytwenty_customize_contro |
| 647 | 647 | function twentytwenty_customize_preview_init() { |
| 648 | 648 | $theme_version = wp_get_theme()->get( 'Version' ); |
| 649 | 649 | |
| 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 ) ); |
| 651 | 651 | wp_localize_script( 'twentytwenty-customize-preview', 'twentyTwentyBgColors', twentytwenty_get_customizer_color_vars() ); |
| 652 | 652 | wp_localize_script( 'twentytwenty-customize-preview', 'twentyTwentyPreviewEls', twentytwenty_get_elements_array() ); |
| 653 | 653 | |
-
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' ); |
| 473 | 473 | */ |
| 474 | 474 | function twentytwentyone_block_editor_script() { |
| 475 | 475 | |
| 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 ) ); |
| 477 | 477 | } |
| 478 | 478 | |
| 479 | 479 | add_action( 'enqueue_block_editor_assets', 'twentytwentyone_block_editor_script' ); |
-
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() { |
| 2692 | 2692 | $register_script_lines[] = '} )();'; |
| 2693 | 2693 | $inline_script = implode( "\n", $register_script_lines ); |
| 2694 | 2694 | |
| 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 ) ); |
| 2696 | 2696 | wp_add_inline_script( 'wp-block-styles', $inline_script ); |
| 2697 | 2697 | wp_enqueue_script( 'wp-block-styles' ); |
| 2698 | 2698 | } |