Fix widget control registration where id is not passed in.

git-svn-id: http://svn.automattic.com/wordpress/trunk@5341 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-04-28 17:04:16 +00:00
parent e5ea802c0c
commit df9d590cbc
1 changed files with 2 additions and 2 deletions

View File

@ -131,8 +131,8 @@ function register_widget_control($name, $control_callback, $width = 300, $height
$height = (int) $height > 60 ? (int) $height + 40 : 240;
if ( empty($control_callback) )
unset($wp_registered_widget_controls[$name]);
elseif ( !isset($wp_registered_widget_controls[$name]) || !$wp_register_widget_defaults )
unset($wp_registered_widget_controls[$id]);
elseif ( !isset($wp_registered_widget_controls[$id]) || !$wp_register_widget_defaults )
$wp_registered_widget_controls[$id] = array(
'name' => $name,
'id' => $id,