[wp-trac] [WordPress Trac] #4872: widget class is Array

WordPress Trac wp-trac at lists.automattic.com
Thu Aug 30 13:36:26 GMT 2007


#4872: widget class is Array
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:  anonymous
     Type:  defect             |      Status:  new      
 Priority:  normal             |   Milestone:  2.3      
Component:  Template           |     Version:  2.2.2    
 Severity:  normal             |    Keywords:           
-------------------------------+--------------------------------------------
 when using a callback with a static class in a widget, the widget's class
 is set to Array. e.g.:


 {{{
 class foo
 {
   function bar($args)
   {
     echo $args['before_widget'];
     echo 'foobar widget';
     echo $args['after_widget'];
   }
 }
 }}}


 when using:


 {{{
 register_sidebar_widget('FooBar', array('foo', 'bar'));
 }}}


 then $args['before_widget'] returns:


 {{{
 <li id="name" class="widget Array">
 }}}


 rather than something like:

 {{{

 <li id="name" class="widget foo_bar">
 }}}

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4872>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list