wppaste
WordPress

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:2630wp_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 );} /** * Checks whether block styles should be loaded only on-render. * * When this function returns true, other functions ensure that blocks only load their assets on-render.

History

Introduced in 5.8.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.8.8 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.