WP HOOKS
filtrod 6.5.0

block_core_navigation_listable_blocks

Args 1Plik wp-includes/blocks/navigation.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filter the list of blocks that need a list item wrapper.

Affords the ability to customize which blocks need a list item wrapper when rendered within a core/navigation block. This is useful for blocks that are not list items but should be wrapped in a list item when used as a child of a navigation block.

Parametry

ParametrTypOpis
$needs_list_item_wrapperarrayThe list of blocks that need a list item wrapper.

Wywołanie

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

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

Popularne w tej kategorii