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,它是塊的名稱。

取消註冊一個區塊型別。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function unregister_block_type( $name ) {
return WP_Block_Type_Registry::get_instance()->unregister( $name );
}
function unregister_block_type( $name ) { return WP_Block_Type_Registry::get_instance()->unregister( $name ); }
function unregister_block_type( $name ) {
	return WP_Block_Type_Registry::get_instance()->unregister( $name );
}

常見問題

FAQs
檢視更多 >