From 3dc92bdd032bda7d3ef2cac9a6e8bd0d7fda5fec Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Wed, 30 Oct 2013 15:44:32 +0000 Subject: [PATCH] Inline documentation for hooks in wp-admin/nav-menus.php. Props pauldewouters for the intial patch. Fixes #25528. git-svn-id: https://develop.svn.wordpress.org/trunk@25993 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/nav-menus.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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