- 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-list-table.php
r31513 r56851 610 610 $pending_phrase = sprintf( __( '%s pending' ), number_format( $pending_comments ) ); 611 611 612 $post_object = get_post( $post_id ); 613 $edit_post_cap = $post_object ? 'edit_post' : 'edit_posts'; 614 if ( 615 current_user_can( $edit_post_cap, $post_id ) || 616 ( 617 empty( $post_object->post_password ) && 618 current_user_can( 'read_post', $post_id ) 619 ) 620 ) { 621 // The user has access to the post and thus can see comments 622 } else { 623 return false; 624 } 625 612 626 if ( $pending_comments ) 613 627 echo '<strong>';
Note: See TracChangeset
for help on using the changeset viewer.