mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Cast to array
git-svn-id: http://svn.automattic.com/wordpress/trunk@7081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b2838e11c7
commit
c313442072
@ -551,7 +551,7 @@ class Walker_Page extends Walker {
|
||||
extract($args, EXTR_SKIP);
|
||||
$css_class = 'page_item page-item-'.$page->ID;
|
||||
$_current_page = get_page( $current_page );
|
||||
if ( in_array($page->ID, $_current_page->ancestors) )
|
||||
if ( in_array($page->ID, (array) $_current_page->ancestors) )
|
||||
$css_class .= ' current_page_ancestor';
|
||||
if ( $page->ID == $current_page )
|
||||
$css_class .= ' current_page_item';
|
||||
|
Loading…
Reference in New Issue
Block a user