WordPress.org

Make WordPress Core

Changeset 4863


Ignore:
Timestamp:
02/02/2007 04:38:26 PM (13 years ago)
Author:
ryan
Message:

Check page ID only if is_page. fixes #3049

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post-template.php

    r4748 r4863  
    274274
    275275    $output = '';
     276    $current_page = 0;
    276277
    277278    // sanitize, mostly to keep spaces out
     
    289290
    290291        global $wp_query;
    291         $current_page = $wp_query->get_queried_object_id();
     292        if ( is_page() )
     293            $current_page = $wp_query->get_queried_object_id();
    292294        $output .= walk_page_tree($pages, $r['depth'], $current_page, $r);
    293295
Note: See TracChangeset for help on using the changeset viewer.