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/edit-comments.php

    r15578 r15596  
    3535
    3636    foreach ( $comment_ids as $comment_id ) { // Check the permissions on each
    37         $_post_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = %d", $comment_id ) );
    38 
    39         if ( !current_user_can( 'edit_post', $_post_id ) )
     37        if ( !current_user_can( 'edit_comment', $comment_id ) )
    4038            continue;
    4139
Note: See TracChangeset for help on using the changeset viewer.