- Timestamp:
- 10/12/2023 01:22:17 PM (2 years ago)
- Location:
- branches/6.3
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-admin/includes/class-wp-comments-list-table.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/6.3
-
branches/6.3/src/wp-admin/includes/class-wp-comments-list-table.php
r56004 r56843 651 651 652 652 $this->user_can = current_user_can( 'edit_comment', $comment->comment_ID ); 653 654 $edit_post_cap = $post ? 'edit_post' : 'edit_posts'; 655 if ( 656 current_user_can( $edit_post_cap, $comment->comment_post_ID ) || 657 ( 658 empty( $post->post_password ) && 659 current_user_can( 'read_post', $comment->comment_post_ID ) 660 ) 661 ) { 662 // The user has access to the post 663 } else { 664 return false; 665 } 653 666 654 667 echo "<tr id='comment-$comment->comment_ID' class='$the_comment_class'>";
Note: See TracChangeset
for help on using the changeset viewer.