[wp-trac] [WordPress Trac] #32362: Comments count: wp_count_comments() should not count spam toward totals
WordPress Trac
noreply at wordpress.org
Tue May 12 19:08:56 UTC 2015
#32362: Comments count: wp_count_comments() should not count spam toward totals
------------------------------------------+-----------------------------
Reporter: afercia | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Comments | Version: 4.2
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses:
------------------------------------------+-----------------------------
Changes (by boonebgorges):
* keywords: => needs-patch needs-unit-tests
* milestone: Awaiting Review => Future Release
Comment:
I poked around the plugin repo a little bit to see what people are doing
with `wp_count_comments()`. In many cases, they're not looking at
'total_comments' at all. In many other cases, excluding 'spam' from that
count would probably fix bugs in the plugins. That being said, I don't
think it's worth breaking backward compatibility for such a widely used
function, even if the current functionality is kinda odd.
So I'd lean toward introducing an `'all'` parameter, and then using it as
appropriate in core.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32362#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list