Ticket #8298: 8298-2.diff
File 8298-2.diff, 1020 bytes (added by , 15 years ago) |
---|
-
wp-includes/post-template.php
827 827 if ( is_front_page() && !is_paged() ) 828 828 $class = 'class="current_page_item"'; 829 829 $menu .= '<li ' . $class . '><a href="' . home_url() . '" title="' . esc_attr($text) . '">' . $args['link_before'] . $text . $args['link_after'] . '</a></li>'; 830 831 // Because include overrides subpages, we need to reverse engineer the include as exclude 832 if( !is_array( $args['included'] ) ) 833 $included = (array) $included; 834 $pages = get_pages(); 835 $exclude = array(); 836 foreach( $pages as $page ) 837 { 838 if( !in_array( $page->ID, $included ) ) 839 $exclude[] = $page->ID; 840 } 841 $list_args['exclude'] = implode( ',', $exclude ); 842 830 843 // If the front page is a page, add it to the exclude list 831 844 if (get_option('show_on_front') == 'page') { 832 845 if ( !empty( $list_args['exclude'] ) ) {