WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#4872 closed defect (bug) (duplicate)

widget class is Array

Reported by: Denis-de-Bernardy Owned by: anonymous
Priority: normal Milestone:
Component: Template Version: 2.2.2
Severity: normal Keywords:
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)

comment:1 Nazgul6 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.