[wp-trac] [WordPress Trac] #50538: WP_Comments_List_Table should not show views that have a count of 0
WordPress Trac
noreply at wordpress.org
Fri Jul 3 23:40:33 UTC 2020
#50538: WP_Comments_List_Table should not show views that have a count of 0
-----------------------------------------+------------------------------
Reporter: pbiron | Owner: pbiron
Type: enhancement | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version:
Severity: normal | Resolution:
Keywords: needs-patch has-screenshots | Focuses: administration
-----------------------------------------+------------------------------
Comment (by pbiron):
@SergeyBiryukov Can you use your trac searching super powers to try to
find out the history of [https://core.trac.wordpress.org/browser/trunk/src
/wp-admin/includes/class-wp-comments-list-table.php#L305 class-wp-
comments-list-table.php, L305]?
It looks like it's been there for 10+ years...but is **very** wrong! If
I'm reading it correctly, if `wp_count_comments()` doesn't return a count
for some specific status (e.g., because it's been filtered by
`wp_count_comments`), then the count for that status is arbitrarily set to
10...shouldn't it be set to 0 in that case?
that line makes it possible that status views that should be hidden (with
the patch I'm working on) won't be...for reasons that are incorrect.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50538#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list