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

$classnamestring
The classname to be used in the block widget’s container HTML, e.g. ‘widget_block widget_text’.
$block_namestring
The name of the block contained by the block widget, e.g. 'core/paragraph'.

Source

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

Changelog

VersionDescription
5.8.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.