Index: wp-includes/default-widgets.php
===================================================================
--- wp-includes/default-widgets.php	(revision 15448)
+++ wp-includes/default-widgets.php	(working copy)
@@ -35,11 +35,13 @@
 			echo $before_widget;
 			if ( $title)
 				echo $before_title . $title . $after_title;
+			echo $before_content;
 		?>
 		<ul>
 			<?php echo $out; ?>
 		</ul>
 		<?php
+			echo $after_content;
 			echo $after_widget;
 		}
 	}
@@ -104,6 +106,19 @@
 		$show_images = isset($instance['images']) ? $instance['images'] : true;
 		$category = isset($instance['category']) ? $instance['category'] : false;
 
+		$link_args = array(
+			'title_before' => $before_title,
+			'title_after' => $after_title . $before_content,
+			'category_before' => $before_widget,
+			'category_after' => $after_widget,
+			'show_images' => $show_images,
+			'show_description' => $show_description,
+			'show_name' => $show_name,
+			'show_rating' => $show_rating,
+			'category' => $category,
+			'class' => 'linkcat widget'
+		);
+
 		if ( is_admin() && !$category ) {
 			// Display All Links widget as such in the widgets screen
 			echo $before_widget . $before_title. __('All Links') . $after_title . $after_widget;
@@ -111,18 +126,19 @@
 		}
 
 		$before_widget = preg_replace('/id="[^"]*"/','id="%id"', $before_widget);
-		wp_list_bookmarks(apply_filters('widget_links_args', array(
-			'title_before' => $before_title, 'title_after' => $after_title,
-			'category_before' => $before_widget, 'category_after' => $after_widget,
-			'show_images' => $show_images, 'show_description' => $show_description,
-			'show_name' => $show_name, 'show_rating' => $show_rating,
-			'category' => $category, 'class' => 'linkcat widget'
-		)));
+
+		echo $before_widget;
+
+		wp_list_bookmarks( apply_filters( 'widget_links_args', $link_args ) );
+
+		echo $after_content;
+
+		echo $after_widget;
 	}
 
 	function update( $new_instance, $old_instance ) {
 		$new_instance = (array) $new_instance;
-		$instance = array( 'images' => 0, 'name' => 0, 'description' => 0, 'rating' => 0);
+		$instance = array( 'images' => 0, 'name' => 0, 'description' => 0, 'rating' => 0 );
 		foreach ( $instance as $field => $val ) {
 			if ( isset($new_instance[$field]) )
 				$instance[$field] = 1;
@@ -184,8 +200,9 @@
 		if ( $title )
 			echo $before_title . $title . $after_title;
 
-		// Use current theme search form if it exists
-		get_search_form();
+		echo $before_content;
+		get_search_form(); // Use current theme search form if it exists
+		echo $after_content;
 
 		echo $after_widget;
 	}
@@ -229,6 +246,7 @@
 		if ( $title )
 			echo $before_title . $title . $after_title;
 
+		echo $before_content;
 		if ( $d ) {
 ?>
 		<select name="archive-dropdown" onchange='document.location.href=this.options[this.selectedIndex].value;'> <option value=""><?php echo esc_attr(__('Select Month')); ?></option> <?php wp_get_archives(apply_filters('widget_archives_dropdown_args', array('type' => 'monthly', 'format' => 'option', 'show_post_count' => $c))); ?> </select>
@@ -240,6 +258,7 @@
 		</ul>
 <?php
 		}
+		echo $after_content;
 
 		echo $after_widget;
 	}
@@ -291,6 +310,8 @@
 		echo $before_widget;
 		if ( $title )
 			echo $before_title . $title . $after_title;
+			
+			echo $before_content;
 ?>
 			<ul>
 			<?php wp_register(); ?>
@@ -301,6 +322,8 @@
 			<?php wp_meta(); ?>
 			</ul>
 <?php
+		echo $after_content;
+
 		echo $after_widget;
 	}
 
@@ -335,12 +358,24 @@
 	function widget( $args, $instance ) {
 		extract($args);
 		$title = apply_filters('widget_title', empty($instance['title']) ? '&nbsp;' : $instance['title'], $instance, $this->id_base);
+
 		echo $before_widget;
+
 		if ( $title )
 			echo $before_title . $title . $after_title;
-		echo '<div id="calendar_wrap">';
+
+		if ( '' != $before_content )
+			echo $before_content;
+		else
+			echo '<div id="calendar_wrap">';
+
 		get_calendar();
-		echo '</div>';
+
+		if ( '' != $after_content )
+			echo $after_content;
+		else
+			echo '</div>';
+
 		echo $after_widget;
 	}
 
@@ -378,10 +413,24 @@
 		extract($args);
 		$title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
 		$text = apply_filters( 'widget_text', $instance['text'], $instance );
+
 		echo $before_widget;
-		if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?>
-			<div class="textwidget"><?php echo $instance['filter'] ? wpautop($text) : $text; ?></div>
-		<?php
+
+		if ( !empty( $title ) )
+			echo $before_title . $title . $after_title;
+
+		if ( '' != $before_content )
+			echo $before_content;
+		else
+			echo '<div class="textwidget">';
+
+		echo $instance['filter'] ? wpautop( $text ) : $text;
+
+		if ( '' != $after_content )
+			echo $after_content;
+		else
+			echo '</div>';
+
 		echo $after_widget;
 	}
 
@@ -432,11 +481,14 @@
 		$d = $instance['dropdown'] ? '1' : '0';
 
 		echo $before_widget;
+
 		if ( $title )
 			echo $before_title . $title . $after_title;
 
-		$cat_args = array('orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h);
+		echo $before_content;
 
+		$cat_args = array( 'orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h );
+
 		if ( $d ) {
 			$cat_args['show_option_none'] = __('Select Category');
 			wp_dropdown_categories(apply_filters('widget_categories_dropdown_args', $cat_args));
@@ -460,12 +512,14 @@
 		<ul>
 <?php
 		$cat_args['title_li'] = '';
-		wp_list_categories(apply_filters('widget_categories_args', $cat_args));
+		wp_list_categories( apply_filters( 'widget_categories_args', $cat_args ) );
 ?>
 		</ul>
 <?php
 		}
 
+		echo $after_content;
+
 		echo $after_widget;
 	}
 
@@ -547,11 +601,13 @@
 ?>
 		<?php echo $before_widget; ?>
 		<?php if ( $title ) echo $before_title . $title . $after_title; ?>
+		<?php echo $before_content; ?>
 		<ul>
 		<?php  while ($r->have_posts()) : $r->the_post(); ?>
-		<li><a href="<?php the_permalink() ?>" title="<?php echo esc_attr(get_the_title() ? get_the_title() : get_the_ID()); ?>"><?php if ( get_the_title() ) the_title(); else the_ID(); ?></a></li>
+			<li><a href="<?php the_permalink() ?>" title="<?php echo esc_attr(get_the_title() ? get_the_title() : get_the_ID()); ?>"><?php if ( get_the_title() ) the_title(); else the_ID(); ?></a></li>
 		<?php endwhile; ?>
 		</ul>
+		<?php echo $after_content; ?>
 		<?php echo $after_widget; ?>
 <?php
 		// Reset the global $the_post as this query will have stomped on it
@@ -649,6 +705,7 @@
 		if ( $title )
 			$output .= $before_title . $title . $after_title;
 
+		$output .= $before_content;
 		$output .= '<ul id="recentcomments">';
 		if ( $comments ) {
 			foreach ( (array) $comments as $comment) {
@@ -656,6 +713,7 @@
 			}
  		}
 		$output .= '</ul>';
+		$output .= $after_content;
 		$output .= $after_widget;
 
 		echo $output;
@@ -742,7 +800,9 @@
 		echo $before_widget;
 		if ( $title )
 			echo $before_title . $title . $after_title;
+		echo $before_content;
 		wp_widget_rss_output( $rss, $instance );
+		echo $after_content;
 		echo $after_widget;
 
 		if ( ! is_wp_error($rss) )
@@ -1009,11 +1069,22 @@
 		$title = apply_filters('widget_title', $title, $instance, $this->id_base);
 
 		echo $before_widget;
+
 		if ( $title )
 			echo $before_title . $title . $after_title;
-		echo '<div>';
+
+		if ( '' != $before_content )
+			echo $before_content;
+		else
+			echo '<div>';
+
 		wp_tag_cloud( apply_filters('widget_tag_cloud_args', array('taxonomy' => $current_taxonomy) ) );
-		echo "</div>\n";
+
+		if ( '' != $after_content )
+			echo $after_content;
+		else
+			echo "</div>\n";
+
 		echo $after_widget;
 	}
 
@@ -1053,7 +1124,7 @@
  *
  * @since 3.0.0
  */
- class WP_Nav_Menu_Widget extends WP_Widget {
+class WP_Nav_Menu_Widget extends WP_Widget {
 
 	function WP_Nav_Menu_Widget() {
 		$widget_ops = array( 'description' => __('Use this widget to add one of your custom menus as a widget.') );
@@ -1074,8 +1145,12 @@
 		if ( !empty($instance['title']) )
 			echo $args['before_title'] . $instance['title'] . $args['after_title'];
 
+		echo $args['before_content'];
+
 		wp_nav_menu( array( 'fallback_cb' => '', 'menu' => $nav_menu ) );
 
+		echo $args['after_content'];
+
 		echo $args['after_widget'];
 	}
 
Index: wp-includes/widgets.php
===================================================================
--- wp-includes/widgets.php	(revision 15448)
+++ wp-includes/widgets.php	(working copy)
@@ -38,7 +38,7 @@
 	 *
 	 * Subclasses should over-ride this function to generate their widget code.
 	 *
-	 * @param array $args Display arguments including before_title, after_title, before_widget, and after_widget.
+	 * @param array $args Display arguments including before_title, after_title, before_widget, after_widget, before_content, and after_content.
 	 * @param array $instance The settings for the particular instance of the widget
 	 */
 	function widget($args, $instance) {
@@ -528,6 +528,8 @@
  *     displayed.
  * before_title - The content that will be prepended to the title when displayed.
  * after_title - the content that will be appended to the title when displayed.
+ * before_content - The content that will be prepended to the widget content when displayed.
+ * after_content - the content that will be appended to the widget content when displayed.
  *
  * <em>Content</em> is assumed to be HTML and should be formatted as such, but
  * doesn't have to be.
@@ -551,6 +553,8 @@
 		'after_widget' => "</li>\n",
 		'before_title' => '<h2 class="widgettitle">',
 		'after_title' => "</h2>\n",
+		'before_content' => '',
+		'after_content' => '',
 	);
 
 	$sidebar = wp_parse_args( $args, $defaults );
@@ -1195,8 +1199,15 @@
 	if ( !is_a($widget_obj, 'WP_Widget') )
 		return;
 
-	$before_widget = sprintf('<div class="widget %s">', $widget_obj->widget_options['classname']);
-	$default_args = array('before_widget' => $before_widget, 'after_widget' => "</div>", 'before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>');
+	$before_widget = sprintf( '<div class="widget %s">', $widget_obj->widget_options['classname'] );
+	$default_args = array(
+		'before_widget' => $before_widget,
+		'after_widget' => "</div>",
+		'before_title' => '<h2 class="widgettitle">',
+		'after_title' => '</h2>',
+		'before_content' => '',
+		'after_content' => ''
+	);
 
 	$args = wp_parse_args($args, $default_args);
 	$instance = wp_parse_args($instance);
Index: wp-content/themes/twentyten/functions.php
===================================================================
--- wp-content/themes/twentyten/functions.php	(revision 15448)
+++ wp-content/themes/twentyten/functions.php	(working copy)
@@ -358,6 +358,8 @@
 		'after_widget' => '</li>',
 		'before_title' => '<h3 class="widget-title">',
 		'after_title' => '</h3>',
+		'before_content' => '<div class="textwidget lance debug" style="border: 1px solid red;">',
+		'after_content' => '</div>',
 	) );
 
 	// Area 2, located below the Primary Widget Area in the sidebar. Empty by default.
@@ -480,4 +482,4 @@
 		the_title_attribute( 'echo=0' )
 	);
 }
-endif;
+endif;
\ No newline at end of file
Index: wp-admin/widgets.php
===================================================================
--- wp-admin/widgets.php	(revision 15448)
+++ wp-admin/widgets.php	(working copy)
@@ -55,6 +55,8 @@
 	'after_widget' => '',
 	'before_title' => '',
 	'after_title' => '',
+	'before_content' => '',
+	'after_content' => '',
 ));
 
 // These are the widgets grouped by sidebar
