Filter hook 'should_load_separate_core_block_assets'
in WP Core File wp-includes/script-loader.php at line 2603
Description
Filters whether block styles should be loaded separately. Returning false loads all core block assets, regardless of whether they are rendered in a page or not. Returning true loads core block assets only when they are rendered.
Occurrences
Filename |
Line Number |
wp-includes/script-loader.php |
2603 |
Parameters
Type |
Name |
Description |
bool |
$load_separate_assets |
Whether separate assets will be loaded. Default false (all block assets are loaded, even when not used). |
PHP Doc
/**
* Filters whether block styles should be loaded separately.
*
* Returning false loads all core block assets, regardless of whether they are rendered
* in a page or not. Returning true loads core block assets only when they are rendered.
*
* @since 5.8.0
*
* @param bool $load_separate_assets Whether separate assets will be loaded.
* Default false (all block assets are loaded, even when not used).
*/