Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#4872 closed defect (bug) (duplicate)

widget class is Array

Reported by: Denis-de-Bernardy Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.2.2
Component: Template Keywords:
Focuses: Cc:


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 $argsbefore_widget? returns:

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

rather than something like:

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

Change History (1)

comment:1 Nazgul7 years ago

  • Milestone 2.3 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

#4910 appears to be a duplicate, but as that one is fixed, I'll close this one.

Note: See TracTickets for help on using tickets.