Make WordPress Core

Changeset 10947


Ignore:
Timestamp:
04/16/2009 05:37:58 PM (15 years ago)
Author:
ryan
Message:

Add page classes to page attachments. Props minusfive. fixes #9472

File:
1 edited

Legend:

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

    r10877 r10947  
    413413        $wp_query->post = $wp_query->posts[0];
    414414        setup_postdata($wp_query->post);
    415        
     415
    416416        $pageID = $wp_query->post->ID;
    417417        $page_children = wp_list_pages("child_of=$pageID&echo=0");
     
    751751
    752752        global $wp_query;
    753         if ( is_page() || $wp_query->is_posts_page )
     753        if ( is_page() || is_attachment() || $wp_query->is_posts_page )
    754754            $current_page = $wp_query->get_queried_object_id();
    755755        $output .= walk_page_tree($pages, $r['depth'], $current_page, $r);
Note: See TracChangeset for help on using the changeset viewer.