customize_nav_menu_searched_items filter-hookWP 4.5.0

Filters the available menu items during a search request.

Usage

add_filter( 'customize_nav_menu_searched_items', 'wp_kama_customize_nav_menu_searched_items_filter', 10, 2 );

/**
 * Function for `customize_nav_menu_searched_items` filter-hook.
 * 
 * @param array $items The array of menu items.
 * @param array $args  Includes 'pagenum' and 's' (search) arguments.
 *
 * @return array
 */
function wp_kama_customize_nav_menu_searched_items_filter( $items, $args ){

	// filter...
	return $items;
}
$items(array)
The array of menu items.
$args(array)
Includes 'pagenum' and 's' (search) arguments.

Changelog

Since 4.5.0 Introduced.

Where the hook is called

WP_Customize_Nav_Menus::search_available_items_query()
customize_nav_menu_searched_items
wp-includes/class-wp-customize-nav-menus.php 473
$items = apply_filters( 'customize_nav_menu_searched_items', $items, $args );

Where the hook is used in WordPress

Usage not found.