From f384fe3e8139e4ad123fe0def454821436927e01 Mon Sep 17 00:00:00 2001 From: Andrew 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: https://develop.svn.wordpress.org/trunk@16834 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 )