diff --git a/wp-includes/blocks.php b/wp-includes/blocks.php index 9a552835f7..e9dcdfbf7c 100644 --- a/wp-includes/blocks.php +++ b/wp-includes/blocks.php @@ -158,7 +158,7 @@ function register_block_style_handle( $metadata, $field_name ) { return false; } $is_core_block = isset( $metadata['file'] ) && 0 === strpos( $metadata['file'], ABSPATH . WPINC ); - if ( $is_core_block && ! should_load_separate_core_block_assets() ) { + if ( $is_core_block && ! wp_should_load_separate_core_block_assets() ) { return false; } diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 515622825a..16a5f07d09 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -1572,7 +1572,7 @@ function wp_default_styles( $styles ) { $handle = 'wp-' . $package; $path = "/wp-includes/css/dist/$package/style$suffix.css"; - if ( 'block-library' === $package && should_load_separate_core_block_assets() ) { + if ( 'block-library' === $package && wp_should_load_separate_core_block_assets() ) { $path = "/wp-includes/css/dist/$package/common$suffix.css"; } $styles->add( $handle, $path, $dependencies ); @@ -2278,7 +2278,7 @@ function wp_should_load_block_editor_scripts_and_styles() { * * @return bool Whether separate assets will be loaded or not. */ -function should_load_separate_core_block_assets() { +function wp_should_load_separate_core_block_assets() { if ( is_admin() || is_feed() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) { return false; } @@ -2292,7 +2292,7 @@ function should_load_separate_core_block_assets() { * @param bool $load_separate_assets Whether separate assets will be loaded or not. * Default false. */ - return apply_filters( 'separate_core_block_assets', false ); + return apply_filters( 'should_load_separate_core_block_assets', false ); } /** @@ -2306,7 +2306,7 @@ function should_load_separate_core_block_assets() { function wp_enqueue_registered_block_scripts_and_styles() { global $current_screen; - if ( should_load_separate_core_block_assets() ) { + if ( wp_should_load_separate_core_block_assets() ) { return; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 64f039081e..e99495b5af 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.8-alpha-50918'; +$wp_version = '5.8-alpha-50919'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.