diff --git a/lib/blocks.php b/lib/blocks.php index e6e873728d70d..202498d278c53 100644 --- a/lib/blocks.php +++ b/lib/blocks.php @@ -164,7 +164,7 @@ function gutenberg_reregister_core_block_types() { * @return void */ function gutenberg_register_core_block_styles( $block_name ) { - if ( ! gutenberg_should_load_separate_block_styles() ) { + if ( ! gutenberg_should_load_separate_block_assets() ) { return; } diff --git a/lib/client-assets.php b/lib/client-assets.php index 79dda6d684fa1..ef74ce9e02512 100644 --- a/lib/client-assets.php +++ b/lib/client-assets.php @@ -322,7 +322,7 @@ function gutenberg_register_packages_styles( $styles ) { ); $styles->add_data( 'wp-components', 'rtl', 'replace' ); - $block_library_filename = gutenberg_should_load_separate_block_styles() ? 'common' : 'style'; + $block_library_filename = gutenberg_should_load_separate_block_assets() ? 'common' : 'style'; gutenberg_override_style( $styles, 'wp-block-library', diff --git a/lib/compat.php b/lib/compat.php index 1ccb90b3193f0..e391b66aa1fed 100644 --- a/lib/compat.php +++ b/lib/compat.php @@ -13,7 +13,7 @@ * * @return bool */ -function gutenberg_should_load_separate_block_styles() { +function gutenberg_should_load_separate_block_assets() { $load_separate_styles = gutenberg_is_fse_theme(); /** * Determine if separate styles will be loaded for blocks on-render or not. @@ -22,7 +22,7 @@ function gutenberg_should_load_separate_block_styles() { * * @return bool */ - return apply_filters( 'load_separate_block_styles', $load_separate_styles ); + return apply_filters( 'load_separate_block_assets', $load_separate_styles ); } /** @@ -31,7 +31,7 @@ function gutenberg_should_load_separate_block_styles() { * @return void */ function gutenberg_remove_hook_wp_enqueue_registered_block_scripts_and_styles() { - if ( gutenberg_should_load_separate_block_styles() ) { + if ( gutenberg_should_load_separate_block_assets() ) { /** * Avoid enqueueing block assets of all registered blocks for all posts, instead * deferring to block render mechanics to enqueue scripts, thereby ensuring only