From a3fe5b75e1a7c9243e7fa2d7632d70750741725d Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Thu, 17 Jan 2019 02:44:32 +0000 Subject: [PATCH] Comments: Correct the "Mine" comment count when viewing comments for a particular post. The count should only be comments made on that post by the current user, not all comments by them. Props chetan200891, garrett-eclipse. Fixes #46014. git-svn-id: https://develop.svn.wordpress.org/trunk@44631 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-comments-list-table.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wp-admin/includes/class-wp-comments-list-table.php b/src/wp-admin/includes/class-wp-comments-list-table.php index 048e8c32c4..5787a8e91d 100644 --- a/src/wp-admin/includes/class-wp-comments-list-table.php +++ b/src/wp-admin/includes/class-wp-comments-list-table.php @@ -280,6 +280,7 @@ class WP_Comments_List_Table extends WP_List_Table { $current_user_id = get_current_user_id(); $num_comments->mine = get_comments( array( + 'post_id' => $post_id ? $post_id : 0, 'user_id' => $current_user_id, 'count' => true, )