unregister_block_style

函数
unregister_block_style ( $block_name, $block_style_name )
参数
  • (string) $block_name Block type name including namespace.
    Required:
  • (string) $block_style_name Block style name.
    Required:
返回值
  • (bool) True if the block style was unregistered with success and false otherwise.
定义位置
相关方法
register_block_styleunregister_block_typeregister_block_typeregister_block_style_handleunregister_post_type
引入
5.3.0
弃用
-

unregister_block_style: 这个函数取消注册一个自定义的块样式。它有两个参数:$block_name,是块的名称,$style_handle,是样式的名称。

取消注册一个区块样式。

function unregister_block_style( $block_name, $block_style_name ) {
	return WP_Block_Styles_Registry::get_instance()->unregister( $block_name, $block_style_name );
}

常见问题

FAQs
查看更多 >