wp_should_load_block_assets_on_demand


wp_should_load_block_assets_on_demand ( No parameters )

See:
Returns:
  • (bool) Whether to load block assets only when they are rendered.
Defined at:

Description

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. When this function returns false, all block assets are loaded regardless of whether they are rendered in a page. The default return value depends on the result of {@see}, which controls whether Core block stylesheets should be loaded separately or via a combined 'wp-block-library' stylesheet. This only affects front end and not the block editor screens.

Related Functions

wp_should_load_separate_core_block_assets, wp_should_load_block_editor_scripts_and_styles, wp_should_skip_block_supports_serialization, wp_common_block_scripts_and_styles, wp_should_add_elements_class_name

Top Google Results

User discussions

wpseek mobile