wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_should_load_separate_core_block_assets › WordPress Function

Since5.8.0
Deprecatedn/a
wp_should_load_separate_core_block_assets ( No parameters )
Returns:
  • (bool) Whether separate assets will be loaded.
Defined at:
Codex:

Checks whether separate assets should be loaded for core blocks on-render.



Source

function wp_should_load_separate_core_block_assets() {
	if ( is_admin() || is_feed() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) {
		return false;
	}

	/**
	 * Filters the flag that decides whether separate scripts and styles
	 * will be loaded for core blocks on-render.
	 *
	 * @since 5.8.0
	 *
	 * @param bool $load_separate_assets Whether separate assets will be loaded.
	 *                                   Default false.
	 */
	return apply_filters( 'should_load_separate_core_block_assets', false );
}