Make sure widget is available before trying to display it in the admin. Props mdawaffe. fixes #6149
git-svn-id: http://svn.automattic.com/wordpress/trunk@7242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bd9c890f3d
commit
93f0add73b
|
@ -150,8 +150,10 @@ function wp_list_widget_controls_dynamic_sidebar( $params ) {
|
||||||
$params[0]['after_widget'] = "</li>";
|
$params[0]['after_widget'] = "</li>";
|
||||||
$params[0]['before_title'] = "%BEG_OF_TITLE%";
|
$params[0]['before_title'] = "%BEG_OF_TITLE%";
|
||||||
$params[0]['after_title'] = "%END_OF_TITLE%";
|
$params[0]['after_title'] = "%END_OF_TITLE%";
|
||||||
$wp_registered_widgets[$widget_id]['_callback'] = $wp_registered_widgets[$widget_id]['callback'];
|
if ( is_callable( $wp_registered_widgets[$widget_id]['callback'] ) ) {
|
||||||
$wp_registered_widgets[$widget_id]['callback'] = 'wp_widget_control';
|
$wp_registered_widgets[$widget_id]['_callback'] = $wp_registered_widgets[$widget_id]['callback'];
|
||||||
|
$wp_registered_widgets[$widget_id]['callback'] = 'wp_widget_control';
|
||||||
|
}
|
||||||
return $params;
|
return $params;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue