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
This commit is contained in:
Scott Taylor 2013-09-05 23:36:10 +00:00
parent 8038d7f9e8
commit 54c5a75e68

View File

@ -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