_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
This commit is contained in:
nacin 2010-12-09 12:38:23 +00:00
parent 8d00b7b63b
commit 5c88aa5e8e
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 )