Ticket #8298: 8298.diff
File 8298.diff, 921 bytes (added by , 16 years ago) |
---|
-
wp-includes/post-template.php
659 659 $class = 'class="current_page_item"'; 660 660 $menu .= '<li ' . $class . '><a href="' . get_option('home') . '">' . $link_before . $text . $link_after . '</a></li>'; 661 661 } 662 663 // Because include overrides subpages, we need to reverse engineer the include as exclude 664 if( !is_array( $args['included'] ) ) 665 $included = (array) $included; 666 $pages = get_pages(); 667 $exclude = array(); 668 foreach( $pages as $page ) 669 { 670 if( !in_array( $page->ID, $included ) ) 671 $exclude[] = $page->ID; 672 } 662 673 663 674 $list_args = $args; 675 $list_args['exclude'] = $exclude; 664 676 $list_args['echo'] = false; 665 677 $list_args['title_li'] = ''; 666 678 $menu .= str_replace( array( "\r", "\n", "\t" ), '', wp_list_pages($list_args) );