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