Changeset 56064 for trunk/src/wp-includes/script-loader.php
- Timestamp:
- 06/27/2023 11:26:12 AM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/script-loader.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/script-loader.php
r56047 r56064 2373 2373 wp_enqueue_style( 'wp-block-library' ); 2374 2374 2375 if ( current_theme_supports( 'wp-block-styles' ) ) { 2376 if ( wp_should_load_separate_core_block_assets() ) { 2377 $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? 'css' : 'min.css'; 2378 $files = glob( __DIR__ . "/blocks/**/theme.$suffix" ); 2379 foreach ( $files as $path ) { 2380 $block_name = basename( dirname( $path ) ); 2381 if ( is_rtl() && file_exists( __DIR__ . "/blocks/$block_name/theme-rtl.$suffix" ) ) { 2382 $path = __DIR__ . "/blocks/$block_name/theme-rtl.$suffix"; 2383 } 2384 wp_add_inline_style( "wp-block-{$block_name}", file_get_contents( $path ) ); 2385 } 2386 } else { 2387 wp_enqueue_style( 'wp-block-library-theme' ); 2388 } 2375 if ( current_theme_supports( 'wp-block-styles' ) && ! wp_should_load_separate_core_block_assets() ) { 2376 wp_enqueue_style( 'wp-block-library-theme' ); 2389 2377 } 2390 2378
Note: See TracChangeset
for help on using the changeset viewer.