WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/07/2010 11:35:28 PM (10 years ago)
Author:
scribu
Message:

Introduce 'edit_comment' meta cap. Fixes #14520

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/default-list-tables.php

    r15578 r15596  
    22552255        $post = get_post( $comment->comment_post_ID );
    22562256        $the_comment_status = wp_get_comment_status( $comment->comment_ID );
    2257         $post_type_object = get_post_type_object( $post->post_type );
    2258         $user_can = current_user_can( $post_type_object->cap->edit_post, $post->ID );
     2257        $user_can = current_user_can( 'edit_comment', $comment_id );
    22592258
    22602259        $comment_url = esc_url( get_comment_link( $comment->comment_ID ) );
     
    22762275            $approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "approve-comment_$comment->comment_ID" ) );
    22772276
    2278             $url = "comment.php?post_ID=$post->ID&c=$comment->comment_ID";
     2277            $url = "comment.php?c=$comment->comment_ID";
    22792278
    22802279            $approve_url = esc_url( $url . "&action=approvecomment&$approve_nonce" );
Note: See TracChangeset for help on using the changeset viewer.