apply_filters( 'should_load_separate_core_block_assets', bool $load_separate_assets )
- Since
- 5.8.0
Filters whether block styles should be loaded separately.
Description
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.
Parameters
$load_separate_assetsbool- Whether separate assets will be loaded. Default false (all block assets are loaded, even when not used).
Fired at · 1
wp-includes/script-loader.php:2605wp_should_load_separate_core_block_assets()
Source
* * @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). */ return apply_filters( 'should_load_separate_core_block_assets', false );} /** * Enqueues registered block scripts and styles, depending on current rendered * context (only enqueuing editor scripts while in context of the editor). *History
Introduced in 5.8.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.