Ticket #26287: 26287.diff
| File 26287.diff, 1.4 KB (added by , 12 years ago) |
|---|
-
wp-admin/nav-menus.php
630 630 if ( ! empty( $menu_locations ) && in_array( $_nav_menu->term_id, $menu_locations ) ) { 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 636 638 /** … … 643 645 $assigned_locations = array_slice( $locations_assigned_to_this_menu, 0, absint( apply_filters( 'wp_nav_locations_listed_per_menu', 3 ) ) ); 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 ?> 652 656 </option>