diff -urN wordpress.original/wp-admin/edit.php.original wordpress/wp-admin/edit.php > selective_comment_viewing_ban.patch
|
old
|
new
|
|
| 173 | 173 | |
| 174 | 174 | if ( 1 == count($posts) ) { |
| 175 | 175 | |
| | 176 | // If the current user cannot moderate comments, don't include unmoderated comments |
| | 177 | $additional_where = ''; |
| | 178 | if ( ! current_user_can('moderate_comments') ) { |
| | 179 | $additional_where = "AND comment_status <> 'unapproved'"; |
| | 180 | } |
| 176 | 181 | $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved != 'spam' ORDER BY comment_date"); |
| 177 | 182 | if ($comments) { |
| 178 | 183 | update_comment_cache($comments); |