Changeset 26634
- Timestamp:
- 12/04/2013 08:36:10 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/nav-menus.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/nav-menus.php
r26518 r26634 631 631 $locations_assigned_to_this_menu = array(); 632 632 foreach ( array_keys( $menu_locations, $_nav_menu->term_id ) as $menu_location_key ) { 633 $locations_assigned_to_this_menu[] = $locations[ $menu_location_key ]; 633 if ( isset( $locations[ $menu_location_key ] ) ) { 634 $locations_assigned_to_this_menu[] = $locations[ $menu_location_key ]; 635 } 634 636 } 635 637 … … 644 646 645 647 // Adds ellipses following the number of locations defined in $assigned_locations 646 printf( ' (%1$s%2$s)', 647 implode( ', ', $assigned_locations ), 648 count( $locations_assigned_to_this_menu ) > count( $assigned_locations ) ? ' …' : '' 649 ); 648 if ( ! empty( $assigned_locations ) ) { 649 printf( ' (%1$s%2$s)', 650 implode( ', ', $assigned_locations ), 651 count( $locations_assigned_to_this_menu ) > count( $assigned_locations ) ? ' …' : '' 652 ); 653 } 650 654 } 651 655 ?>
Note: See TracChangeset
for help on using the changeset viewer.