WordPress.org

Make WordPress Core

Ticket #16705: 16705-edit_comment_3.3.patch

File 16705-edit_comment_3.3.patch, 543 bytes (added by kevinB, 4 years ago)

map_meta_cap(): for 'edit_comment', append 'moderate_comments' to 'edit_post' caps

  • capabilities.php

     
    10921092                $post_type_object = get_post_type_object( $post->post_type ); 
    10931093 
    10941094                $caps = map_meta_cap( $post_type_object->cap->edit_post, $user_id, $post->ID ); 
     1095                $caps []= 'moderate_comments'; 
    10951096                break; 
    10961097        case 'unfiltered_upload': 
    10971098                if ( defined('ALLOW_UNFILTERED_UPLOADS') && ALLOW_UNFILTERED_UPLOADS && ( !is_multisite() || is_super_admin( $user_id ) )  )