Changeset 15596 for trunk/wp-includes/capabilities.php
- Timestamp:
- 09/07/2010 11:35:28 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/capabilities.php
r15566 r15596 897 897 //echo "post ID: {$args[0]}<br />"; 898 898 $post = get_post( $args[0] ); 899 899 900 $post_type = get_post_type_object( $post->post_type ); 900 901 if ( $post_type && 'post' != $post_type->capability_type ) { … … 989 990 $caps[] = 'read_private_pages'; 990 991 break; 992 case 'edit_comment': 993 $comment = get_comment( $args[0] ); 994 $post = get_post( $comment->comment_post_ID ); 995 $post_type_object = get_post_type_object( $post->post_type ); 996 997 $caps = map_meta_cap( $post_type_object->cap->edit_post, $user_id, $post->ID ); 998 break; 991 999 case 'unfiltered_upload': 992 1000 if ( defined('ALLOW_UNFILTERED_UPLOADS') && ALLOW_UNFILTERED_UPLOADS && ( !is_multisite() || is_super_admin( $user_id ) ) )
Note: See TracChangeset
for help on using the changeset viewer.