customize_nav_menu_available_item_types
Filter HookDescription
Filters the available menu item types.Hook Information
| File Location |
wp-includes/class-wp-customize-nav-menus.php
View on GitHub
|
| Hook Type | Filter |
| Line Number | 929 |
Hook Parameters
| Type | Name | Description |
|---|---|---|
array
|
$item_types
|
Navigation menu item types. |
Usage Examples
Basic Usage
<?php
// Hook into customize_nav_menu_available_item_types
add_filter('customize_nav_menu_available_item_types', 'my_custom_filter', 10, 1);
function my_custom_filter($item_types) {
// Your custom filtering logic here
return $item_types;
}
Source Code Context
wp-includes/class-wp-customize-nav-menus.php:929
- How this hook is used in WordPress core
<?php
924 * @since 4.3.0
925 * @since 4.7.0 Each array item now includes a `$type_label` in addition to `$title`, `$type`, and `$object`.
926 *
927 * @param array $item_types Navigation menu item types.
928 */
929 $item_types = apply_filters( 'customize_nav_menu_available_item_types', $item_types );
930
931 return $item_types;
932 }
933
934 /**
PHP Documentation
<?php
/**
* Filters the available menu item types.
*
* @since 4.3.0
* @since 4.7.0 Each array item now includes a `$type_label` in addition to `$title`, `$type`, and `$object`.
*
* @param array $item_types Navigation menu item types.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/class-wp-customize-nav-menus.php
Related Hooks
Related hooks will be displayed here in future updates.