From bd610dd68a349d49c222b062967afcedb902c1a5 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 5 Sep 2013 23:35:30 +0000 Subject: [PATCH] Simplify the check for false-y `child_of` arg. Props SergeyBiryukov. See #25230, [25245]. git-svn-id: https://develop.svn.wordpress.org/trunk@25270 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 9bb1f83980..91ff520382 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -3665,7 +3665,7 @@ function get_pages( $args = '' ) { if ( !in_array( $post_type, $hierarchical_post_types ) ) return $pages; - if ( $parent > 0 && empty( $child_of ) && ! isset( $args['child_of'] ) ) + if ( $parent && ! $child_of ) $hierarchical = false; // Make sure we have a valid post status