Make WordPress Core

Ticket #26365: post.diff

File post.diff, 511 bytes (added by methnen, 11 years ago)

get_post_status_fix

  • wp-includes/post.php

     
    812812                if ( $post->post_parent && ( $post->ID != $post->post_parent ) )
    813813                        return get_post_status($post->post_parent);
    814814        }
     815        // Inherit status from the parent
     816        elseif ( 'inherit' == $post->post_status && $post->post_parent ) {
     817                return get_post_status( $post->post_parent );
     818        }
    815819
    816820        return $post->post_status;
    817821}