From 54c5a75e68e552216da1f1750317116c5db9ba68 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 5 Sep 2013 23:36:10 +0000 Subject: [PATCH] Simplify the check for false-y `child_of` arg. Props SergeyBiryukov. See #25230, [25245]. Built from https://develop.svn.wordpress.org/trunk@25270 git-svn-id: http://core.svn.wordpress.org/trunk@25236 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 9bb1f83980..91ff520382 100644 --- a/wp-includes/post.php +++ b/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