[wp-trac] [WordPress Trac] #9886: Pass $this as the second argument in WP_Query filters

WordPress Trac wp-trac at lists.automattic.com
Tue Feb 23 22:02:10 UTC 2010


#9886: Pass $this as the second argument in WP_Query filters
-------------------------+--------------------------------------------------
 Reporter:  westi        |       Owner:  westi                 
     Type:  enhancement  |      Status:  new                   
 Priority:  normal       |   Milestone:  3.0                   
Component:  Plugins      |     Version:  2.8                   
 Severity:  major        |    Keywords:  has-patch commit early
-------------------------+--------------------------------------------------

Comment(by westi):

 Have you tested this on PHP4.

 I think we still need to have the apply_filters_ref_array() function -
 this wouldn't need &$this to be it's first argument.

 From memory you need to package the reference up in an array so that you
 can pass it to a function which doesn't take a reference explicitly - it
 have a variable length arguments list

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


More information about the wp-trac mailing list