Make WordPress Core

Opened 18 years ago

Closed 18 years ago

#4872 closed defect (bug) (duplicate)

widget class is Array

Reported by: denis-de-bernardy's profile Denis-de-Bernardy Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.2.2
Component: Template Keywords:
Focuses: Cc:

Description

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)

#1 @Nazgul
18 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.