[wp-trac] [WordPress Trac] #35060: Allow filtering of comment count
WordPress Trac
noreply at wordpress.org
Sat Jan 2 02:55:28 UTC 2016
#35060: Allow filtering of comment count
--------------------------------------+------------------
Reporter: peterwilsoncc | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 4.5
Component: Comments | Version: 2.5
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------
Comment (by peterwilsoncc):
Replying to [comment:7 rachelbaker]:
> @swissspidy Curious why you are using `null` as the default value of the
`wp_update_comment_count_now` filter? Is there any reason we should not
just pass in the `$new` comment count?
That was my suggestion, the intention is to avoid the extra database
lookup if the filter returns a valid value. The query is uncached and
`comment_approved` is not indexed.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35060#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list