[wp-trac] [WordPress Trac] #12267: Upgrade loop objects to provide identical presentational interfaces.

WordPress Trac wp-trac at lists.automattic.com
Mon Mar 7 13:18:38 UTC 2011


#12267: Upgrade loop objects to provide identical presentational interfaces.
-------------------------+-----------------------------
 Reporter:  andy         |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  3.2-early    |
-------------------------+-----------------------------

Comment (by scribu):

 I was going to say it's going to be hard for multiple plugins to extend
 these classes.

 But then I figured we can use the {{{__call()}}} magic method, since we're
 on PHP5 now:

 {{{
 function __call( $method, $args ) {
   array_unshift( $args, $this );
   return do_action_ref_array( "post_{$method}", $args );
 }
 }}}

 Hooks save the day again. :)

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


More information about the wp-trac mailing list