Ticket #24146: 24146.2.diff
File 24146.2.diff, 1.9 KB (added by , 10 years ago) |
---|
-
src/wp-admin/includes/nav-menu.php
78 78 ); 79 79 80 80 $title = $item->title; 81 $title_class = ''; 81 82 83 /* translators: menu item has no label */ 84 if ( empty( $title ) ) { 85 $title = _x( '(no label)', 'missing menu item navigation label' ); 86 $title_class = 'no-title'; 87 } 88 82 89 if ( ! empty( $item->_invalid ) ) { 83 90 $classes[] = 'menu-item-invalid'; 84 91 /* translators: %s: title of menu item which is invalid */ … … 92 99 $title = ( ! isset( $item->label ) || '' == $item->label ) ? $title : $item->label; 93 100 94 101 $submenu_text = ''; 95 if ( 0 == $depth ) 102 if ( 0 == $depth ) { 96 103 $submenu_text = 'style="display: none;"'; 104 } 97 105 98 106 ?> 99 107 <li id="menu-item-<?php echo $item_id; ?>" class="<?php echo implode(' ', $classes ); ?>"> 100 108 <dl class="menu-item-bar"> 101 109 <dt class="menu-item-handle"> 102 <span class="item-title"><span class="menu-item-title "><?php echo esc_html( $title ); ?></span> <span class="is-submenu" <?php echo $submenu_text; ?>><?php _e( 'sub item' ); ?></span></span>110 <span class="item-title"><span class="menu-item-title <?php echo $title_class; ?>"><?php echo esc_html( $title ); ?></span> <span class="is-submenu" <?php echo $submenu_text; ?>><?php _e( 'sub item' ); ?></span></span> 103 111 <span class="item-controls"> 104 112 <span class="item-type"><?php echo esc_html( $item->type_label ); ?></span> 105 113 <span class="item-order hide-if-js"> … … 1271 1279 foreach( (array) $_POST['menu-item-db-id'] as $_key => $k ) { 1272 1280 1273 1281 // Menu item title can't be blank 1274 if ( ! isset( $_POST['menu-item-title'][ $_key ] ) || '' == $_POST['menu-item-title'][ $_key ])1282 if ( ! isset( $_POST['menu-item-title'][ $_key ] ) ) 1275 1283 continue; 1276 1284 1277 1285 $args = array();