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
This commit is contained in:
parent
a73d205ab8
commit
bd610dd68a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user