Index: src/wp-includes/default-widgets.php
===================================================================
--- src/wp-includes/default-widgets.php	(revision 28398)
+++ src/wp-includes/default-widgets.php	(working copy)
@@ -19,7 +19,6 @@
 	}

 	function widget( $args, $instance ) {
-		extract( $args );

 		/**
 		 * Filter the widget title.
@@ -50,20 +50,21 @@
 			'exclude'     => $exclude
 		) ) );

-		if ( !empty( $out ) ) {
-			echo $before_widget;
-			if ( $title)
-				echo $before_title . $title . $after_title;
+		if ( ! empty( $out ) ) {
+			echo $args['before_widget'];
+			if ( $title ) {
+				echo $args['before_title'] . $title . $args['after_title'];
+			}
 		?>
 		<ul>
 			<?php echo $out; ?>
 		</ul>
 		<?php
-			echo $after_widget;
+			echo $args['after_widget'];
 		}
 	}

@@ -119,7 +120,6 @@
 	}

 	function widget( $args, $instance ) {
-		extract($args, EXTR_SKIP);

 		$show_description = isset($instance['description']) ? $instance['description'] : false;
 		$show_name = isset($instance['name']) ? $instance['name'] : false;
@@ -127,10 +127,10 @@
		$order = $orderby == 'rating' ? 'DESC' : 'ASC';
 		$limit = isset( $instance['limit'] ) ? $instance['limit'] : -1;

-		$before_widget = preg_replace('/id="[^"]*"/','id="%id"', $before_widget);
+		$before_widget = preg_replace( '/id="[^"]*"/', 'id="%id"', $args['before_widget'] );

 		/**
 		 * Filter the arguments for the Links widget.
@@ -142,8 +142,8 @@
 		 * @param array $args An array of arguments to retrieve the links list.
 		 */
 		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,
+			'title_before' => $args['before_title'], 'title_after' => $args['after_title'],
+			'category_before' => $before_widget, 'category_after' => $args['after_widget'],
 			'show_images' => $show_images, 'show_description' => $show_description,
 			'show_name' => $show_name, 'show_rating' => $show_rating,
 			'category' => $category, 'class' => 'linkcat widget',
@@ -156,13 +156,15 @@
 		$new_instance = (array) $new_instance;
 		$instance = array( 'images' => 0, 'name' => 0, 'description' => 0, 'rating' => 0 );
 		foreach ( $instance as $field => $val ) {
-			if ( isset($new_instance[$field]) )
+			if ( isset($new_instance[$field]) ) {
 				$instance[$field] = 1;
+			}
 		}

 		$instance['orderby'] = 'name';
-		if ( in_array( $new_instance['orderby'], array( 'name', 'rating', 'id', 'rand' ) ) )
+		if ( in_array( $new_instance['orderby'], array( 'name', 'rating', 'id', 'rand' ) ) ) {
 			$instance['orderby'] = $new_instance['orderby'];
+		}

 		$instance['category'] = intval( $new_instance['category'] );
 		$instance['limit'] = ! empty( $new_instance['limit'] ) ? intval( $new_instance['limit'] ) : -1;
@@ -229,19 +231,19 @@
 	}

 	function widget( $args, $instance ) {
-		extract($args);

 		/** This filter is documented in wp-includes/default-widgets.php */
 		$title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );

-		echo $before_widget;
-		if ( $title )
-			echo $before_title . $title . $after_title;
+		echo $args['before_widget'];
+		if ( $title ) {
+			echo $args['before_title'] . $title . $args['after_title'];
+		}

 		// Use current theme search form if it exists
 		get_search_form();

-		echo $after_widget;
+		echo $args['after_widget'];
 	}

 	function form( $instance ) {
@@ -274,16 +276,16 @@
 	}

 	function widget( $args, $instance ) {
-		extract($args);
 		$c = ! empty( $instance['count'] ) ? '1' : '0';
 		$d = ! empty( $instance['dropdown'] ) ? '1' : '0';

 		/** This filter is documented in wp-includes/default-widgets.php */
-		$title = apply_filters( 'widget_title', empty($instance['title'] ) ? __( 'Archives' ) : $instance['title'], $instance, $this->id_base );
+		$title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Archives' ) : $instance['title'], $instance, $this->id_base );

-		echo $before_widget;
-		if ( $title )
-			echo $before_title . $title . $after_title;
+		echo $args['before_widget'];
+		if ( $title ) {
+			echo $args['before_title'] . $title . $args['after_title'];
+		}

 		if ( $d ) {
 ?>
@@ -330,7 +332,7 @@
 <?php
 		}

-		echo $after_widget;
+		echo $args['after_widget'];
 	}

 	function update( $new_instance, $old_instance ) {
@@ -374,14 +376,14 @@
 	}

 	function widget( $args, $instance ) {
-		extract($args);

 		/** This filter is documented in wp-includes/default-widgets.php */
 		$title = apply_filters( 'widget_title', empty($instance['title']) ? __( 'Meta' ) : $instance['title'], $instance, $this->id_base );

-		echo $before_widget;
-		if ( $title )
-			echo $before_title . $title . $after_title;
+		echo $args['before_widget'];
+		if ( $title ) {
+			echo $args['before_title'] . $title . $args['after_title'];
+		}
 ?>
 			<ul>
 			<?php wp_register(); ?>
@@ -406,7 +408,7 @@
 ?>
 			</ul>
 <?php
-		echo $after_widget;
+		echo $args['after_widget'];
 	}

 	function update( $new_instance, $old_instance ) {
@@ -438,18 +440,18 @@
 	}

 	function widget( $args, $instance ) {
-		extract($args);

 		/** This filter is documented in wp-includes/default-widgets.php */
 		$title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );

-		echo $before_widget;
-		if ( $title )
-			echo $before_title . $title . $after_title;
+		echo $args['before_widget'];
+		if ( $title ) {
+			echo $args['before_title'] . $title . $args['after_title'];
+		}
 		echo '<div id="calendar_wrap">';
 		get_calendar();
 		echo '</div>';
-		echo $after_widget;
+		echo $args['after_widget'];
 	}

 	function update( $new_instance, $old_instance ) {
@@ -483,7 +485,6 @@
 	}

 	function widget( $args, $instance ) {
-		extract($args);

 		/** This filter is documented in wp-includes/default-widgets.php */
 		$title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
@@ -497,20 +498,21 @@
 		 * @param WP_Widget $instance    WP_Widget instance.
 		 */
 		$text = apply_filters( 'widget_text', empty( $instance['text'] ) ? '' : $instance['text'], $instance );
-		echo $before_widget;
-		if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?>
+		echo $args['before_widget'];
+		if ( ! empty( $title ) ) { echo $args['before_title'] . $title . $args['after_title']; } ?>
 			<div class="textwidget"><?php echo !empty( $instance['filter'] ) ? wpautop( $text ) : $text; ?></div>
 		<?php
-		echo $after_widget;
+		echo $args['after_widget'];
 	}

 	function update( $new_instance, $old_instance ) {
 		$instance = $old_instance;
 		$instance['title'] = strip_tags($new_instance['title']);
-		if ( current_user_can('unfiltered_html') )
+		if ( current_user_can( 'unfiltered_html' ) ) {
 			$instance['text'] =  $new_instance['text'];
-		else
+		} else {
 			$instance['text'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['text']) ) ); // wp_filter_post_kses() expects slashed
+		}
 		$instance['filter'] = isset($new_instance['filter']);
 		return $instance;
 	}
@@ -543,7 +545,6 @@
 	}

 	function widget( $args, $instance ) {
-		extract( $args );

 		/** This filter is documented in wp-includes/default-widgets.php */
 		$title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Categories' ) : $instance['title'], $instance, $this->id_base );
@@ -552,9 +553,10 @@
 		$h = ! empty( $instance['hierarchical'] ) ? '1' : '0';
 		$d = ! empty( $instance['dropdown'] ) ? '1' : '0';

-		echo $before_widget;
-		if ( $title )
-			echo $before_title . $title . $after_title;
+		echo $args['before_widget'];
+		if ( $title ) {
+			echo $args['before_title'] . $title . $args['after_title'];
+		}

 		$cat_args = array('orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h);

@@ -605,7 +607,7 @@
 <?php
 		}

-		echo $after_widget;
+		echo $args['after_widget'];
 	}

 	function update( $new_instance, $old_instance ) {
@@ -679,7 +681,6 @@
 		}

 		ob_start();
-		extract($args);

 		$title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : __( 'Recent Posts' );

@@ -687,8 +688,9 @@
 		$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );

 		$number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 5;
-		if ( ! $number )
+		if ( ! $number ) {
 			$number = 5;
+		}
 		$show_date = isset( $instance['show_date'] ) ? $instance['show_date'] : false;

 		/**
@@ -709,8 +711,8 @@

 		if ($r->have_posts()) :
 ?>
-		<?php echo $before_widget; ?>
-		<?php if ( $title ) echo $before_title . $title . $after_title; ?>
+		<?php echo $args['before_widget']; ?>
+		<?php if ( $title ) { echo $args['before_title'] . $title . $args['after_title']; } ?>
 		<ul>
 		<?php while ( $r->have_posts() ) : $r->the_post(); ?>
 			<li>
@@ -721,7 +723,7 @@
 			</li>
 		<?php endwhile; ?>
 		</ul>
-		<?php echo $after_widget; ?>
+		<?php echo $args['after_widget']; ?>
 <?php
 		// Reset the global $the_post as this query will have stomped on it
 		wp_reset_postdata();
@@ -744,8 +746,9 @@
 		$this->flush_widget_cache();

 		$alloptions = wp_cache_get( 'alloptions', 'options' );
-		if ( isset($alloptions['widget_recent_entries']) )
+		if ( isset( $alloptions['widget_recent_entries'] ) ) {
 			delete_option('widget_recent_entries');
+		}

 		return $instance;
 	}
@@ -783,8 +786,9 @@
 		parent::__construct('recent-comments', __('Recent Comments'), $widget_ops);
 		$this->alt_option_name = 'widget_recent_comments';

-		if ( is_active_widget(false, false, $this->id_base) )
+		if ( is_active_widget( false, false, $this->id_base ) ) {
 			add_action( 'wp_head', array($this, 'recent_comments_style') );
+		}

 		add_action( 'comment_post', array($this, 'flush_widget_cache') );
 		add_action( 'edit_comment', array($this, 'flush_widget_cache') );
@@ -802,8 +806,9 @@
 		 * @param string $id_base The widget ID.
 		 */
 		if ( ! current_theme_supports( 'widgets' ) // Temp hack #14876
-			|| ! apply_filters( 'show_recent_comments_widget_style', true, $this->id_base ) )
+			|| ! apply_filters( 'show_recent_comments_widget_style', true, $this->id_base ) ) {
 			return;
+		}
 		?>
 	<style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>
 <?php
@@ -832,7 +837,6 @@
 			return;
 		}

-		extract($args, EXTR_SKIP);
 		$output = '';

 		$title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : __( 'Recent Comments' );
@@ -841,8 +845,9 @@
 		$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );

 		$number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 5;
-		if ( ! $number )
+		if ( ! $number ) {
 			$number = 5;
+		}

 		/**
 		 * Filter the arguments for the Recent Comments widget.
@@ -859,9 +864,10 @@
 			'post_status' => 'publish'
 		) ) );

-		$output .= $before_widget;
-		if ( $title )
-			$output .= $before_title . $title . $after_title;
+		$output .= $args['before_widget'];
+		if ( $title ) {
+			$output .= $args['before_title'] . $title . $args['after_title'];
+		}

 		$output .= '<ul id="recentcomments">';
 		if ( $comments ) {
@@ -874,7 +880,7 @@
 			}
 		}
 		$output .= '</ul>';
-		$output .= $after_widget;
+		$output .= $args['after_widget'];

 		echo $output;

@@ -891,8 +897,9 @@
 		$this->flush_widget_cache();

 		$alloptions = wp_cache_get( 'alloptions', 'options' );
-		if ( isset($alloptions['widget_recent_comments']) )
+		if ( isset( $alloptions['widget_recent_comments'] ) ) {
 			delete_option('widget_recent_comments');
+		}

 		return $instance;
 	}
@@ -928,18 +935,19 @@
 		if ( isset($instance['error']) && $instance['error'] )
 			return;

-		extract($args, EXTR_SKIP);
-
 		$url = ! empty( $instance['url'] ) ? $instance['url'] : '';
-		while ( stristr($url, 'http') != $url )
+		while ( stristr( $url, 'http' ) != $url ) {
 			$url = substr($url, 1);
+		}

-		if ( empty($url) )
+		if ( empty( $url ) ) {
 			return;
+		}

 		// self-url destruction sequence
-		if ( in_array( untrailingslashit( $url ), array( site_url(), home_url() ) ) )
+		if ( in_array( untrailingslashit( $url ), array( site_url(), home_url() ) ) ) {
 			return;
+		}

 		$rss = fetch_feed($url);
 		$title = $instance['title'];
@@ -948,15 +956,18 @@

 		if ( ! is_wp_error($rss) ) {
 			$desc = esc_attr(strip_tags(@html_entity_decode($rss->get_description(), ENT_QUOTES, get_option('blog_charset'))));
-			if ( empty($title) )
+			if ( empty($title) ) {
 				$title = esc_html(strip_tags($rss->get_title()));
+			}
 			$link = esc_url(strip_tags($rss->get_permalink()));
-			while ( stristr($link, 'http') != $link )
+			while ( stristr( $link, 'http' ) != $link ) {
 				$link = substr($link, 1);
+			}
 		}

-		if ( empty($title) )
+		if ( empty( $title ) ) {
 			$title = empty($desc) ? __('Unknown Feed') : $desc;
+		}

 		/** This filter is documented in wp-includes/default-widgets.php */
 		$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
@@ -963,17 +974,20 @@

 		$url = esc_url(strip_tags($url));
 		$icon = includes_url('images/rss.png');
-		if ( $title )
+		if ( $title ) {
 			$title = "<a class='rsswidget' href='$url' title='" . esc_attr__( 'Syndicate this content' ) ."'><img style='border:0' width='14' height='14' src='$icon' alt='RSS' /></a> <a class='rsswidget' href='$link' title='$desc'>$title</a>";
+		}

-		echo $before_widget;
-		if ( $title )
-			echo $before_title . $title . $after_title;
+		echo $args['before_widget'];
+		if ( $title ) {
+			echo $args['before_title'] . $title . $args['after_title'];
+		}
 		wp_widget_rss_output( $rss, $instance );
-		echo $after_widget;
+		echo $args['after_widget'];

-		if ( ! is_wp_error($rss) )
+		if ( ! is_wp_error( $rss ) ) {
 			$rss->__destruct();
+		}
 		unset($rss);
 	}

@@ -984,8 +998,9 @@

 	function form($instance) {

-		if ( empty($instance) )
+		if ( empty( $instance ) ) {
 			$instance = array( 'title' => '', 'url' => '', 'items' => 10, 'error' => false, 'show_summary' => 0, 'show_author' => 0, 'show_date' => 0 );
+		}
 		$instance['number'] = $this->number;

 		wp_widget_rss_form( $instance );
@@ -1011,21 +1026,22 @@
 	}

 	if ( is_wp_error($rss) ) {
-		if ( is_admin() || current_user_can('manage_options') )
+		if ( is_admin() || current_user_can('manage_options') ) {
 			echo '<p>' . sprintf( __('<strong>RSS Error</strong>: %s'), $rss->get_error_message() ) . '</p>';
+		}
 		return;
 	}

 	$default_args = array( 'show_author' => 0, 'show_date' => 0, 'show_summary' => 0 );
 	$args = wp_parse_args( $args, $default_args );
-	extract( $args, EXTR_SKIP );

-	$items = (int) $items;
-	if ( $items < 1 || 20 < $items )
+	$items = (int) $args['items'];
+	if ( $items < 1 || 20 < $items ) {
 		$items = 10;
-	$show_summary  = (int) $show_summary;
-	$show_author   = (int) $show_author;
-	$show_date     = (int) $show_date;
+	}
+	$show_summary  = (int) $args['show_summary'];
+	$show_author   = (int) $args['show_author'];
+	$show_date     = (int) $args['show_date'];

 	if ( !$rss->get_item_quantity() ) {
 		echo '<ul><li>' . __( 'An error has occurred, which probably means the feed is down. Try again later.' ) . '</li></ul>';
@@ -1037,12 +1053,14 @@
 	echo '<ul>';
 	foreach ( $rss->get_items(0, $items) as $item ) {
 		$link = $item->get_link();
-		while ( stristr($link, 'http') != $link )
+		while ( stristr( $link, 'http' ) != $link ) {
 			$link = substr($link, 1);
+		}
 		$link = esc_url(strip_tags($link));
 		$title = esc_attr(strip_tags($item->get_title()));
-		if ( empty($title) )
+		if ( empty( $title ) ) {
 			$title = __('Untitled');
+		}

 		$desc = @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option( 'blog_charset' ) );
 		$desc = esc_attr( strip_tags( $desc ) );
@@ -1110,21 +1128,21 @@

 	$default_inputs = array( 'url' => true, 'title' => true, 'items' => true, 'show_summary' => true, 'show_author' => true, 'show_date' => true );
 	$inputs = wp_parse_args( $inputs, $default_inputs );
-	extract( $args );
-	extract( $inputs, EXTR_SKIP );

-	$number = esc_attr( $number );
-	$title  = esc_attr( $title );
-	$url    = esc_url( $url );
-	$items  = (int) $items;
-	if ( $items < 1 || 20 < $items )
+	$number = esc_attr( $inputs['number'] );
+	$title  = esc_attr( $inputs['title'] );
+	$url    = esc_url( $inputs['url'] );
+	$items  = (int) $inputs['items'];
+	if ( $items < 1 || 20 < $items ) {
 		$items  = 10;
-	$show_summary   = (int) $show_summary;
-	$show_author    = (int) $show_author;
-	$show_date      = (int) $show_date;
+	}
+	$show_summary   = (int) $inputs['show_summary'];
+	$show_author    = (int) $inputs['show_author'];
+	$show_date      = (int) $inputs['show_date'];

-	if ( !empty($error) )
+	if ( ! empty( $error ) ) {
 		echo '<p class="widget-error"><strong>' . sprintf( __('RSS Error: %s'), $error) . '</strong></p>';
+	}

 	if ( $inputs['url'] ) :
 ?>
@@ -1137,8 +1155,9 @@
 	<p><label for="rss-items-<?php echo $number; ?>"><?php _e('How many items would you like to display?'); ?></label>
 	<select id="rss-items-<?php echo $number; ?>" name="widget-rss[<?php echo $number; ?>][items]">
 <?php
-		for ( $i = 1; $i <= 20; ++$i )
+		for ( $i = 1; $i <= 20; ++$i ) {
 			echo "<option value='$i' " . selected( $items, $i, false ) . ">$i</option>";
+		}
 ?>
 	</select></p>
 <?php endif; if ( $inputs['show_summary'] ) : ?>
@@ -1180,8 +1199,9 @@
  */
 function wp_widget_rss_process( $widget_rss, $check_feed = true ) {
 	$items = (int) $widget_rss['items'];
-	if ( $items < 1 || 20 < $items )
+	if ( $items < 1 || 20 < $items ) {
 		$items = 10;
+	}
 	$url           = esc_url_raw( strip_tags( $widget_rss['url'] ) );
 	$title         = isset( $widget_rss['title'] ) ? trim( strip_tags( $widget_rss['title'] ) ) : '';
 	$show_summary  = isset( $widget_rss['show_summary'] ) ? (int) $widget_rss['show_summary'] : 0;
@@ -1220,7 +1240,6 @@
 	}

 	function widget( $args, $instance ) {
-		extract($args);
 		$current_taxonomy = $this->_get_current_taxonomy($instance);
 		if ( !empty($instance['title']) ) {
 			$title = $instance['title'];
@@ -1236,9 +1255,10 @@
 		/** This filter is documented in wp-includes/default-widgets.php */
 		$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );

-		echo $before_widget;
-		if ( $title )
-			echo $before_title . $title . $after_title;
+		echo $args['before_widget'];
+		if ( $title ) {
+			echo $args['before_title'] . $title . $args['after_title'];
+		}
 		echo '<div class="tagcloud">';

 		/**
@@ -1256,7 +1276,7 @@
 		) ) );

 		echo "</div>\n";
-		echo $after_widget;
+		echo $args['after_widget'];
 	}

 	function update( $new_instance, $old_instance ) {
@@ -1274,8 +1294,9 @@
 	<select class="widefat" id="<?php echo $this->get_field_id('taxonomy'); ?>" name="<?php echo $this->get_field_name('taxonomy'); ?>">
 	<?php foreach ( get_taxonomies() as $taxonomy ) :
 				$tax = get_taxonomy($taxonomy);
-				if ( !$tax->show_tagcloud || empty($tax->labels->name) )
+				if ( ! $tax->show_tagcloud || empty( $tax->labels->name ) ) {
 					continue;
+				}
 	?>
 		<option value="<?php echo esc_attr($taxonomy) ?>" <?php selected($taxonomy, $current_taxonomy) ?>><?php echo $tax->labels->name; ?></option>
 	<?php endforeach; ?>
@@ -1283,8 +1304,9 @@
 	}

 	function _get_current_taxonomy($instance) {
-		if ( !empty($instance['taxonomy']) && taxonomy_exists($instance['taxonomy']) )
+		if ( ! empty( $instance['taxonomy'] ) && taxonomy_exists( $instance['taxonomy'] ) ) {
 			return $instance['taxonomy'];
+		}

 		return 'post_tag';
 	}
@@ -1306,8 +1328,9 @@
 		// Get menu
 		$nav_menu = ! empty( $instance['nav_menu'] ) ? wp_get_nav_menu_object( $instance['nav_menu'] ) : false;

-		if ( !$nav_menu )
+		if ( ! $nav_menu ) {
 			return;
+		}

 		/** This filter is documented in wp-includes/default-widgets.php */
 		$instance['title'] = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
@@ -1314,8 +1337,9 @@

 		echo $args['before_widget'];

-		if ( !empty($instance['title']) )
+		if ( ! empty( $instance['title'] ) ) {
 			echo $args['before_title'] . $instance['title'] . $args['after_title'];
+		}

 		wp_nav_menu( array( 'fallback_cb' => '', 'menu' => $nav_menu ) );

@@ -1371,8 +1395,9 @@
  * @since 2.2.0
  */
 function wp_widgets_init() {
-	if ( !is_blog_installed() )
+	if ( ! is_blog_installed() ) {
 		return;
+	}

 	register_widget('WP_Widget_Pages');

@@ -1380,8 +1405,9 @@

 	register_widget('WP_Widget_Archives');

-	if ( get_option( 'link_manager_enabled' ) )
+	if ( get_option( 'link_manager_enabled' ) ) {
 		register_widget('WP_Widget_Links');
+	}

 	register_widget('WP_Widget_Meta');
