wp_use_widgets_block_editor

函数
wp_use_widgets_block_editor ( No parameters )
返回值
  • (bool) Whether to use the block editor to manage widgets.
定义位置
相关方法
wp_setup_widgets_block_editorwp_check_widget_editor_depsget_legacy_widget_block_editor_settingswp_widgets_initwp_parse_widget_id
引入
5.8.0
弃用
-

wp_use_widgets_block_editor: 这个函数用来检查是否正在使用区块编辑器(Gutenberg)来管理WordPress管理员中的小工具。如果正在使用区块编辑器,它返回true,否则返回false。

是否使用区块编辑器来管理小工具。默认为”true”,除非某个主题取消了对widgets-block-editor的支持,或者某个插件过滤了这个函数的返回值。

function wp_use_widgets_block_editor() {
	/**
	 * Filters whether to use the block editor to manage widgets.
	 *
	 * @since 5.8.0
	 *
	 * @param bool $use_widgets_block_editor Whether to use the block editor to manage widgets.
	 */
	return apply_filters(
		'use_widgets_block_editor',
		get_theme_support( 'widgets-block-editor' )
	);
}

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-14 19:36:39

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: