mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Avoid resetting the 'hierarchical' argument in get_pages() when 'parent' is -1, the default.
Fixes a regression introduced in [25270]. Adds unit tests. props chrisbliss18. fixes #25750. git-svn-id: https://develop.svn.wordpress.org/trunk@25974 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3706,7 +3706,7 @@ function get_pages( $args = array() ) {
|
||||
if ( !in_array( $post_type, $hierarchical_post_types ) )
|
||||
return $pages;
|
||||
|
||||
if ( $parent && ! $child_of )
|
||||
if ( $parent > 0 && ! $child_of )
|
||||
$hierarchical = false;
|
||||
|
||||
// Make sure we have a valid post status
|
||||
|
||||
Reference in New Issue
Block a user