Ticket #26365: 26365.diff
File 26365.diff, 1.6 KB (added by , 9 years ago) |
---|
-
wp-includes/capabilities.php
1149 1149 $post = get_post( $post->post_parent ); 1150 1150 } 1151 1151 1152 if ( 'inherit' == $post->post_status && $post->post_parent && $parent_status = get_post_status( $post->post_parent ) ) { 1153 $post->post_status = $parent_status; 1154 } 1155 1152 1156 $post_type = get_post_type_object( $post->post_type ); 1153 1157 1154 1158 if ( ! $post_type->map_meta_cap ) { … … 1195 1199 $post = get_post( $post->post_parent ); 1196 1200 } 1197 1201 1202 if ( 'inherit' == $post->post_status && $post->post_parent && $parent_status = get_post_status( $post->post_parent ) ) { 1203 $post->post_status = $parent_status; 1204 } 1205 1198 1206 $post_type = get_post_type_object( $post->post_type ); 1199 1207 1200 1208 if ( ! $post_type->map_meta_cap ) { … … 1237 1245 $post = get_post( $post->post_parent ); 1238 1246 } 1239 1247 1248 if ( 'inherit' == $post->post_status && $post->post_parent && $parent_status = get_post_status( $post->post_parent ) ) { 1249 $post->post_status = $parent_status; 1250 } 1251 1240 1252 $post_type = get_post_type_object( $post->post_type ); 1241 1253 1242 1254 if ( ! $post_type->map_meta_cap ) { -
wp-includes/post.php
902 902 } 903 903 904 904 } 905 // Inherit status from the parent 906 elseif ( 'inherit' == $post->post_status && $post->post_parent ) { 907 return get_post_status( $post->post_parent ); 908 } 905 909 906 910 return $post->post_status; 907 911 }