diff --git a/wp-includes/custom-navigation.php b/wp-includes/custom-navigation.php index 354d95fd95..8e478774e4 100644 --- a/wp-includes/custom-navigation.php +++ b/wp-includes/custom-navigation.php @@ -116,9 +116,10 @@ function wp_custom_navigation_output($args = array()) { $queried_id = $wp_query->get_queried_object_id(); $parent_stack = array(); + $current_parent = 0; $parent_menu_order = array(); // Display Loop - foreach ( $menu_items as $menu_item ) { + foreach ( $menu_items as $key => $menu_item ) { $menu_type = get_post_meta($menu_item->ID, 'menu_type', true); $object_id = get_post_meta($menu_item->ID, 'object_id', true); $parent_menu_order[ $menu_item->ID ] = $menu_item->menu_order; @@ -199,31 +200,6 @@ function wp_custom_navigation_output($args = array()) { } } */ - // Indent children - if ( empty( $parent_stack ) ) { - array_unshift( $parent_stack, $menu_item->ID ); - } elseif ( $menu_item->post_parent > 0 ) { - if ( $menu_item->post_parent == $parent_stack[0] ) { ?> -