Make WordPress Core

Opened 19 years ago

Closed 19 years ago

#2256 closed defect (bug) (fixed)

In place editing of query_vars in WP_Query->get_posts()

Reported by: m4ttias's profile m4ttias Owned by: ryan's profile ryan
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.0
Component: Administration Keywords: bg|has-patch
Focuses: Cc:

Description

This is a simple two-liner for making WP_Query->get_posts() edit query_vars in place. It simply makes $q a reference instead of a temporary.

With this patch filters called within get_posts() get more information available to them, making them more powerful.

I can't see why this shouldn't be done.

Attachments (1)

get_posts.diff (480 bytes) - added by m4ttias 19 years ago.

Download all attachments as: .zip

Change History (4)

@m4ttias
19 years ago

#1 @davidhouse
19 years ago

  • Keywords bg|has-patch added

Seems sensible. The benefit is that hooks called in get_posts can access the latest query var array through $wp_query->query_vars.

#2 @ryan
19 years ago

  • Milestone set to 2.1
  • Owner changed from anonymous to ryan

#3 @ryan
19 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3519]) User ref instead of copying. Props m4ttias. fixes #2256

Note: See TracTickets for help on using tickets.