WordPress.org

Make WordPress Core

Ticket #16129: 16129.patch

File 16129.patch, 541 bytes (added by casben79, 9 years ago)

Patch File

  • comment.php

     
    3434function edit_comment() {
    3535        $comment_post_ID = (int) $_POST['comment_post_ID'];
    3636
    37         if (!current_user_can( 'edit_post', $comment_post_ID ))
     37        if (!current_user_can( 'edit_comment', $comment_post_ID ))
    3838                wp_die( __('You are not allowed to edit comments on this post, so you cannot edit this comment.' ) );
    3939
    4040        $_POST['comment_author'] = $_POST['newcomment_author'];