WordPress.org

Make WordPress Core

Ticket #14823: 14823.001.diff

File 14823.001.diff, 747 bytes (added by aaroncampbell, 8 years ago)
  • wp-includes/post.php

     
    20742074
    20752075        $post = get_post($postid, $mode);
    20762076
    2077         if ( 
     2077        if (
    20782078                ( OBJECT == $mode && empty( $post->ID ) ) ||
    20792079                ( OBJECT != $mode && empty( $post['ID'] ) )
    20802080        )
     
    30583058        $number = (int) $number;
    30593059        $offset = (int) $offset;
    30603060
    3061         // Make sure the post type is hierarchical
    3062         $hierarchical_post_types = get_post_types( array( 'hierarchical' => true ) );
    3063         if ( !in_array( $post_type, $hierarchical_post_types ) )
    3064                 return false;
    3065 
    30663061        // Make sure we have a valid post status
    30673062        if ( !in_array($post_status, get_post_stati()) )
    30683063                return false;