From 3fc76e352b8ea57995cfa83cc61c8cabb37fc58d Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Thu, 17 Jan 2019 02:45:49 +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. Built from https://develop.svn.wordpress.org/trunk@44631 git-svn-id: http://core.svn.wordpress.org/trunk@44462 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-comments-list-table.php | 1 + wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/class-wp-comments-list-table.php b/wp-admin/includes/class-wp-comments-list-table.php index 048e8c32c4..5787a8e91d 100644 --- a/wp-admin/includes/class-wp-comments-list-table.php +++ b/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, ) diff --git a/wp-includes/version.php b/wp-includes/version.php index 3b05450e7a..b22dc32779 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.