Ticket #17077: 17077.patch
File 17077.patch, 1.2 KB (added by , 11 years ago) |
---|
-
wp-includes/nav-menu-template.php
456 456 $classes[] = empty( $queried_object->taxonomy ) ? 'current-' . $queried_object->post_type . '-ancestor' : 'current-' . $queried_object->taxonomy . '-ancestor'; 457 457 } 458 458 459 if ( $queried_object->post_parent == $parent_item->object_id ) { 460 $classes[] = 'current-' . $queried_object->post_type . '-parent'; 461 } 459 462 if ( in_array( intval( $parent_item->db_id ), $active_ancestor_item_ids ) ) { 460 463 $classes[] = 'current-menu-ancestor'; 461 464 $menu_items[$key]->current_item_ancestor = true; … … 469 472 470 473 if ( 'post_type' == $parent_item->type && 'page' == $parent_item->object ) { 471 474 // Back compat classes for pages to match wp_page_menu() 472 if ( in_array('current- menu-parent', $classes) )475 if ( in_array('current-page-parent', $classes) ) 473 476 $classes[] = 'current_page_parent'; 474 if ( in_array('current- menu-ancestor', $classes) )477 if ( in_array('current-page-ancestor', $classes) ) 475 478 $classes[] = 'current_page_ancestor'; 476 479 } 477 480