Set hierarchical to false when parent is passed to get_pages() and child_of is not.

Fixes #25230.



git-svn-id: https://develop.svn.wordpress.org/trunk@25245 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2013-09-04 20:59:20 +00:00
parent 0b28c0137d
commit 44011782d3

View File

@ -3649,6 +3649,9 @@ function get_pages($args = '') {
if ( !in_array( $post_type, $hierarchical_post_types ) )
return $pages;
if ( $parent > 0 && empty( $child_of ) && ! isset( $args['child_of'] ) )
$hierarchical = false;
// Make sure we have a valid post status
if ( !is_array( $post_status ) )
$post_status = explode( ',', $post_status );