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:
parent
2ba7c9b6c1
commit
bb7b7901b9
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue