Ticket #15529: 15529.patch
File 15529.patch, 2.2 KB (added by , 13 years ago) |
---|
-
wp-includes/nav-menu-template.php
322 322 $classes[] = 'menu-item-type-' . $menu_item->type; 323 323 $classes[] = 'menu-item-object-' . $menu_item->object; 324 324 325 if ( empty( $key ) ) 326 $classes[] = 'first-menu-item'; 327 325 328 // if the menu item corresponds to a taxonomy term for the currently-queried non-hierarchical post object 326 329 if ( $wp_query->is_singular && 'taxonomy' == $menu_item->type && in_array( $menu_item->object_id, $possible_object_parents ) ) { 327 330 $active_parent_object_ids[] = (int) $menu_item->object_id; -
wp-includes/post-template.php
885 885 $text = __('Home'); 886 886 else 887 887 $text = $args['show_home']; 888 $class = ' ';888 $class = 'first-menu-item'; 889 889 if ( is_front_page() && !is_paged() ) 890 $class = 'class="current_page_item"';891 $menu .= '<li ' . $class . '><a href="' . home_url( '/' ) . '" title="' . esc_attr($text) . '">' . $args['link_before'] . $text . $args['link_after'] . '</a></li>';890 $class .= ' current_page_item'; 891 $menu .= '<li class="' . $class . '"><a href="' . home_url( '/' ) . '" title="' . esc_attr($text) . '">' . $args['link_before'] . $text . $args['link_after'] . '</a></li>'; 892 892 // If the front page is a page, add it to the exclude list 893 893 if (get_option('show_on_front') == 'page') { 894 894 if ( !empty( $list_args['exclude'] ) ) { … … 1030 1030 $css_class[] = 'current_page_parent'; 1031 1031 } 1032 1032 1033 if ( !$show_home && empty( $output ) ) 1034 $css_class[] = 'first-page-item'; 1035 1033 1036 $css_class = implode(' ', apply_filters('page_css_class', $css_class, $page)); 1034 1037 1035 1038 $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_permalink($page->ID) . '" title="' . esc_attr( wp_strip_all_tags( apply_filters( 'the_title', $page->post_title, $page->ID ) ) ) . '">' . $link_before . apply_filters( 'the_title', $page->post_title, $page->ID ) . $link_after . '</a>';