[wp-trac] Re: [WordPress Trac] #6772: get_posts Should Use WP_Query
WordPress Trac
wp-trac at lists.automattic.com
Fri Apr 18 20:27:56 GMT 2008
#6772: get_posts Should Use WP_Query
-----------------------------------------------+----------------------------
Reporter: filosofo | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.6
Component: General | Version: 2.6
Severity: normal | Resolution:
Keywords: wp_query get_posts wpdb has-patch |
-----------------------------------------------+----------------------------
Comment (by filosofo):
In my view, filter-less queries should be opt-in, not default. Suppose
plugin A is using get_posts naively, and plugin B is trying to filter
posts, say to restrict certain ones from public view. Plugin A is going to
be returning the posts Plugin B doesn't want it to, and there's nothing B
can do about it except, perhaps, a regex hack on the db query.
Instead, if something really needs unfiltered posts, it should remove the
filters prior to calling get_posts.
--
Ticket URL: <http://trac.wordpress.org/ticket/6772#comment:2>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list