[wp-trac] [WordPress Trac] #9472: wp_list_pages() doesn't apply the "current_page_item/parent/ancestor" classes when browsing image/attachment pages

WordPress Trac wp-trac at lists.automattic.com
Mon Apr 6 18:29:15 GMT 2009


#9472: wp_list_pages() doesn't apply the "current_page_item/parent/ancestor"
classes when browsing image/attachment pages
--------------------------+-------------------------------------------------
 Reporter:  minusfive     |       Owner:                                                                                             
     Type:  defect (bug)  |      Status:  new                                                                                        
 Priority:  high          |   Milestone:  2.8                                                                                        
Component:  Themes        |     Version:  2.7.1                                                                                      
 Severity:  normal        |    Keywords:  wp_list_pages, is_attachment, current_page_item, current_page_parent, current_page_ancestor
--------------------------+-------------------------------------------------
 When you're browsing an "attachment" page which has been attached to a
 "Page", that Page and its ancestors don't get the
 "current_page_item/parent/ancestor" classes they should get when called
 using wp_list_pages() for navigation.

 I simply added the "is_attachment()" conditional tag to the function and
 it works now. I'm attaching the wp-includes/post-template.php file with
 the modification applied.

 Hope this was the right solution ;)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9472>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list