GC_Customize_Widgets::should_load_block_editor_scripts_and_styles()

最后更新于:2021-11-27 12:36:24

GC_Customize_Widgets::should_load_block_editor_scripts_and_styles( bool$is_block_editor_screen)

Tells the script loader to load the scripts and styles of custom blocks if the widgets block editor is enabled.

参数

$is_block_editor_screen

(bool) (Required) Current decision about loading block assets.

响应

(bool) Filtered decision about loading block assets.

源文件

文件: gc-includes/class-gc-customize-widgets.php

	public function should_load_block_editor_scripts_and_styles( $is_block_editor_screen ) {
		if ( gc_use_widgets_block_editor() ) {
			return true;
		}

		return $is_block_editor_screen;
	}