WordPress.org

Make WordPress Core

Ticket #25230: 25230.1.diff

File 25230.1.diff, 418 bytes (added by chrisbliss18, 6 years ago)

Fix for bug that disables hierarchical when parent is -1 (which it is by default)

  • wp-includes/post.php

     
    37063706        if ( !in_array( $post_type, $hierarchical_post_types ) )
    37073707                return $pages;
    37083708
    3709         if ( $parent && ! $child_of )
     3709        if ( $parent > 0 && ! $child_of )
    37103710                $hierarchical = false;
    37113711
    37123712        // Make sure we have a valid post status