Changeset 36573
- Timestamp:
- 02/18/2016 05:15:28 PM (8 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-nav-menus.js
r36432 r36573 25 25 nav_menu: {}, 26 26 nav_menu_item: {} 27 } 27 }, 28 locationSlugMappedToName: {} 28 29 }; 29 30 if ( 'undefined' !== typeof _wpCustomizeNavMenusSettings ) { … … 806 807 * @param {array} themeLocations 807 808 */ 808 updateAssignedLocationsInSectionTitle: function( themeLocation s ) {809 updateAssignedLocationsInSectionTitle: function( themeLocationSlugs ) { 809 810 var section = this, 810 811 $title; … … 812 813 $title = section.container.find( '.accordion-section-title:first' ); 813 814 $title.find( '.menu-in-location' ).remove(); 814 _.each( themeLocations, function( themeLocation ) { 815 var $label = $( '<span class="menu-in-location"></span>' ); 816 $label.text( api.Menus.data.l10n.menuLocation.replace( '%s', themeLocation ) ); 815 _.each( themeLocationSlugs, function( themeLocationSlug ) { 816 var $label, locationName; 817 $label = $( '<span class="menu-in-location"></span>' ); 818 locationName = api.Menus.data.locationSlugMappedToName[ themeLocationSlug ]; 819 $label.text( api.Menus.data.l10n.menuLocation.replace( '%s', locationName ) ); 817 820 $title.append( $label ); 818 821 }); 819 822 820 section.container.toggleClass( 'assigned-to-menu-location', 0 !== themeLocation s.length );823 section.container.toggleClass( 'assigned-to-menu-location', 0 !== themeLocationSlugs.length ); 821 824 822 825 }, -
trunk/src/wp-includes/class-wp-customize-nav-menus.php
r36422 r36573 351 351 'unnamed' => _x( '(unnamed)', 'Missing menu name.' ), 352 352 'custom_label' => __( 'Custom Link' ), 353 /* translators: %s: menu location slug*/353 /* translators: %s: menu location */ 354 354 'menuLocation' => _x( '(Currently set to: %s)', 'menu' ), 355 355 'menuNameLabel' => __( 'Menu Name' ), … … 382 382 'nav_menu_item' => $temp_nav_menu_item_setting->default, 383 383 ), 384 'locationSlugMappedToName' => get_registered_nav_menus(), 384 385 ); 385 386
Note: See TracChangeset
for help on using the changeset viewer.