Skip to content

Commit

Permalink
Rename load_separate_block_styles to load_separate_block_assets (#29703)
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath authored Mar 10, 2021
1 parent 931e5a4 commit 9484b1e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions lib/compat.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 );
}

/**
Expand All @@ -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
Expand Down

0 comments on commit 9484b1e

Please sign in to comment.