Changeset 50919
- Timestamp:
- 05/17/2021 02:26:53 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks.php
r50837 r50919 159 159 } 160 160 $is_core_block = isset( $metadata['file'] ) && 0 === strpos( $metadata['file'], ABSPATH . WPINC ); 161 if ( $is_core_block && ! should_load_separate_core_block_assets() ) {161 if ( $is_core_block && ! wp_should_load_separate_core_block_assets() ) { 162 162 return false; 163 163 } -
trunk/src/wp-includes/script-loader.php
r50838 r50919 1573 1573 $path = "/wp-includes/css/dist/$package/style$suffix.css"; 1574 1574 1575 if ( 'block-library' === $package && should_load_separate_core_block_assets() ) {1575 if ( 'block-library' === $package && wp_should_load_separate_core_block_assets() ) { 1576 1576 $path = "/wp-includes/css/dist/$package/common$suffix.css"; 1577 1577 } … … 2279 2279 * @return bool Whether separate assets will be loaded or not. 2280 2280 */ 2281 function should_load_separate_core_block_assets() {2281 function wp_should_load_separate_core_block_assets() { 2282 2282 if ( is_admin() || is_feed() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) { 2283 2283 return false; … … 2293 2293 * Default false. 2294 2294 */ 2295 return apply_filters( 's eparate_core_block_assets', false );2295 return apply_filters( 'should_load_separate_core_block_assets', false ); 2296 2296 } 2297 2297 … … 2307 2307 global $current_screen; 2308 2308 2309 if ( should_load_separate_core_block_assets() ) {2309 if ( wp_should_load_separate_core_block_assets() ) { 2310 2310 return; 2311 2311 } -
trunk/tests/phpunit/tests/dependencies/styles.php
r50838 r50919 430 430 */ 431 431 function test_block_styles_for_viewing_without_split_styles() { 432 add_filter( 's eparate_core_block_assets', '__return_false' );432 add_filter( 'should_load_separate_core_block_assets', '__return_false' ); 433 433 wp_default_styles( $GLOBALS['wp_styles'] ); 434 434 … … 447 447 */ 448 448 function test_block_styles_for_viewing_with_split_styles() { 449 add_filter( 's eparate_core_block_assets', '__return_true' );449 add_filter( 'should_load_separate_core_block_assets', '__return_true' ); 450 450 wp_default_styles( $GLOBALS['wp_styles'] ); 451 451
Note: See TracChangeset
for help on using the changeset viewer.