Index: wp-includes/default-filters.php
===================================================================
--- wp-includes/default-filters.php	(revision 15382)
+++ wp-includes/default-filters.php	(working copy)
@@ -13,101 +13,85 @@
  */
 
 // Strip, trim, kses, special chars for string saves
-foreach ( array( 'pre_term_name', 'pre_comment_author_name', 'pre_link_name', 'pre_link_target', 'pre_link_rel', 'pre_user_display_name', 'pre_user_first_name', 'pre_user_last_name', 'pre_user_nickname' ) as $filter ) {
-	add_filter( $filter, 'sanitize_text_field'  );
-	add_filter( $filter, 'wp_filter_kses'       );
-	add_filter( $filter, '_wp_specialchars', 30 );
-}
+$filters = array( 'pre_term_name', 'pre_comment_author_name', 'pre_link_name', 'pre_link_target', 'pre_link_rel', 'pre_user_display_name', 'pre_user_first_name', 'pre_user_last_name', 'pre_user_nickname' );
+add_filter( $filters, 'sanitize_text_field'  );
+add_filter( $filters, 'wp_filter_kses'       );
+add_filter( $filters, '_wp_specialchars', 30 );
 
 // Strip, kses, special chars for string display
-foreach ( array( 'term_name', 'comment_author_name', 'link_name', 'link_target', 'link_rel', 'user_display_name', 'user_first_name', 'user_last_name', 'user_nickname' ) as $filter ) {
-	add_filter( $filter, 'sanitize_text_field'  );
-	add_filter( $filter, 'wp_kses_data'       );
-	add_filter( $filter, '_wp_specialchars', 30 );
-}
+$filters = array( 'term_name', 'comment_author_name', 'link_name', 'link_target', 'link_rel', 'user_display_name', 'user_first_name', 'user_last_name', 'user_nickname' );
+add_filter( $filters, 'sanitize_text_field'  );
+add_filter( $filters, 'wp_kses_data'       );
+add_filter( $filters, '_wp_specialchars', 30 );
 
 // Kses only for textarea saves
-foreach ( array( 'pre_term_description', 'pre_link_description', 'pre_link_notes', 'pre_user_description' ) as $filter ) {
-	add_filter( $filter, 'wp_filter_kses' );
-}
+$filters = array( 'pre_term_description', 'pre_link_description', 'pre_link_notes', 'pre_user_description' );
+add_filter( $filters, 'wp_filter_kses' );
 
 // Kses only for textarea saves displays
-foreach ( array( 'term_description', 'link_description', 'link_notes', 'user_description' ) as $filter ) {
-	add_filter( $filter, 'wp_kses_data' );
-}
+$filters = array( 'term_description', 'link_description', 'link_notes', 'user_description' );
+add_filter( $filters, 'wp_kses_data' );
 
 // Email saves
-foreach ( array( 'pre_comment_author_email', 'pre_user_email' ) as $filter ) {
-	add_filter( $filter, 'trim'           );
-	add_filter( $filter, 'sanitize_email' );
-	add_filter( $filter, 'wp_filter_kses' );
-}
+$filters = array( 'pre_comment_author_email', 'pre_user_email' );
+add_filter( $filters, 'trim'           );
+add_filter( $filters, 'sanitize_email' );
+add_filter( $filters, 'wp_filter_kses' );
 
 // Email display
-foreach ( array( 'comment_author_email', 'user_email' ) as $filter ) {
-	add_filter( $filter, 'sanitize_email' );
-	add_filter( $filter, 'wp_kses_data' );
-}
+$filters = array( 'comment_author_email', 'user_email' );
+add_filter( $filters, 'sanitize_email' );
+add_filter( $filters, 'wp_kses_data' );
 
 // Save URL
-foreach ( array( 'pre_comment_author_url', 'pre_user_url', 'pre_link_url', 'pre_link_image',
-	'pre_link_rss' ) as $filter ) {
-	add_filter( $filter, 'wp_strip_all_tags' );
-	add_filter( $filter, 'esc_url_raw'       );
-	add_filter( $filter, 'wp_filter_kses'    );
-}
+$filters = array( 'pre_comment_author_url', 'pre_user_url', 'pre_link_url', 'pre_link_image', 'pre_link_rss' );
+add_filter( $filters, 'wp_strip_all_tags' );
+add_filter( $filters, 'esc_url_raw'       );
+add_filter( $filters, 'wp_filter_kses'    );
 
 // Display URL
-foreach ( array( 'user_url', 'link_url', 'link_image', 'link_rss', 'comment_url' ) as $filter ) {
-	add_filter( $filter, 'wp_strip_all_tags' );
-	add_filter( $filter, 'esc_url'           );
-	add_filter( $filter, 'wp_kses_data'    );
-}
+$filters = array( 'user_url', 'link_url', 'link_image', 'link_rss', 'comment_url' );
+add_filter( $filters, 'wp_strip_all_tags' );
+add_filter( $filters, 'esc_url'           );
+add_filter( $filters, 'wp_kses_data'    );
 
 // Slugs
-foreach ( array( 'pre_term_slug' ) as $filter ) {
-	add_filter( $filter, 'sanitize_title' );
-}
+$filters = array( 'pre_term_slug' );
+add_filter( $filters, 'sanitize_title' );
 
 // Keys
-foreach ( array( 'pre_post_type' ) as $filter ) {
-	add_filter( $filter, 'sanitize_user' );
-}
+$filters = array( 'pre_post_type' );
+add_filter( $filters, 'sanitize_user' );
 
 // Places to balance tags on input
-foreach ( array( 'content_save_pre', 'excerpt_save_pre', 'comment_save_pre', 'pre_comment_content' ) as $filter ) {
-	add_filter( $filter, 'balanceTags', 50 );
-}
+$filters = array( 'content_save_pre', 'excerpt_save_pre', 'comment_save_pre', 'pre_comment_content' );
+add_filter( $filters, 'balanceTags', 50 );
 
 // Format strings for display.
-foreach ( array( 'comment_author', 'term_name', 'link_name', 'link_description', 'link_notes', 'bloginfo', 'wp_title', 'widget_title' ) as $filter ) {
-	add_filter( $filter, 'wptexturize'   );
-	add_filter( $filter, 'convert_chars' );
-	add_filter( $filter, 'esc_html'      );
-}
+$filters = array( 'comment_author', 'term_name', 'link_name', 'link_description', 'link_notes', 'bloginfo', 'wp_title', 'widget_title' );
+add_filter( $filters, 'wptexturize'   );
+add_filter( $filters, 'convert_chars' );
+add_filter( $filters, 'esc_html'      );
 
 // Format WordPress
-foreach ( array( 'the_content', 'the_title', 'comment_text' ) as $filter )
-	add_filter( $filter, 'capital_P_dangit', 11 );
+$filters = array( 'the_content', 'the_title', 'comment_text' );
+add_filter( $filters, 'capital_P_dangit', 11 );
 
 // Format titles
-foreach ( array( 'single_post_title', 'single_cat_title', 'single_tag_title', 'single_month_title', 'nav_menu_attr_title', 'nav_menu_description' ) as $filter ) {
-	add_filter( $filter, 'wptexturize' );
-	add_filter( $filter, 'strip_tags'  );
-}
+$filters = array( 'single_post_title', 'single_cat_title', 'single_tag_title', 'single_month_title', 'nav_menu_attr_title', 'nav_menu_description' );
+add_filter( $filters, 'wptexturize' );
+add_filter( $filters, 'strip_tags'  );
 
 // Format text area for display.
-foreach ( array( 'term_description' ) as $filter ) {
-	add_filter( $filter, 'wptexturize'      );
-	add_filter( $filter, 'convert_chars'    );
-	add_filter( $filter, 'wpautop'          );
-	add_filter( $filter, 'shortcode_unautop');
-}
+$filters = array( 'term_description' );
+add_filter( $filters, 'wptexturize'      );
+add_filter( $filters, 'convert_chars'    );
+add_filter( $filters, 'wpautop'          );
+add_filter( $filters, 'shortcode_unautop');
 
 // Format for RSS
-foreach ( array( 'term_name_rss' ) as $filter ) {
-	add_filter( $filter, 'convert_chars' );
-}
+$filters = array( 'term_name_rss' );
+add_filter( $filters, 'convert_chars' );
 
 // Display filters
 add_filter( 'the_title', 'wptexturize'   );
@@ -200,9 +184,8 @@
 add_action( 'template_redirect',   'wp_shortlink_header',           11, 0 );
 
 // Feed Generator Tags
-foreach ( array( 'rss2_head', 'commentsrss2_head', 'rss_head', 'rdf_header', 'atom_head', 'comments_atom_head', 'opml_head', 'app_head' ) as $action ) {
-	add_action( $action, 'the_generator' );
-}
+$actions = array( 'rss2_head', 'commentsrss2_head', 'rss_head', 'rdf_header', 'atom_head', 'comments_atom_head', 'opml_head', 'app_head' );
+add_action( $actions, 'the_generator' );
 
 // WP Cron
 if ( !defined( 'DOING_CRON' ) )
@@ -253,4 +236,5 @@
 add_action( 'admin_init', 'register_admin_color_schemes', 1);
 add_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );
 
+unset( $filters, $actions );
 ?>
Index: wp-includes/plugin.php
===================================================================
--- wp-includes/plugin.php	(revision 15382)
+++ wp-includes/plugin.php	(working copy)
@@ -56,18 +56,19 @@
  *	wp_filter['tag']['array of priorities']['array of functions serialized']['array of ['array (functions, accepted_args)']']
  * @global array $merged_filters Tracks the tags that need to be merged for later. If the hook is added, it doesn't need to run through that process.
  *
- * @param string $tag The name of the filter to hook the $function_to_add to.
+ * @param mixed $tags The name of the filter(s) to hook the $function_to_add to, can either be a string or array of strings.
  * @param callback $function_to_add The name of the function to be called when the filter is applied.
  * @param int $priority optional. Used to specify the order in which the functions associated with a particular action are executed (default: 10). Lower numbers correspond with earlier execution, and functions with the same priority are executed in the order in which they were added to the action.
  * @param int $accepted_args optional. The number of arguments the function accept (default 1).
  * @return boolean true
  */
-function add_filter($tag, $function_to_add, $priority = 10, $accepted_args = 1) {
+function add_filter($tags, $function_to_add, $priority = 10, $accepted_args = 1) {
 	global $wp_filter, $merged_filters;
-
-	$idx = _wp_filter_build_unique_id($tag, $function_to_add, $priority);
-	$wp_filter[$tag][$priority][$idx] = array('function' => $function_to_add, 'accepted_args' => $accepted_args);
-	unset( $merged_filters[ $tag ] );
+	foreach ( (array) $tags as $tag ) {
+		$idx = _wp_filter_build_unique_id($tag, $function_to_add, $priority);
+		$wp_filter[$tag][$priority][$idx] = array('function' => $function_to_add, 'accepted_args' => $accepted_args);
+		unset( $merged_filters[ $tag ] );
+	}
 	return true;
 }
 
@@ -316,13 +317,13 @@
  * @subpackage Plugin
  * @since 1.2
  *
- * @param string $tag The name of the action to which the $function_to_add is hooked.
+ * @param mixed $tags The name of the action(s) to which the $function_to_add is hooked, can either be a string or array of strings.
  * @param callback $function_to_add The name of the function you wish to be called.
  * @param int $priority optional. Used to specify the order in which the functions associated with a particular action are executed (default: 10). Lower numbers correspond with earlier execution, and functions with the same priority are executed in the order in which they were added to the action.
  * @param int $accepted_args optional. The number of arguments the function accept (default 1).
  */
-function add_action($tag, $function_to_add, $priority = 10, $accepted_args = 1) {
-	return add_filter($tag, $function_to_add, $priority, $accepted_args);
+function add_action($tags, $function_to_add, $priority = 10, $accepted_args = 1) {
+	return add_filter($tags, $function_to_add, $priority, $accepted_args);
 }
 
 
