From f34eb77cbc1377e15a65064aa5460c1710f22f3a Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Wed, 30 Oct 2013 15:45:08 +0000 Subject: [PATCH] Inline documentation for hooks in wp-admin/nav-menus.php. Props pauldewouters for the intial patch. Fixes #25528. Built from https://develop.svn.wordpress.org/trunk@25993 git-svn-id: http://core.svn.wordpress.org/trunk@25926 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/nav-menus.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/wp-admin/nav-menus.php b/wp-admin/nav-menus.php index 7306778aa5..7527753b20 100644 --- a/wp-admin/nav-menus.php +++ b/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