unregister_block_type

函数
unregister_block_type ( $name )
参数
  • (string|WP_Block_Type) $name Block type name including namespace, or alternatively a complete WP_Block_Type instance.
    Required:
返回值
  • (WP_Block_Type|false) The unregistered block type on success, or false on failure.
定义位置
相关方法
register_block_typeunregister_block_styleregister_block_styleunregister_post_typeregister_post_type
引入
5.0.0
弃用
-

unregister_block_type: 该函数取消对一个自定义块类型的注册。它需要一个参数,即$block_name,它是块的名称。

取消注册一个区块类型。

function unregister_block_type( $name ) {
	return WP_Block_Type_Registry::get_instance()->unregister( $name );
}

常见问题

FAQs
查看更多 >
闪电侠

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

2025-12-08 10:34:04

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

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

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