[wp-hackers] Filters on get_posts()

John Blackbourn johnbillion+wp at gmail.com
Mon Oct 11 14:27:35 UTC 2010


On Mon, Oct 11, 2010 at 10:45 AM, scribu <mail at scribu.net> wrote:
>
> You can just pass suppress_filters => false to get_posts().

As I stated this can lead to side effects because many plugins add
filters to 'posts_where' etc and use global conditionals (which are
irrelevant to my additional loop) to determine how to filter the
query. An example might be a plugin that filters 'posts_where' and
adds an additional clause when is_home() evaluates to true. I don't
want this clause showing up in my additional loop.


More information about the wp-hackers mailing list