customize_nav_menu_available_items
Filter HookDescription
Filters the available menu items.Hook Information
| File Location | wp-includes/class-wp-customize-nav-menus.phpView on GitHub | 
| Hook Type | Filter | 
| Line Number | 301 | 
Hook Parameters
| Type | Name | Description | 
|---|---|---|
| array | $items | The array of menu items. | 
| string | $object_type | The object type. | 
| string | $object_name | The object name. | 
| int | $page | The current page number. | 
Usage Examples
                        Basic Usage
                    
                    <?php
// Hook into customize_nav_menu_available_items
add_filter('customize_nav_menu_available_items', 'my_custom_filter', 10, 4);
function my_custom_filter($items, $object_type, $object_name, $page) {
    // Your custom filtering logic here
    return $items;
}
Source Code Context
                        wp-includes/class-wp-customize-nav-menus.php:301
                        - How this hook is used in WordPress core
                    
                    <?php
 296  		 * @param array  $items       The array of menu items.
 297  		 * @param string $object_type The object type.
 298  		 * @param string $object_name The object name.
 299  		 * @param int    $page        The current page number.
 300  		 */
 301  		$items = apply_filters( 'customize_nav_menu_available_items', $items, $object_type, $object_name, $page );
 302  
 303  		return $items;
 304  	}
 305  
 306  	/**
PHP Documentation
<?php
/**
		 * Filters the available menu items.
		 *
		 * @since 4.3.0
		 *
		 * @param array  $items       The array of menu items.
		 * @param string $object_type The object type.
		 * @param string $object_name The object name.
		 * @param int    $page        The current page number.
		 */
                        Quick Info
                    
                    - Hook Type: Filter
- Parameters: 4
- File: wp-includes/class-wp-customize-nav-menus.php
                        Related Hooks
                    
                    Related hooks will be displayed here in future updates.
