Docs: Improve documentation for wp_should_load_separate_core_block_assets()
.
This should clarify the purpose of the function and what effect it has on block styles loading. Props aristath, desrosj, jorbin, SergeyBiryukov. See #53505. Built from https://develop.svn.wordpress.org/trunk@51256 git-svn-id: http://core.svn.wordpress.org/trunk@50865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
186d7c75ea
commit
600d611e0d
@ -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.
|
* 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
|
* @since 5.8.0
|
||||||
*
|
*
|
||||||
* @return bool Whether separate assets will be loaded.
|
* @return bool Whether separate assets will be loaded.
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user