Opened 6 years ago
Closed 6 years ago
#46014 closed defect (bug) (fixed)
The 'Mine' filter on single-post comments should be filtered using $post_id
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.1 | Priority: | normal |
Severity: | major | Version: | 5.1 |
Component: | Comments | Keywords: | has-patch |
Focuses: | administration | Cc: |
Description
As @matt flagged here - https://wordpress.slack.com/archives/C02RQBWTW/p1547663425204000
The comment count beside the 'Mine' filter is incorrect when on the single-post view (i.e. edit-comments.php?p=####&comment_status=approved) as it doens't account for the $post_id from the view.
This was introduced to trunk in ticket #42379
If $post_id
is set in the get_views
function then it should be used to create the mine count when calling get_comments
here;
https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/class-wp-comments-list-table.php?rev=42684#L280
This can be fixed by passing $post_id
as an arg to the get_comments
call.
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Created patch to pass
$post_id
as an arg to theget_comments
call.