Add 'got_posts' action to the query
|Reported by:||jfarthing84||Owned by:||ryan|
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!