Changeset 41832
- Timestamp:
- 10/11/2017 07:37:10 PM (8 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/customize-controls.css
r41817 r41832 678 678 679 679 .customize-section-description-container, 680 .control-section-nav_menu .customize-section-description-container { 680 .control-section-nav_menu .customize-section-description-container, 681 .control-section-new_menu .customize-section-description-container { 681 682 margin-bottom: 15px; 683 } 684 685 .control-section-nav_menu .customize-control, 686 .control-section-new_menu .customize-control { 687 /* Override default `margin-bottom` for `.customize-control` */ 688 margin-bottom: 0; 682 689 } 683 690 -
trunk/src/wp-admin/css/customize-nav-menus.css
r41823 r41832 1 1 #customize-theme-controls #accordion-section-menu_locations { 2 2 position: relative; 3 margin-top: 15px;3 margin-top: 30px; 4 4 } 5 5 … … 51 51 float: right; 52 52 min-width: 85px; 53 }54 55 #customize-new-menu-submit-description {56 margin: 0;57 53 } 58 54 … … 213 209 margin-top: 24px; 214 210 border-top: 1px solid #ddd; 211 } 212 213 .wp-customizer .control-section-nav_menu .menu-location-settings, 214 .customize-control-nav_menu_auto_add { 215 215 padding-top: 12px; 216 216 } … … 218 218 .customize-control-nav_menu_auto_add label { 219 219 vertical-align: top; 220 } 221 222 .menu-location-settings .new-menu-locations-widget-note { 223 display: block; 220 224 } 221 225 -
trunk/src/wp-admin/js/customize-nav-menus.js
r41823 r41832 813 813 }); 814 814 815 // Wait until after construction to patch the UI 816 _.defer( function () { 817 818 panel.contentContainer.find( '#accordion-section-menu_locations' ).prepend( 815 // Inject additional heading into the menu locations section's head container. 816 api.section( 'menu_locations', function( section ) { 817 section.headContainer.prepend( 819 818 wp.template( 'nav-menu-locations-header' )( api.Menus.data ) 820 );821 822 panel.contentContainer.find( '#accordion-section-add_menu .accordion-section-title' ).replaceWith(823 wp.template( 'nav-menu-create-menu-section-title' )824 819 ); 825 820 } ); … … 1167 1162 navMenuSettingPattern = /^nav_menu\[/; 1168 1163 1164 section.headContainer.find( '.accordion-section-title' ).replaceWith( 1165 wp.template( 'nav-menu-create-menu-section-title' ) 1166 ); 1167 1169 1168 /* 1170 1169 * We have to manually handle section expanded because we do not … … 1290 1289 section: section.id, 1291 1290 priority: 1, 1292 menu_id: '' 1291 menu_id: '', 1292 isCreating: true 1293 1293 } ); 1294 1294 api.control.add( menuLocationsControlId, menuLocationsControl ); -
trunk/src/wp-includes/customize/class-wp-customize-nav-menu-locations-control.php
r41768 r41832 36 36 */ 37 37 public function content_template() { 38 if ( current_theme_supports( 'menus' ) ) :38 if ( current_theme_supports( 'menus' ) ) : 39 39 ?> 40 40 <# var elementId; #> 41 41 <ul class="menu-location-settings"> 42 42 <li class="customize-control assigned-menu-locations-title"> 43 <span class="customize-control-title"><?php _e( 'Menu Locations' ); ?></span> 44 <p><?php _e( 'Here\'s where this menu appears. If you\'d like to change that, pick another location.' ); ?></p> 43 <span class="customize-control-title">{{ wp.customize.Menus.data.l10n.locationsTitle }}</span> 44 <# if ( data.isCreating ) { #> 45 <p> 46 <?php echo _x( 'Where do you want this menu to appear?', 'menu locations' ); ?> 47 <em class="new-menu-locations-widget-note"> 48 <?php 49 printf( 50 /* translators: 1: Codex URL, 2: additional link attributes, 3: accessibility text */ 51 _x( '(If you plan to use a menu <a href="%1$s" %2$s>widget%3$s</a>, skip this step.)', 'menu locations' ), 52 __( 'https://codex.wordpress.org/WordPress_Widgets' ), 53 ' class="external-link" target="_blank"', 54 sprintf( '<span class="screen-reader-text"> %s</span>', 55 /* translators: accessibility text */ 56 __( '(opens in a new window)' ) 57 ) 58 ); 59 ?> 60 </em> 61 </p> 62 <# } else { #> 63 <p><?php echo _x( 'Here’s where this menu appears. If you’d like to change that, pick another location.', 'menu locations' ); ?></p> 64 <# } #> 45 65 </li> 46 66
Note: See TracChangeset
for help on using the changeset viewer.