# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
--- /Users/mweichert/Downloads/capabilities (1).php
+++ /Users/mweichert/Downloads/capabilities.php
@@ -1110,6 +1110,33 @@
 }
 
 /**
+ * Whether a particular user has a capability or role for a given blog
+ *
+ * @since 3.1.1
+ *
+ * @param int $user User ID or WP_User object
+ * @param int $blog_id Blog ID
+ * @param string $capability Capability or role name
+ * @return bool
+ */
+function user_can_for_blog( $user, $blog_id, $capability) {
+    if ( ! is_object( $user ) )
+        $user = new WP_User( $user );
+
+    if ( ! $user || ! $user->ID )
+        return false;
+
+    // Set the blog id.  @todo add blog id arg to WP_User constructor?
+    $user->for_blog( $blog_id );
+
+    $args = array_slice( func_get_args(), 3 );
+    die(print_r($args));
+    $args = array_merge( array( $capability ), $args );
+
+    return call_user_func_array( array( &$user, 'has_cap' ), $args );
+}
+
+/**
  * Retrieve role object.
  *
  * @see WP_Roles::get_role() Uses method to retrieve role object.
