Changeset 57746
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/wp/customize/nav-menus.js
r50547 r57746 1665 1665 $reorderNav.find( '.menus-move-up, .menus-move-down, .menus-move-left, .menus-move-right' ).on( 'click', function() { 1666 1666 var moveBtn = $( this ); 1667 control.params.depth = control.getDepth(); 1668 1667 1669 moveBtn.focus(); 1668 1670 … … 1678 1680 } else if ( isMoveLeft ) { 1679 1681 control.moveLeft(); 1682 if ( 1 === control.params.depth ) { 1683 control.container.find( '.is-submenu' ).hide(); 1684 } else { 1685 control.container.find( '.is-submenu' ).show(); 1686 } 1680 1687 } else if ( isMoveRight ) { 1681 1688 control.moveRight(); 1689 control.params.depth += 1; 1690 if ( 0 === control.params.depth ) { 1691 control.container.find( '.is-submenu' ).hide(); 1692 } else { 1693 control.container.find( '.is-submenu' ).show(); 1694 } 1682 1695 } 1683 1696 -
trunk/src/wp-includes/customize/class-wp-customize-nav-menu-item-control.php
r52580 r57746 70 70 <span class="spinner"></span> 71 71 <span class="menu-item-title<# if ( ! data.title && ! data.original_title ) { #> no-title<# } #>">{{ data.title || data.original_title || wp.customize.Menus.data.l10n.untitled }}</span> 72 <# if ( 0 === data.depth ) { #> 73 <span class="is-submenu" style="display: none;"><?php _e( 'sub item' ); ?></span> 74 <# } else { #> 75 <span class="is-submenu"><?php _e( 'sub item' ); ?></span> 76 <# } #> 72 77 </span> 73 78 <span class="item-controls"> … … 75 80 <?php 76 81 /* translators: 1: Title of a menu item, 2: Type of a menu item. */ 77 printf( __( 'Edit menu item: %1$s (%2$s)' ), '{{ data.title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.item_type_label }}' );82 printf( __( 'Edit menu item: %1$s (%2$s)' ), '{{ data.title || data.original_title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.item_type_label }}' ); 78 83 ?> 79 84 </span><span class="toggle-indicator" aria-hidden="true"></span></button> … … 81 86 <?php 82 87 /* translators: 1: Title of a menu item, 2: Type of a menu item. */ 83 printf( __( 'Remove Menu Item: %1$s (%2$s)' ), '{{ data.title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.item_type_label }}' );88 printf( __( 'Remove Menu Item: %1$s (%2$s)' ), '{{ data.title || data.original_title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.item_type_label }}' ); 84 89 ?> 85 90 </span></button>
Note: See TracChangeset
for help on using the changeset viewer.