Make WordPress Core

Changeset 7503


Ignore:
Timestamp:
03/24/2008 08:30:33 PM (18 years ago)
Author:
ryan
Message:

Fix some notices

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/classes.php

    r7491 r7503  
    552552        extract($args, EXTR_SKIP);
    553553        $css_class = 'page_item page-item-'.$page->ID;
    554         $_current_page = get_page( $current_page );
    555         if ( in_array($page->ID, (array) $_current_page->ancestors) )
    556             $css_class .= ' current_page_ancestor';
    557         if ( $page->ID == $current_page )
    558             $css_class .= ' current_page_item';
    559         elseif ( $_current_page && $page->ID == $_current_page->post_parent )
    560             $css_class .= ' current_page_parent';
     554        if ( !empty($current_page) ) {
     555            $_current_page = get_page( $current_page );
     556            if ( in_array($page->ID, (array) $_current_page->ancestors) )
     557                $css_class .= ' current_page_ancestor';
     558            if ( $page->ID == $current_page )
     559                $css_class .= ' current_page_item';
     560            elseif ( $_current_page && $page->ID == $_current_page->post_parent )
     561                $css_class .= ' current_page_parent';
     562        }
    561563
    562564        $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>';
  • trunk/wp-includes/query.php

    r7491 r7503  
    820820        $search = '';
    821821        $groupby = '';
     822        $post_status_join = false;
    822823
    823824        if ( !isset($q['post_type']) ) {
Note: See TracChangeset for help on using the changeset viewer.