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

git-svn-id: https://develop.svn.wordpress.org/trunk@6054 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2007-09-06 23:27:16 +00:00
parent 2ba7c9b6c1
commit bb7b7901b9
1 changed files with 2 additions and 1 deletions

View File

@ -210,7 +210,8 @@ function dynamic_sidebar($index = 1) {
$params = array_merge(array($sidebar), (array) $wp_registered_widgets[$id]['params']);
// Substitute HTML id and class attributes into before_widget
$params[0]['before_widget'] = sprintf($params[0]['before_widget'], $id, $wp_registered_widgets[$id]['classname']);
$classname_ = ( is_array($wp_registered_widgets[$id]['classname']) ) ? implode('_', $wp_registered_widgets[$id]['classname']) : $wp_registered_widgets[$id]['classname'];
$params[0]['before_widget'] = sprintf($params[0]['before_widget'], $id, $classname_);
if ( is_callable($callback) ) {
call_user_func_array($callback, $params);