WordPress.org

Make WordPress Core

Changeset 6054


Ignore:
Timestamp:
09/06/2007 11:27:16 PM (13 years ago)
Author:
markjaquith
Message:

Properly construct widget classname if second param is an array. Props f00f. fixes #4910

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/widgets.php

    r6040 r6054  
    211211
    212212        // Substitute HTML id and class attributes into before_widget
    213         $params[0]['before_widget'] = sprintf($params[0]['before_widget'], $id, $wp_registered_widgets[$id]['classname']);
     213        $classname_ = ( is_array($wp_registered_widgets[$id]['classname']) ) ? implode('_', $wp_registered_widgets[$id]['classname']) : $wp_registered_widgets[$id]['classname'];
     214        $params[0]['before_widget'] = sprintf($params[0]['before_widget'], $id, $classname_);
    214215
    215216        if ( is_callable($callback) ) {
Note: See TracChangeset for help on using the changeset viewer.