- Timestamp:
- 10/12/2023 02:28:05 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.3/src/wp-admin/includes/class-wp-comments-list-table.php
r33614 r56852 446 446 $this->user_can = current_user_can( 'edit_comment', $comment->comment_ID ); 447 447 448 $edit_post_cap = $post ? 'edit_post' : 'edit_posts'; 449 if ( 450 current_user_can( $edit_post_cap, $comment->comment_post_ID ) || 451 ( 452 empty( $post->post_password ) && 453 current_user_can( 'read_post', $comment->comment_post_ID ) 454 ) 455 ) { 456 // The user has access to the post 457 } else { 458 return false; 459 } 460 448 461 echo "<tr id='comment-$comment->comment_ID' class='$the_comment_class'>"; 449 462 $this->single_row_columns( $comment );
Note: See TracChangeset
for help on using the changeset viewer.