Changeset 54408 for trunk/src/wp-includes/script-loader.php
- Timestamp:
- 10/07/2022 09:38:15 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/script-loader.php
r54386 r54408 2410 2410 2411 2411 /* 2412 * If we are loading CSS for each block separately, then we can load the theme.json CSS conditionally.2412 * If loading the CSS for each block separately, then load the theme.json CSS conditionally. 2413 2413 * This removes the CSS from the global-styles stylesheet and adds it to the inline CSS for each block. 2414 * This filter must be registered before calling wp_get_global_stylesheet(); 2414 2415 */ 2415 if ( $separate_assets ) { 2416 add_filter( 'theme_json_get_style_nodes', 'wp_filter_out_block_nodes' ); 2417 // Add each block as an inline css. 2418 wp_add_global_styles_for_blocks(); 2419 } 2416 add_filter( 'theme_json_get_style_nodes', 'wp_filter_out_block_nodes' ); 2420 2417 2421 2418 $stylesheet = wp_get_global_stylesheet(); … … 2428 2425 wp_add_inline_style( 'global-styles', $stylesheet ); 2429 2426 wp_enqueue_style( 'global-styles' ); 2427 2428 // Add each block as an inline css. 2429 wp_add_global_styles_for_blocks(); 2430 2430 } 2431 2431
Note: See TracChangeset
for help on using the changeset viewer.