Don't allow a page to be its own parent. http://mosquito.wordpress.org/view.php?id=1095
git-svn-id: http://svn.automattic.com/wordpress/trunk@2435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
15073f4f4a
commit
3825b18aff
|
@ -348,6 +348,7 @@ function wp_list_pages($args = '') {
|
|||
// array index we set the curent page as a child of that page.
|
||||
// We can now start looping over the $page_tree array
|
||||
// with any ID which will output the page links from that ID downwards.
|
||||
if ( $page->post_parent != $page->ID)
|
||||
$page_tree[$page->post_parent]['children'][] = $page->ID;
|
||||
}
|
||||
// Output of the pages starting with child_of as the root ID.
|
||||
|
|
Loading…
Reference in New Issue