WP HOOKS
filtrod 5.8.0

widget_block_dynamic_classname

Args 2Plik wp-includes/widgets/class-wp-widget-block.phpDokumentacja WP ↗

Opis — z kodu źródłowego

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

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

Parametry

ParametrTypOpis
$classnamestringThe classname to be used in the block widget's container HTML, e.g. 'widget_block widget_text'.
$block_namestringThe name of the block contained by the block widget, e.g. 'core/paragraph'.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'widget_block_dynamic_classname', 'twoja_funkcja', 10, 2 );

function twoja_funkcja($param_1, $param_2) {
	// Twój kod
}

Popularne w tej kategorii