- Timestamp:
- 10/12/2023 02:25:18 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.2/src/wp-admin/includes/class-wp-comments-list-table.php
r32175 r56851 371 371 $this->user_can = current_user_can( 'edit_comment', $comment->comment_ID ); 372 372 373 $edit_post_cap = $post ? 'edit_post' : 'edit_posts'; 374 if ( 375 current_user_can( $edit_post_cap, $comment->comment_post_ID ) || 376 ( 377 empty( $post->post_password ) && 378 current_user_can( 'read_post', $comment->comment_post_ID ) 379 ) 380 ) { 381 // The user has access to the post 382 } else { 383 return false; 384 } 385 373 386 echo "<tr id='comment-$comment->comment_ID' class='$the_comment_class'>"; 374 387 $this->single_row_columns( $comment );
Note: See TracChangeset
for help on using the changeset viewer.