customize_nav_menu_available_item_types filter-hookWP 4.3.0

Filters the available menu item types.

Usage

add_filter( 'customize_nav_menu_available_item_types', 'wp_kama_customize_nav_menu_available_item_types_filter' );

/**
 * Function for `customize_nav_menu_available_item_types` filter-hook.
 * 
 * @param array $item_types Navigation menu item types.
 *
 * @return array
 */
function wp_kama_customize_nav_menu_available_item_types_filter( $item_types ){

	// filter...
	return $item_types;
}
$item_types(array)
Navigation menu item types.

Changelog

Since 4.3.0 Introduced.
Since 4.7.0 Each array item now includes a $type_label in addition to $title, $type, and $object.

Where the hook is called

WP_Customize_Nav_Menus::available_item_types()
customize_nav_menu_available_item_types
wp-includes/class-wp-customize-nav-menus.php 926
$item_types = apply_filters( 'customize_nav_menu_available_item_types', $item_types );

Where the hook is used in WordPress

Usage not found.