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.


Built from https://develop.svn.wordpress.org/trunk@44631


git-svn-id: http://core.svn.wordpress.org/trunk@44462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2019-01-17 02:45:49 +00:00
parent b158c806d1
commit 3fc76e352b
2 changed files with 2 additions and 1 deletions

View File

@ -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,
)

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.1-beta1-44630';
$wp_version = '5.1-beta1-44631';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.