Properly construct widget classname if second param is an array. Props f00f. fixes #4910
git-svn-id: http://svn.automattic.com/wordpress/trunk@6054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
eb2d6cea06
commit
1ba81b4f02
|
@ -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