_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:
parent
f11e53166e
commit
f384fe3e81
@ -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 )
|
||||
|
Loading…
x
Reference in New Issue
Block a user