Changeset 33976
- Timestamp:
- 09/09/2015 06:21:05 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.8/src/wp-includes/capabilities.php
r33378 r33976 1231 1231 break; 1232 1232 $post = get_post( $comment->comment_post_ID ); 1233 $caps = map_meta_cap( 'edit_post', $user_id, $post->ID ); 1233 1234 /* 1235 * If the post doesn't exist, we have an orphaned comment. 1236 * Fall back to the edit_posts capability, instead. 1237 */ 1238 if ( $post ) { 1239 $caps = map_meta_cap( 'edit_post', $user_id, $post->ID ); 1240 } else { 1241 $caps = map_meta_cap( 'edit_posts', $user_id ); 1242 } 1234 1243 break; 1235 1244 case 'unfiltered_upload':
Note: See TracChangeset
for help on using the changeset viewer.