WordPress.org

Make WordPress Core

Ticket #9472: 9472.001.diff

File 9472.001.diff, 803 bytes (added by aaroncampbell, 5 years ago)

Patch with file location in it

  • trunk/wp-includes/post-template.php

     
    412412        } elseif ( is_page() ) { 
    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"); 
    418418 
     
    750750                        $output .= '<li class="pagenav">' . $r['title_li'] . '<ul>'; 
    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); 
    756756