- Timestamp:
- 10/12/2023 02:21:47 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.1/src/wp-admin/includes/class-wp-comments-list-table.php
r32176 r56850 363 363 $this->user_can = current_user_can( 'edit_comment', $comment->comment_ID ); 364 364 365 $edit_post_cap = $post ? 'edit_post' : 'edit_posts'; 366 if ( 367 current_user_can( $edit_post_cap, $comment->comment_post_ID ) || 368 ( 369 empty( $post->post_password ) && 370 current_user_can( 'read_post', $comment->comment_post_ID ) 371 ) 372 ) { 373 // The user has access to the post 374 } else { 375 return false; 376 } 377 365 378 echo "<tr id='comment-$comment->comment_ID' class='$the_comment_class'>"; 366 379 $this->single_row_columns( $comment );
Note: See TracChangeset
for help on using the changeset viewer.