- Timestamp:
- 10/12/2023 03:14:45 PM (14 months ago)
- Location:
- branches/5.8
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.8
- Property svn:mergeinfo changed
/trunk merged: 56833-56838
- Property svn:mergeinfo changed
-
branches/5.8/src/wp-admin/includes/class-wp-comments-list-table.php
r50805 r56884 640 640 641 641 $this->user_can = current_user_can( 'edit_comment', $comment->comment_ID ); 642 643 $edit_post_cap = $post ? 'edit_post' : 'edit_posts'; 644 if ( 645 current_user_can( $edit_post_cap, $comment->comment_post_ID ) || 646 ( 647 empty( $post->post_password ) && 648 current_user_can( 'read_post', $comment->comment_post_ID ) 649 ) 650 ) { 651 // The user has access to the post 652 } else { 653 return false; 654 } 642 655 643 656 echo "<tr id='comment-$comment->comment_ID' class='$the_comment_class'>";
Note: See TracChangeset
for help on using the changeset viewer.