[wp-trac] Re: [WordPress Trac] #8640: 2 new functions for Plugin API.

WordPress Trac wp-trac at lists.automattic.com
Tue May 12 14:33:25 GMT 2009


#8640: 2 new functions for Plugin API.
---------------------------+------------------------------------------------
 Reporter:  momo360modena  |       Owner:  ShaneF          
     Type:  enhancement    |      Status:  assigned        
 Priority:  normal         |   Milestone:  2.8             
Component:  Plugins        |     Version:  2.7             
 Severity:  minor          |    Keywords:  has-patch tested
---------------------------+------------------------------------------------
Changes (by Denis-de-Bernardy):

  * keywords:  needs-patch => has-patch tested
  * milestone:  2.9 => 2.8


Comment:

 I don't think it's correct to try to something like:

 {{{
 add_filters($filters, array('strip_tags', 'trim', 'wp_filter_kses'));
 }}}

 each function can have its own priority and number of arguments, and this
 renders the whole idea more or less pointless. and that is not to mention
 the clunky looking syntax with classes (especially when they're mixed up):

 {{{
 add_filters($filters, array(array('foo', 'bar'), array(&$bar, 'foo'),
 'foobar'));
 }}}


 the correct approach, I think, is the first patch, 9640.diff, which is
 still good against 11300.

 {{{
 add_filters($filters_array, $single_callback, $priority, $num_args);
 }}}

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


More information about the wp-trac mailing list