Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#30327 closed enhancement (fixed)

Pass query reference to "the_post" action

Reported by: tlovett1 Owned by: boonebgorges
Priority: normal Milestone: 4.1
Component: Query Version: 4.1
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

An action is fired in WP_Query::setup_postdata "the_post". Right now it is passed a reference to the current post. It would be nice to also pass a reference to the current query so someone can hook onto this action and do things with the post depending on the type of query.

Attachments (1)

the-post-pass-query-ref.diff​ (423 bytes ) - added by tlovett1 12 years ago.
Patch that passes reference to current query to "the_post"

Download all attachments as: .zip

Change History (4)

@tlovett1
12 years ago

Patch that passes reference to current query to "the_post"

#1 @tlovett1
12 years ago

  • Keywords has-patch added

#2 @boonebgorges
12 years ago

  • Milestone Awaiting Review → 4.1
  • Owner set to boonebgorges
  • Status new → accepted

Yessir.

#3 @boonebgorges
12 years ago

  • Resolution → fixed
  • Status accepted → closed

In 30323:

Pass query object to 'the_post' filter.

Props tlovett1.
Fixes #30327.

Note: See TracTickets for help on using tickets.