Index: wp-includes/plugin.php
===================================================================
--- wp-includes/plugin.php	(revision 22265)
+++ wp-includes/plugin.php	(working copy)
@@ -335,6 +335,60 @@
 }
 
 /**
+ * Hooks a function to a specific action, AND allows you to pass custom arguments to that function
+ *
+ * @uses Add_Action_Handler to prop up our function and send it the args
+ *
+ * @package WordPress
+ * @subpackage Plugin
+ *
+ * @param string $tag
+ * @param callback $callback
+ * @param int $priority
+ * @param null $args one or more arguments to pass to hooked function.
+ */
+function add_action_with_args( $tag, $callback, $priority = 10, $args = null ) {
+
+	// Accept as many different args as we're passed
+	$args = array_slice(func_get_args(), 3);
+
+	return add_action( $tag, array( new Add_Action_Handler( $args, $callback ), 'action' ), $priority, 1 );
+}
+
+/**
+ * Helper class for add_action_with_args()
+ *
+ * @uses Add_Action_Handler to prop up our function and send it the args
+ *
+ * @package WordPress
+ * @subpackage Plugin
+ *
+ * @param array $args 		Arguments to pass through to a given callback
+ * @param string $callback  The callback to run
+ */
+class Add_Action_Handler {
+
+	private $args;
+	private $callback;
+
+	function __construct($args, $callback = null) {
+
+		$this->args = $args;
+		$this->callback = $callback;
+	}
+
+	function action() {
+
+		call_user_func_array($this->callback, $this->args);
+
+		if( func_num_args() )
+			return func_get_arg(0);
+
+		return null;
+	}
+}
+
+/**
  * Execute functions hooked on a specific action hook.
  *
  * This function invokes all functions attached to action hook $tag. It is
