[wp-trac] [WordPress Trac] #17019: context arg for WP_Query filter application

WordPress Trac wp-trac at lists.automattic.com
Thu Apr 7 05:07:14 UTC 2011


#17019: context arg for WP_Query filter application
-------------------------+------------------------------
 Reporter:  kevinB       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Query        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------------------

Comment (by nacin):

 Why not just add the filter, run WP_Query, remove the filter? There's no
 need for extra context values for filters/actions. It's too much overhead.

 With regards to the query context value, simply keep it as a WP_Query
 property. It is then accessed via $this.

 Please don't comment out code, just remove it -- far easier to see what's
 going on. Also, examples can go here in a comment, please remove those as
 well.

 It's also not at all necessary to maintain backwards compatibility for
 filtering direct queries.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17019#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list