wp_is_block_theme

函数
wp_is_block_theme ( No parameters )
返回值
  • (bool) Whether the active theme is a block-based theme or not.
定义位置
相关方法
wp_enable_block_templatesis_child_themeget_block_templatewp_using_themeswp_is_stream
引入
5.9.0
弃用
-

wp_is_block_theme: 这个函数用来检查当前的主题是否是WordPress中的一个区块主题。区块主题是一种新的主题类型,它被设计为与区块编辑器无缝地工作。

返回活动主题是否是一个基于区块的主题。

function wp_is_block_theme() {
	return wp_get_theme()->is_block_theme();
}

常见问题

FAQs
查看更多 >
闪电侠

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

2025-12-15 02:36:46

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

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

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