wphooks.info - wp_nav_locations_listed_per_menu

wp_nav_locations_listed_per_menu

(trunk - 5.1-alpha-44286)

The hook occurs in the following file:

wp-admin/nav-menus.php:
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
								}
							}

							/**
							 * Filters 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.
							if ( ! empty( $assigned_locations ) ) {
								printf(
									' (%1$s%2$s)',
									implode( ', ', $assigned_locations ),
									count( $locations_assigned_to_this_menu ) > count( $assigned_locations ) ? ' …' : ''
								);
							}