[wp-trac] [WordPress Trac] #17019: context arg for WP_Query filter application
WordPress Trac
wp-trac at lists.automattic.com
Fri Apr 8 16:52:14 UTC 2011
#17019: context arg for WP_Query filter application
-------------------------+------------------------------
Reporter: kevinB | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version:
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+------------------------------
Comment (by kevinB):
Replying to [comment:21 scribu]:
> To put it another way: you're moving the context check from the callback
to the caller - apply_filters().
>
Yes, and doing so also reduces the risk of query destruction by filters
which incorrectly return null. If the offending filter was added for a
specific context, it will only wreck one query and not all of them.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17019#comment:23>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list