[wp-trac] [WordPress Trac] #32601: Use of suppress_filters inconsistent between get_posts() and WP_Query->get_posts()
WordPress Trac
noreply at wordpress.org
Tue Jun 9 21:00:09 UTC 2015
#32601: Use of suppress_filters inconsistent between get_posts() and
WP_Query->get_posts()
--------------------------+------------------------------
Reporter: brokentone | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by boonebgorges):
https://core.trac.wordpress.org/ticket/7326#comment:22 is the closest I
can find to an explanation for the behavior. I don't really understand the
reasoning.
In any case, it's been like this for many years, and for many years, one
of the mantras of using `get_posts()` has been that it differs from a
`WP_Query` object in that filters are suppressed. Changing this behavior
would likely cause lots of backward compatibility problems. The best we
can do is to improve the documentation to make this aspect of
`get_posts()` clearer.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32601#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list