Fix some notices

git-svn-id: http://svn.automattic.com/wordpress/trunk@7503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-03-24 20:30:33 +00:00
parent 47dec4bad6
commit 1276a8283c
2 changed files with 10 additions and 7 deletions

View File

@ -551,13 +551,15 @@ class Walker_Page extends Walker {
extract($args, EXTR_SKIP);
$css_class = 'page_item page-item-'.$page->ID;
$_current_page = get_page( $current_page );
if ( in_array($page->ID, (array) $_current_page->ancestors) )
$css_class .= ' current_page_ancestor';
if ( $page->ID == $current_page )
$css_class .= ' current_page_item';
elseif ( $_current_page && $page->ID == $_current_page->post_parent )
$css_class .= ' current_page_parent';
if ( !empty($current_page) ) {
$_current_page = get_page( $current_page );
if ( in_array($page->ID, (array) $_current_page->ancestors) )
$css_class .= ' current_page_ancestor';
if ( $page->ID == $current_page )
$css_class .= ' current_page_item';
elseif ( $_current_page && $page->ID == $_current_page->post_parent )
$css_class .= ' current_page_parent';
}
$output .= $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page->ID) . '" title="' . attribute_escape(apply_filters('the_title', $page->post_title)) . '">' . apply_filters('the_title', $page->post_title) . '</a>';

View File

@ -819,6 +819,7 @@ class WP_Query {
$join = '';
$search = '';
$groupby = '';
$post_status_join = false;
if ( !isset($q['post_type']) ) {
if ( $this->is_search )