Index: /trunk/src/includes/core/cache.php
===================================================================
--- /trunk/src/includes/core/cache.php	(revision 6413)
+++ /trunk/src/includes/core/cache.php	(revision 6414)
@@ -181,9 +181,10 @@
 	// Loop through query types and clean caches
 	foreach ( $post_types as $post_type ) {
-		wp_cache_delete( 'bbp_parent_all_' . $post->ID . '_type_' . $post_type . '_child_ids', 'bbpress_posts' );
-	}
-
-	/**
-	 * Fires immediately after the given post's cache is cleaned.
+		$key = 'bbp_parent_all_' . $post->ID . '_type_' . $post_type . '_child_ids';
+		wp_cache_delete( $key, 'bbpress_posts' );
+	}
+
+	/**
+	 * Fires immediately after the given post cache is cleaned.
 	 *
 	 * @since 2.1.0
Index: /trunk/src/includes/forums/functions.php
===================================================================
--- /trunk/src/includes/forums/functions.php	(revision 6413)
+++ /trunk/src/includes/forums/functions.php	(revision 6414)
@@ -2090,27 +2090,20 @@
 
 	// Setup arrays
-	$private = $hidden = $meta_query = $forum_ids = array();
+	$forum_ids = array();
 
 	// Capability performance optimization
 	if ( ! empty( $types[ $type ] ) ) {
-		$retval = $types[ $type ];
-
-	// Populate forum exclude type
+		$retval    = $types[ $type ];
+		$forum_ids = $types['array'];
+
+	// Populate forum types
 	} else {
 
-		// Default return value
-		switch ( $type ) {
-			case 'string' :
-				$retval = '';
-				break;
-
-			case 'array'  :
-				$retval = array();
-				break;
-
-			case 'meta_query' :
-				$retval = array( array() ) ;
-				break;
-		}
+		// Types
+		$types = array(
+			'array'      => array(),
+			'string'     => '',
+			'meta_query' => array()
+		);
 
 		// Exclude for everyone but keymasters
@@ -2118,46 +2111,38 @@
 
 			// Private forums
-			if ( ! current_user_can( 'read_private_forums' ) ) {
-				$private = bbp_get_private_forum_ids();
+			$private = ! current_user_can( 'read_private_forums' )
+				? bbp_get_private_forum_ids()
+				: array();
+
+			// Hidden forums
+			$hidden = ! current_user_can( 'read_hidden_forums' )
+				? bbp_get_hidden_forum_ids()
+				: array();
+
+			// Merge private and hidden forums together and remove any empties
+			$forum_ids = ( ! empty( $private ) || ! empty( $hidden ) )
+				? array_filter( wp_parse_id_list( array_merge( $private, $hidden ) ) )
+				: array();
+
+			// Comparison
+			$compare = ( 1 < count( $forum_ids ) )
+				? 'NOT IN'
+				: '!=';
+
+			// Store return values in static types array
+			if ( ! empty( $forum_ids ) ) {
+				$types['array']      = $forum_ids;
+				$types['string']     = implode( ',', $forum_ids );
+				$types['meta_query'] = array(
+					'key'     => '_bbp_forum_id',
+					'value'   => $forum_ids,
+					'type'    => 'NUMERIC',
+					'compare' => $compare
+				);
 			}
-
-			// Hidden forums
-			if ( ! current_user_can( 'read_hidden_forums' ) ) {
-				$hidden  = bbp_get_hidden_forum_ids();
-			}
-
-			// Merge private and hidden forums together
-			$forum_ids = (array) array_filter( wp_parse_id_list( array_merge( $private, $hidden ) ) );
-
-			// There are forums that need to be excluded
-			if ( ! empty( $forum_ids ) ) {
-
-				switch ( $type ) {
-
-					// Separate forum ID's into a comma separated string
-					case 'string' :
-						$retval = implode( ',', $forum_ids );
-						break;
-
-					// Use forum_ids array
-					case 'array'  :
-						$retval = $forum_ids;
-						break;
-
-					// Build a meta_query
-					case 'meta_query' :
-						$retval = array(
-							'key'     => '_bbp_forum_id',
-							'value'   => implode( ',', $forum_ids ),
-							'type'    => 'NUMERIC',
-							'compare' => ( 1 < count( $forum_ids ) ) ? 'NOT IN' : '!='
-						);
-						break;
-				}
-			}
-		}
-
-		// Store return value in static types array
-		$types[ $type ] = $retval;
+		}
+
+		// There are forums that need to be excluded
+		$retval = $types[ $type ];
 	}
 
@@ -2260,5 +2245,5 @@
 
 		// Bail if no forums to exclude
-		if ( ! array_filter( $forum_ids ) ) {
+		if ( empty( $forum_ids ) ) {
 			return;
 		}
@@ -2570,9 +2555,9 @@
 
 	// Allowed post statuses to pre-trash
-	$post_stati = implode( ',', array(
+	$post_stati = array(
 		bbp_get_public_status_id(),
 		bbp_get_closed_status_id(),
 		bbp_get_pending_status_id()
-	) );
+	);
 
 	// Forum is being trashed, so its topics and replies are trashed too
Index: /trunk/src/includes/forums/template.php
===================================================================
--- /trunk/src/includes/forums/template.php	(revision 6413)
+++ /trunk/src/includes/forums/template.php	(revision 6414)
@@ -722,5 +722,5 @@
 		'post_parent'         => 0,
 		'post_type'           => bbp_get_forum_post_type(),
-		'post_status'         => implode( ',', $post_stati ),
+		'post_status'         => $post_stati,
 		'posts_per_page'      => get_option( '_bbp_forums_per_page', 50 ),
 		'orderby'             => 'menu_order title',
Index: /trunk/src/includes/replies/template.php
===================================================================
--- /trunk/src/includes/replies/template.php	(revision 6413)
+++ /trunk/src/includes/replies/template.php	(revision 6414)
@@ -168,5 +168,5 @@
 
 		// Join post statuses together
-		$default['post_status'] = implode( ',', $post_statuses );
+		$default['post_status'] = $post_statuses;
 
 	// Lean on the 'perm' query var value of 'readable' to provide statuses
Index: /trunk/src/includes/search/template.php
===================================================================
--- /trunk/src/includes/search/template.php	(revision 6413)
+++ /trunk/src/includes/search/template.php	(revision 6414)
@@ -80,5 +80,5 @@
 
 		// Join post statuses together
-		$default['post_status'] = implode( ',', $post_statuses );
+		$default['post_status'] = $post_statuses;
 
 	// Lean on the 'perm' query var value of 'readable' to provide statuses
Index: /trunk/src/includes/topics/template.php
===================================================================
--- /trunk/src/includes/topics/template.php	(revision 6413)
+++ /trunk/src/includes/topics/template.php	(revision 6414)
@@ -184,5 +184,5 @@
 
 		// Join post statuses together
-		$default['post_status'] = implode( ',', $post_statuses );
+		$default['post_status'] = $post_statuses;
 
 	// Lean on the 'perm' query var value of 'readable' to provide statuses
Index: /trunk/src/includes/users/template.php
===================================================================
--- /trunk/src/includes/users/template.php	(revision 6413)
+++ /trunk/src/includes/users/template.php	(revision 6414)
@@ -2287,31 +2287,10 @@
 function bbp_get_forums_for_current_user( $args = array() ) {
 
-	// Setup arrays
-	$private = $hidden = $exclude = array();
-
-	// Private forums
-	if ( ! current_user_can( 'read_private_forums' ) ) {
-		$private = bbp_get_private_forum_ids();
-	}
-
-	// Hidden forums
-	if ( ! current_user_can( 'read_hidden_forums' ) ) {
-		$hidden  = bbp_get_hidden_forum_ids();
-	}
-
-	// Merge private and hidden forums together and remove any empties
-	$forum_ids = (array) array_filter( wp_parse_id_list( array_merge( $private, $hidden ) ) );
-
-	// There are forums that need to be excluded
-	if ( ! empty( $forum_ids ) ) {
-		$exclude = implode( ',', $forum_ids );
-	}
-
 	// Parse arguments against default values
 	$r = bbp_parse_args( $args, array(
-		'post_type'   => bbp_get_forum_post_type(),
-		'post_status' => bbp_get_public_status_id(),
-		'numberposts' => -1,
-		'exclude'     => $exclude
+		'post_type'    => bbp_get_forum_post_type(),
+		'post_status'  => bbp_get_public_status_id(),
+		'post__not_in' => bbp_exclude_forum_ids( 'array' ),
+		'numberposts'  => -1
 	), 'get_forums_for_current_user' );
 
@@ -2324,5 +2303,5 @@
 	}
 
-	return apply_filters( 'bbp_get_forums_for_current_user', $forums );
+	return apply_filters( 'bbp_get_forums_for_current_user', $forums, $r, $args );
 }
 
