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:
ryan 2008-03-11 17:42:09 +00:00
parent bd9c890f3d
commit 93f0add73b
1 changed files with 4 additions and 2 deletions

View File

@ -150,8 +150,10 @@ function wp_list_widget_controls_dynamic_sidebar( $params ) {
$params[0]['after_widget'] = "</li>";
$params[0]['before_title'] = "%BEG_OF_TITLE%";
$params[0]['after_title'] = "%END_OF_TITLE%";
$wp_registered_widgets[$widget_id]['_callback'] = $wp_registered_widgets[$widget_id]['callback'];
$wp_registered_widgets[$widget_id]['callback'] = 'wp_widget_control';
if ( is_callable( $wp_registered_widgets[$widget_id]['callback'] ) ) {
$wp_registered_widgets[$widget_id]['_callback'] = $wp_registered_widgets[$widget_id]['callback'];
$wp_registered_widgets[$widget_id]['callback'] = 'wp_widget_control';
}
return $params;
}