Index: wp-includes/widgets.php
===================================================================
--- wp-includes/widgets.php	(revision 8180)
+++ wp-includes/widgets.php	(working copy)
@@ -1362,32 +1362,82 @@
 
 function wp_widget_tag_cloud($args) {
 	extract($args);
+
 	$options = get_option('widget_tag_cloud');
+	
 	$title = empty($options['title']) ? __('Tags') : apply_filters('widget_title', $options['title']);
+	
+	$tagargs = array();
+	foreach ( $options as $key => $value ) //Just incase, Do not pass empty items to prevent overwriting a default.
+		if( !empty($value) )
+			$tagargs[ $key ] = $value;
 
 	echo $before_widget;
 	echo $before_title . $title . $after_title;
-	wp_tag_cloud();
+	wp_tag_cloud( $tagargs );
 	echo $after_widget;
 }
 
 function wp_widget_tag_cloud_control() {
 	$options = $newoptions = get_option('widget_tag_cloud');
 
+	$defaults = array(
+		'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 45,
+		'format' => 'flat', 'orderby' => 'name', 'order' => 'ASC',
+		'exclude' => '', 'include' => '', 'title' => __('Tags')
+	);
+	$r = wp_parse_args($options, $defaults);
+	extract($r);
+
 	if ( $_POST['tag-cloud-submit'] ) {
 		$newoptions['title'] = strip_tags(stripslashes($_POST['tag-cloud-title']));
+		$newoptions['smallest'] = strip_tags(stripslashes($_POST['tag-cloud-minsize']));
+		$newoptions['largest'] = strip_tags(stripslashes($_POST['tag-cloud-maxsize']));
+		$newoptions['unit'] = strip_tags(stripslashes($_POST['tag-cloud-unit']));
+		$newoptions['number'] = strip_tags(stripslashes($_POST['tag-cloud-number']));
+		$newoptions['format'] = strip_tags(stripslashes($_POST['tag-cloud-format']));
+		$newoptions['orderby'] = strip_tags(stripslashes($_POST['tag-cloud-orderby']));
+		$newoptions['order'] = strip_tags(stripslashes($_POST['tag-cloud-order']));
+		if ( $options != $newoptions ) {
+			$options = $newoptions;
+			update_option('widget_tag_cloud', $options);
+		}
 	}
 
-	if ( $options != $newoptions ) {
-		$options = $newoptions;
-		update_option('widget_tag_cloud', $options);
-	}
-
-	$title = attribute_escape( $options['title'] );
 ?>
 	<p><label for="tag-cloud-title">
-	<?php _e('Title:') ?> <input type="text" class="widefat" id="tag-cloud-title" name="tag-cloud-title" value="<?php echo $title ?>" /></label>
+	<?php _e('Title:') ?> <input type="text" class="widefat" id="tag-cloud-title" name="tag-cloud-title" value="<?php echo attribute_escape($title) ?>" /></label>
 	</p>
+	<p><label for="tag-cloud-maxsize">
+	<?php _e('Maximum Font Size:')?> <input class="widefat" type="text" id="tag-cloud-maxsize" name="tag-cloud-maxsize" value="<?php echo attribute_escape($largest) ?>" size="4" /></label>
+	</p>
+	<p><label for="tag-cloud-minsize">
+	<?php _e('Minimum Font Size:')?> <input class="widefat" type="text" id="tag-cloud-minsize" name="tag-cloud-minsize" value="<?php echo attribute_escape($smallest) ?>" size="4" /></label>
+	</p>
+	<p><label for="tag-cloud-unit">
+	<?php _e('Font size unit:')?> <input class="widefat" type="text" id="tag-cloud-unit" name="tag-cloud-unit" value="<?php echo attribute_escape($unit) ?>" size="4" /></label>
+	</p>
+	<p><label for="tag-cloud-number">
+	<?php _e('Number to show:')?> <input class="widefat" type="text" id="tag-cloud-number" name="tag-cloud-number" value="<?php echo attribute_escape($number) ?>" size="4" /></label>
+	</p>
+	<p><label for="tag-cloud-format">
+	<?php _e('Display Format:')?> <select class="widefat" size="1" id="tag-cloud-format" name="tag-cloud-format">
+			<option value="flat" <?php selected($format, 'flat') ?>><?php _e('Flat') ?></option>
+			<option value="list" <?php selected($format, 'list') ?>><?php _e('List') ?></option>
+		</select></label>
+	</p>
+	<p><label for="tag-cloud-orderby">
+	<?php _e('Order By:')?> <select class="widefat" size="1" id="tag-cloud-orderby" name="tag-cloud-orderby">
+			<option value="name" <?php selected($orderby, 'name') ?>><?php _e('Name') ?></option>
+			<option value="count" <?php selected($orderby, 'count') ?>><?php _e('Count') ?></option>
+		</select></label>
+	</p>
+	<p><label for="tag-cloud-order">
+	<?php _e('Order:')?> <select class="widefat" size="1" id="tag-cloud-order" name="tag-cloud-order">
+			<option value="ASC" <?php selected($order, 'ASC' )?>><?php _e('Ascending') ?></option>
+			<option value="DESC" <?php selected($order, 'DESC') ?>><?php _e('Descending') ?></option>
+		</select></label>
+	</p>
 	<input type="hidden" name="tag-cloud-submit" id="tag-cloud-submit" value="1" />
 <?php
 }
