Changeset 50837 for trunk/src/wp-includes/script-loader.php
- Timestamp:
- 05/11/2021 02:14:15 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/script-loader.php
r50836 r50837 1366 1366 1367 1367 /** 1368 * Checks whether separate assets should be loaded for core blocks. 1369 * 1370 * @since 5.8 1371 * 1372 * @return bool 1373 */ 1374 function should_load_separate_core_block_assets() { 1375 if ( is_admin() || is_feed() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) { 1376 return false; 1377 } 1378 /** 1379 * Determine if separate styles & scripts will be loaded for blocks on-render or not. 1380 * 1381 * @since 5.8.0 1382 * 1383 * @param bool $load_separate_styles Whether separate styles will be loaded or not. 1384 * 1385 * @return bool Whether separate styles will be loaded or not. 1386 */ 1387 return apply_filters( 'separate_core_block_assets', false ); 1388 } 1389 1390 /** 1368 1391 * Assign default styles to $styles object. 1369 1392 * … … 1502 1525 } 1503 1526 $styles->add( 'wp-editor-font', $fonts_url ); // No longer used in core as of 5.7. 1504 1505 $block_library_theme_path = "/wp-includes/css/dist/block-library/theme$suffix.css"; 1506 $styles->add( 'wp-block-library-theme', $block_library_theme_path ); 1527 $block_library_theme_path = WPINC . "/css/dist/block-library/theme$suffix.css"; 1528 $styles->add( 'wp-block-library-theme', "/$block_library_theme_path" ); 1507 1529 $styles->add_data( 'wp-block-library-theme', 'path', ABSPATH . $block_library_theme_path ); 1508 1530
Note: See TracChangeset
for help on using the changeset viewer.