Get the right number of pages then excluding a tree, fixes #11205

git-svn-id: https://develop.svn.wordpress.org/trunk@12279 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2009-11-26 05:22:09 +00:00
parent f066b7dc39
commit b3b788503e
1 changed files with 1 additions and 0 deletions

View File

@ -2599,6 +2599,7 @@ function &get_pages($args = '') {
foreach ( $children as $child )
$excludes[] = $child->ID;
$excludes[] = $exclude;
$num_pages = count($pages);
for ( $i = 0; $i < $num_pages; $i++ ) {
if ( in_array($pages[$i]->ID, $excludes) )
unset($pages[$i]);