From 5c88aa5e8e4c9b5a20048fd0f0008edc08a10e9b Mon Sep 17 00:00:00 2001 From: nacin Date: Thu, 9 Dec 2010 12:38:23 +0000 Subject: [PATCH] _get_post_ancestors() in Walker_Page. props layotte, fixes #14329. git-svn-id: http://svn.automattic.com/wordpress/trunk@16834 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post-template.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 4aa48c74eb..c3bfa2bb49 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -1020,6 +1020,7 @@ class Walker_Page extends Walker { $css_class = array('page_item', 'page-item-'.$page->ID); if ( !empty($current_page) ) { $_current_page = get_page( $current_page ); + _get_post_ancestors($_current_page); if ( isset($_current_page->ancestors) && in_array($page->ID, (array) $_current_page->ancestors) ) $css_class[] = 'current_page_ancestor'; if ( $page->ID == $current_page )