diff --git wp-admin/includes/nav-menu.php wp-admin/includes/nav-menu.php
index be068c2..22bf22e 100755
|
|
function wp_nav_menu_update_menu_items( $nav_menu_selected_id, $nav_menu_selecte |
1169 | 1169 | if ( ! empty( $_POST['menu-item-db-id'] ) ) { |
1170 | 1170 | foreach ( (array) $_POST['menu-item-db-id'] as $_key => $k ) { |
1171 | 1171 | |
1172 | | // Menu item title can't be blank. |
1173 | | if ( ! isset( $_POST['menu-item-title'][ $_key ] ) || '' == $_POST['menu-item-title'][ $_key ] ) { |
1174 | | continue; |
1175 | | } |
1176 | | |
1177 | 1172 | $args = array(); |
1178 | 1173 | foreach ( $post_fields as $field ) { |
1179 | 1174 | $args[ $field ] = isset( $_POST[ $field ][ $_key ] ) ? $_POST[ $field ][ $_key ] : ''; |
diff --git wp-includes/nav-menu.php wp-includes/nav-menu.php
index 12d5c31..ecd2301 100755
|
|
function wp_update_nav_menu_item( $menu_id = 0, $menu_item_db_id = 0, $menu_item |
490 | 490 | $original_title = $original_object->labels->archives; |
491 | 491 | } |
492 | 492 | } |
493 | | |
494 | | if ( $args['menu-item-title'] == $original_title ) { |
495 | | $args['menu-item-title'] = ''; |
496 | | } |
497 | | |
| 493 | |
498 | 494 | // Hack to get wp to create a post object when too many properties are empty. |
499 | 495 | if ( '' == $args['menu-item-title'] && '' == $args['menu-item-description'] ) { |
500 | 496 | $args['menu-item-description'] = ' '; |
… |
… |
function wp_setup_nav_menu_item( $menu_item ) { |
838 | 834 | |
839 | 835 | if ( $original_object ) { |
840 | 836 | $menu_item->url = get_permalink( $original_object->ID ); |
841 | | /** This filter is documented in wp-includes/post-template.php */ |
842 | | $original_title = apply_filters( 'the_title', $original_object->post_title, $original_object->ID ); |
843 | 837 | } else { |
844 | 838 | $menu_item->url = ''; |
845 | | $original_title = ''; |
846 | 839 | $menu_item->_invalid = true; |
847 | 840 | } |
848 | 841 | |
849 | | if ( '' === $original_title ) { |
850 | | /* translators: %d: ID of a post. */ |
851 | | $original_title = sprintf( __( '#%d (no title)' ), $menu_item->object_id ); |
852 | | } |
853 | | |
854 | | $menu_item->title = ( '' === $menu_item->post_title ) ? $original_title : $menu_item->post_title; |
855 | | |
| 842 | $menu_item->title = $menu_item->post_title; |
| 843 | |
856 | 844 | } elseif ( 'post_type_archive' == $menu_item->type ) { |
857 | 845 | $object = get_post_type_object( $menu_item->object ); |
858 | 846 | if ( $object ) { |