[wp-trac] [WordPress Trac] #35060: Allow filtering of comment count
WordPress Trac
noreply at wordpress.org
Thu Jan 14 02:54:01 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 2nd-opinion | Focuses:
--------------------------------------------------+------------------
Comment (by boonebgorges):
Replying to [comment:12 peterwilsoncc]:
> For what it's worth, the basis was the `'pre_option_' . $option` filter
in `get_option()`. I can't think where else something similar happens,
though.
>
`$ ack "apply_filters\([^\,]+, null" src/` suggests a few places:
- `get_option()`
- `get_site_by_path()`
- `get_avatar()`
- `get_metadata()`
- `get_network_by_path()`
The pattern is: if a `pre_` filter allows developers to avoid expensive
queries, then it's justified. I think it's reasonable in this case.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35060#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list