Ticket #24146: 24146.3.diff
File 24146.3.diff, 2.0 KB (added by , 8 years ago) |
---|
-
src/wp-admin/includes/nav-menu.php
1031 1031 if ( ! empty( $_POST['menu-item-db-id'] ) ) { 1032 1032 foreach ( (array) $_POST['menu-item-db-id'] as $_key => $k ) { 1033 1033 1034 // Menu item title can't be blank1035 if ( ! isset( $_POST['menu-item-title'][ $_key ] ) || '' == $_POST['menu-item-title'][ $_key ] )1034 // Menu item title should be set but can be empty 1035 if ( ! isset( $_POST['menu-item-title'][ $_key ] ) ) { 1036 1036 continue; 1037 } 1037 1038 1038 1039 $args = array(); 1039 1040 foreach ( $post_fields as $field ) -
src/wp-includes/nav-menu-template.php
345 345 $classes[] = 'menu-item-type-' . $menu_item->type; 346 346 $classes[] = 'menu-item-object-' . $menu_item->object; 347 347 348 // This menu item has no label 349 if ( '(no label)' == $menu_item->post_title ) { 350 $classes[] = 'no-title'; 351 } 352 348 353 // This menu item is set as the 'Front Page'. 349 354 if ( 'post_type' === $menu_item->type && $front_page_id === (int) $menu_item->object_id ) { 350 355 $classes[] = 'menu-item-home'; -
src/wp-includes/nav-menu.php
434 434 } 435 435 } 436 436 437 if ( $args['menu-item-title'] == $original_title ) 438 $args['menu-item-title'] = ''; 437 // Sets default label if no label is set 438 if ( $args['menu-item-title'] == '' ) { 439 $args['menu-item-title'] = _x( '(no label)', 'missing menu item navigation label' ); 440 } 439 441 440 442 // hack to get wp to create a post object when too many properties are empty 441 443 if ( '' == $args['menu-item-title'] && '' == $args['menu-item-description'] )