Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#12487 closed enhancement (wontfix)

Add 'got_posts' action to the query

Reported by: jfarthing84's profile jfarthing84 Owned by: ryan's profile ryan
Milestone: Priority: normal
Severity: normal Version:
Component: Query Keywords: dev-feedback has-patch
Focuses: Cc:


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!

Attachments (1)

12487.diff (305 bytes) - added by jfarthing84 14 years ago.

Download all attachments as: .zip

Change History (5)

14 years ago

#1 @jfarthing84
14 years ago

  • Cc jeff@… added

#2 @jfarthing84
14 years ago

  • Keywords has-patch added

#3 @nacin
14 years ago

  • Milestone changed from Unassigned to Future Release

#4 @jfarthing84
14 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

You could actually close this, because I've found the proper hook which is called after the main query, which is simply 'wp'. Duh!

Note: See TracTickets for help on using tickets.