diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 3227204501..fa06871b7b 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -2328,6 +2328,20 @@ function wp_should_load_block_editor_scripts_and_styles() { /** * Checks whether separate assets should be loaded for core blocks on-render. * + * When this function returns true, other functions ensure that core blocks + * only load their styles on-render, and each block loads its own, individual + * stylesheet. Third-party blocks only load their styles when rendered. + * + * When this function returns false, all core block styles are loaded regardless + * of whether they are rendered in a page or not, because they are all part of + * the `block-library/style.css` file. Third-party blocks always get enqueued + * regardless of whether they are rendered or not. + * + * This only affects front end and not the block editor screens. + * + * @see wp_enqueue_registered_block_scripts_and_styles() + * @see register_block_style_handle() + * * @since 5.8.0 * * @return bool Whether separate assets will be loaded. diff --git a/wp-includes/version.php b/wp-includes/version.php index 252cf69779..4a0a89254b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.8-beta4-51255'; +$wp_version = '5.8-beta4-51256'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.