wp_nav_locations_listed_per_menu filter-hookWP 3.6.0

Filters the number of locations listed per menu in the drop-down select.

Usage

add_filter( 'wp_nav_locations_listed_per_menu', 'wp_kama_nav_locations_listed_per_menu_filter' );

/**
 * Function for `wp_nav_locations_listed_per_menu` filter-hook.
 * 
 * @param int $locations Number of menu locations to list.
 *
 * @return int
 */
function wp_kama_nav_locations_listed_per_menu_filter( $locations ){

	// filter...
	return $locations;
}
$locations(int)
Number of menu locations to list.
Default: 3

Changelog

Since 3.6.0 Introduced.

Where the hook is called

In file: /wp-admin/nav-menus.php
wp_nav_locations_listed_per_menu
wp-admin/nav-menus.php 1000
$locations_listed_per_menu = absint( apply_filters( 'wp_nav_locations_listed_per_menu', 3 ) );

Where the hook is used in WordPress

Usage not found.