Ticket #35272: 35272.3.diff
File 35272.3.diff, 1.3 KB (added by , 9 years ago) |
---|
-
src/wp-includes/nav-menu-template.php
334 334 $possible_object_parents = array_filter( $possible_object_parents ); 335 335 336 336 $front_page_url = home_url(); 337 $front_page_id = (int) get_option( 'page_on_front' ); 337 338 338 339 foreach ( (array) $menu_items as $key => $menu_item ) { 339 340 … … 344 345 $classes[] = 'menu-item-type-' . $menu_item->type; 345 346 $classes[] = 'menu-item-object-' . $menu_item->object; 346 347 348 // This menu item is set as the 'Front Page'. 349 if ( $front_page_id === $menu_item->object_id ) { 350 $classes[] = 'menu-item-home'; 351 } 352 347 353 // if the menu item corresponds to a taxonomy term for the currently-queried non-hierarchical post object 348 354 if ( $wp_query->is_singular && 'taxonomy' == $menu_item->type && in_array( $menu_item->object_id, $possible_object_parents ) ) { 349 355 $active_parent_object_ids[] = (int) $menu_item->object_id; … … 377 383 $classes[] = 'current_page_item'; 378 384 } 379 385 380 if ( 'page_on_front' ) {381 $classes[] = 'menu-item-home';382 }383 384 386 $active_parent_item_ids[] = (int) $menu_item->menu_item_parent; 385 387 $active_parent_object_ids[] = (int) $menu_item->post_parent; 386 388 $active_object = $menu_item->object;