apply_filters( 'widget_block_dynamic_classname', string $classname, string $block_name )

The classname used in the block widget’s container HTML.

Description

This can be set according to the name of the block contained by the block widget.

Parameters

$classname

(string) The classname to be used in the block widget's container HTML, e.g. 'widget_block widget_text'.

$block_name

(string) The name of the block contained by the block widget, e.g. 'core/paragraph'.

Source

File: wp-includes/widgets/class-wp-widget-block.php

View on Trac

Changelog

Version Description
5.8.0 Introduced.

© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/widget_block_dynamic_classname