_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
This commit is contained in:
Andrew Nacin 2010-12-09 12:38:23 +00:00
parent f11e53166e
commit f384fe3e81
1 changed files with 1 additions and 0 deletions

View File

@ -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 )