Make WordPress Core

Ticket #14639: 14639.diff

File 14639.diff, 743 bytes (added by ericlewis, 12 years ago)
  • src/wp-includes/post.php

    diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
    index 87ca750..0d3a760 100644
    a b function get_post_status($ID = '') { 
    835835                        return 'publish';
    836836
    837837                // Inherit status from the parent
    838                 if ( $post->post_parent && ( $post->ID != $post->post_parent ) )
    839                         return get_post_status($post->post_parent);
     838                if ( $post->post_parent && ( $post->ID != $post->post_parent ) ) {
     839                        $parent_post_status = get_post_status($post->post_parent);
     840                        if ( 'trash' == $parent_post_status ) {
     841                                return get_post_meta( $post->post_parent, '_wp_trash_meta_status', true );
     842                        } else {
     843                                return $parent_post_status;
     844                        }
     845                }
     846
    840847        }
    841848
    842849        return $post->post_status;