Opened 13 years ago
Closed 12 years ago
#21276 closed defect (bug) (wontfix)
Respect 'suppress_filters' arg in WP_Query->get_posts()
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.4.1 |
Component: | Query | Keywords: | has-patch |
Focuses: | Cc: |
Description
Before trying to run filters, there's a check to see if we should suppress filters using the suppress_filters arg. Four filters run whether or not suppress_filters is set to true. This patch just adds checks against that arg for those filter calls.
Attachments (2)
Change History (11)
#3
follow-up:
↓ 4
@
13 years ago
After scanning through core, 'the_preview' filter is used when previewing a post. I've removed the suppress filters check for that filter.
That doesn't sound like a good reason; if Core needs 'the_preview' filter, it shouldn't pass 'suppress_filters' => true, no?
#4
in reply to:
↑ 3
@
13 years ago
Replying to scribu:
That doesn't sound like a good reason; if Core needs 'the_preview' filter, it shouldn't pass 'suppress_filters' => true, no?
That's why I took that suppress filters check out on that filter. If core needs it, we can't suppress it.
#5
@
13 years ago
- Milestone changed from 3.5 to Future Release
From ryan: "Some things in there like split query should run regardless of suppress."
It isn't a huge problem if we don't respect suppress for filters introduced after get_posts() was rewritten to wrap WP_Query in 2.7, as we at least did not change behavior.
Punting for further study.
After scanning through core, 'the_preview' filter is used when previewing a post. I've removed the suppress filters check for that filter.