Ticket #26365: capabilities.diff
File capabilities.diff, 1.3 KB (added by , 11 years ago) |
---|
-
wp-includes/capabilities.php
1077 1077 if ( ! $post_author_id ) 1078 1078 $post_author_id = $user_id; 1079 1079 1080 if ( 'inherit' == $post->post_status && $post->post_parent && $parent_status = get_post_status( $post->post_parent ) ) { 1081 $post->post_status = $parent_status; 1082 } 1083 1080 1084 // If the user is the author... 1081 1085 if ( $user_id == $post_author_id ) { 1082 1086 // If the post is published... … … 1127 1131 if ( ! $post_author_id ) 1128 1132 $post_author_id = $user_id; 1129 1133 1134 if ( 'inherit' == $post->post_status && $post->post_parent && $parent_status = get_post_status( $post->post_parent ) ) { 1135 $post->post_status = $parent_status; 1136 } 1137 1130 1138 // If the user is the author... 1131 1139 if ( $user_id == $post_author_id ) { 1132 1140 // If the post is published... … … 1167 1175 break; 1168 1176 } 1169 1177 1178 if ( 'inherit' == $post->post_status && $post->post_parent && $parent_status = get_post_status( $post->post_parent ) ) { 1179 $post->post_status = $parent_status; 1180 } 1181 1170 1182 $status_obj = get_post_status_object( $post->post_status ); 1171 1183 if ( $status_obj->public ) { 1172 1184 $caps[] = $post_type->cap->read;