- Timestamp:
- 07/02/2021 06:46:58 PM (3 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/default-filters.php
r51284 r51309 555 555 add_action( 'wp_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 ); 556 556 add_action( 'wp_enqueue_scripts', 'wp_common_block_scripts_and_styles' ); 557 add_action( 'wp_enqueue_scripts', 'wp_enqueue_global_styles' );558 557 add_action( 'admin_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 ); 559 558 add_action( 'admin_enqueue_scripts', 'wp_common_block_scripts_and_styles' ); … … 569 568 add_filter( 'customize_controls_print_styles', 'wp_resource_hints', 1 ); 570 569 570 // Global styles can be enqueued in both the header and the footer. See https://core.trac.wordpress.org/ticket/53494. 571 add_action( 'wp_enqueue_scripts', 'wp_enqueue_global_styles' ); 572 add_action( 'wp_footer', 'wp_enqueue_global_styles', 1 ); 573 571 574 add_action( 'wp_default_styles', 'wp_default_styles' ); 572 575 add_filter( 'style_loader_src', 'wp_style_loader_src', 10, 2 ); -
trunk/src/wp-includes/script-loader.php
r51263 r51309 2268 2268 } 2269 2269 2270 $separate_assets = wp_should_load_separate_core_block_assets(); 2271 2272 /* 2273 * Global styles should be printed in the head when loading all styles combined. 2274 * The footer should only be used to print global styles for classic themes with separate core assets enabled. 2275 * 2276 * See https://core.trac.wordpress.org/ticket/53494. 2277 */ 2278 if ( ( ! $separate_assets && doing_action( 'wp_footer' ) ) || ( $separate_assets && doing_action( 'wp_enqueue_scripts' ) ) ) { 2279 return; 2280 } 2281 2270 2282 $can_use_cache = ( 2271 2283 ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) &&
Note: See TracChangeset
for help on using the changeset viewer.