Changeset 28791
- Timestamp:
- 06/20/2014 07:13:39 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r28788 r28791 837 837 838 838 // Inherit status from the parent 839 if ( $post->post_parent && ( $post->ID != $post->post_parent ) ) 840 return get_post_status($post->post_parent); 839 if ( $post->post_parent && ( $post->ID != $post->post_parent ) ) { 840 $parent_post_status = get_post_status( $post->post_parent ); 841 if ( 'trash' == $parent_post_status ) { 842 return get_post_meta( $post->post_parent, '_wp_trash_meta_status', true ); 843 } else { 844 return $parent_post_status; 845 } 846 } 847 841 848 } 842 849 … … 3244 3251 $wpdb->update( $wpdb->posts, array( 'guid' => get_permalink( $post_ID ) ), $where ); 3245 3252 } 3246 3253 3247 3254 if ( 'attachment' === $postarr['post_type'] ) { 3248 3255 if ( ! empty( $postarr['file'] ) ) {
Note: See TracChangeset
for help on using the changeset viewer.