widget_block_dynamic_classname

过滤钩子


apply_filters( 'widget_block_dynamic_classname', $classname, $block_name )
参数
  • (string)
    $classname
    The classname to be used in the block widget’s container HTML,
    e.g. ‘widget_block widget_text’.
    Required:
  • (string)
    $block_name
    The name of the block contained by the block widget,
    e.g. ‘core/paragraph’.
    Required:
定义位置
  • wp-includes/widgets/class-wp-widget-block.php
    , line 167
引入
5.8.0
弃用

区块小工具的容器HTML中使用的类名。

这可以根据区块小工具所包含的区块的名称来设置。

return apply_filters( 'widget_block_dynamic_classname', $classname, $block_name );