[wp-trac] [WordPress Trac] #12487: Add 'got_posts' action to the query
WordPress Trac
wp-trac at lists.automattic.com
Tue Mar 2 21:53:10 UTC 2010
#12487: Add 'got_posts' action to the query
-------------------------+--------------------------------------------------
Reporter: jfarthing84 | Owner: ryan
Type: enhancement | Status: new
Priority: normal | Milestone: Unassigned
Component: Query | Version:
Severity: normal | Keywords: dev-feedback
-------------------------+--------------------------------------------------
I know this may be unusual, but I am working on a plugin that utilizes
separate tables for it's own post types. The cool thing is that I am
achieving this using ALL of the WP functions just by switching out the
global variables to my own independent objects.
The only problem I've run across is with WP_Query::get_posts function. The
final filter here is 'the_posts' which is called BEFORE the cache is
updated. My situation also takes over the cache because if not, cached
post numbers would collide from separate tables.
So, some kind of simple action at the end of WP_Query::get_posts before
the posts are returned would be AWESOME! Then I can tell my plugin to
switch back to the default WP objects at that point!
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12487>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list