diff -u -r1.269 functions.php
--- wp-includes/functions.php	19 Feb 2005 04:17:34 -0000	1.269
+++ wp-includes/functions.php	19 Feb 2005 20:17:15 -0000
@@ -871,7 +871,8 @@
 function apply_filters($tag, $string) {
 	global $wp_filter;
 	
-	$args = array_slice(func_get_args(), 3);
+	$args = array_slice(func_get_args(), 2);
+	$all_args = array_merge(array($string), $args);
 
 	merge_filters($tag);
 	
@@ -879,7 +880,31 @@
 		foreach ($wp_filter[$tag] as $priority => $functions) {
 			if (!is_null($functions)) {
 				foreach($functions as $function) {
-					$string = call_user_func_array($function, array($string) + $args);
+					$accepted_args = 1;
+
+					if (!is_array($function)) {
+						$args_marker = strrpos($function, ':');
+						if ($args_marker > 0) {
+							$accepted_args = intval(substr($function, $args_marker+1));
+							$function = substr($function, 0, $args_marker);
+						}
+					} else {
+						$args_marker = strrpos($function[1], ':');
+						if ($args_marker > 0) {
+							$accepted_args = intval(substr($function[1], $args_marker+1));
+							$function[1] = substr($function[1], 0, $args_marker);
+						}
+					}
+
+					if ($accepted_args > 0) {
+						$args = array_slice($all_args, 0, $accepted_args);
+					} elseif($accepted_args == 0) {
+						$args = NULL;
+					} else {
+						$args = $all_args;
+					}
+
+					$string = call_user_func_array($function, $args);
 				}
 			}
 		}

