Changeset 33975 for branches/3.9/src/wp-includes/capabilities.php
- Timestamp:
- 09/09/2015 06:13:58 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.9/src/wp-includes/capabilities.php
r33377 r33975 1218 1218 break; 1219 1219 $post = get_post( $comment->comment_post_ID ); 1220 $caps = map_meta_cap( 'edit_post', $user_id, $post->ID ); 1220 1221 /* 1222 * If the post doesn't exist, we have an orphaned comment. 1223 * Fall back to the edit_posts capability, instead. 1224 */ 1225 if ( $post ) { 1226 $caps = map_meta_cap( 'edit_post', $user_id, $post->ID ); 1227 } else { 1228 $caps = map_meta_cap( 'edit_posts', $user_id ); 1229 } 1221 1230 break; 1222 1231 case 'unfiltered_upload':
Note: See TracChangeset
for help on using the changeset viewer.