WP HOOKS
filtrod 5.8.0

widget_types_to_hide_from_legacy_widget_block

Args 1Plik wp-includes/block-editor.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the list of widget-type IDs that should **not** be offered by the Legacy Widget block.

Returning an empty array will make all widgets available.

Parametry

ParametrTypOpis
$widgetsstring[]An array of excluded widget-type IDs.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'widget_types_to_hide_from_legacy_widget_block', 'twoja_funkcja' );

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

Popularne w tej kategorii