diff --git a/src/wp-admin/nav-menus.php b/src/wp-admin/nav-menus.php index 7306778aa5..7527753b20 100644 --- a/src/wp-admin/nav-menus.php +++ b/src/wp-admin/nav-menus.php @@ -602,7 +602,13 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' ); - +
@@ -627,6 +633,14 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' ); foreach ( array_keys( $menu_locations, $_nav_menu->term_id ) as $menu_location_key ) { $locations_assigned_to_this_menu[] = $locations[ $menu_location_key ]; } + + /** + * Filter the number of locations listed per menu in the drop-down select. + * + * @since 3.6.0 + * + * @param int $locations Number of menu locations to list. Default 3. + */ $assigned_locations = array_slice( $locations_assigned_to_this_menu, 0, absint( apply_filters( 'wp_nav_locations_listed_per_menu', 3 ) ) ); // Adds ellipses following the number of locations defined in $assigned_locations