should_load_separate_core_block_assets WordPress Filter Hook

The should_load_separate_core_block_assets hook is used to determine whether or not to load separate assets for the core blocks. This can be useful for performance or debugging purposes.

apply_filters( 'should_load_separate_core_block_assets', bool $load_separate_assets ) #

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.


Top ↑

Parameters

$load_separate_assets

(bool)Whether separate assets will be loaded. Default false (all block assets are loaded, even when not used).


Top ↑

Source

File: wp-includes/script-loader.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More