WordPress.org

Make WordPress Core

Ticket #25230: 25230.diff

File 25230.diff, 474 bytes (added by SergeyBiryukov, 6 years ago)
  • src/wp-includes/post.php

     
    36653665        if ( !in_array( $post_type, $hierarchical_post_types ) )
    36663666                return $pages;
    36673667
    3668         if ( $parent > 0 && empty( $child_of ) && ! isset( $args['child_of'] ) )
     3668        if ( $parent && ! $child_of )
    36693669                $hierarchical = false;
    36703670
    36713671        // Make sure we have a valid post status