Ticket #13220: highlight_home_link.3.diff
File highlight_home_link.3.diff, 699 bytes (added by , 14 years ago) |
---|
-
wp-includes/nav-menu-template.php
75 75 if ( 'custom' != $item->object ) 76 76 $classes[] = 'menu-item-object-'. $item->object; 77 77 78 if ( $item->object_id == $wp_query->get_queried_object_id() ) 78 $home_url = esc_url( $_SERVER['HTTP_HOST'] ) . esc_url( $_SERVER['REQUEST_URI'] ); 79 80 if ( $item->object_id == $wp_query->get_queried_object_id() || ( 'custom' == $item->object && $item->url == $home_url ) ) 79 81 $classes[] = 'current-menu-item'; 80 82 81 83 // @todo add classes for parent/child relationships