diff --git a/wp-content/plugins/buddypress/bp-activity/bp-activity-actions.php b/wp-content/plugins/buddypress/bp-activity/bp-activity-actions.php
index 21651a6b540931ebcd71aec30cc18a405ddee915..a266e9597ea6ea19da7ce815c1db49b402a40fc4 100644
--- a/wp-content/plugins/buddypress/bp-activity/bp-activity-actions.php
+++ b/wp-content/plugins/buddypress/bp-activity/bp-activity-actions.php
@@ -45,14 +45,13 @@ add_action( 'bp_init', 'bp_register_activity_actions', 8 );
  * @return bool False on failure
  */
 function bp_activity_action_permalink_router() {
-	global $bp;
 
 	// Not viewing activity
-	if ( !bp_is_activity_component() || !bp_is_current_action( 'p' ) )
+	if ( ! bp_is_activity_component() || ! bp_is_current_action( 'p' ) )
 		return false;
 
 	// No activity to display
-	if ( !bp_action_variable( 0 ) || !is_numeric( bp_action_variable( 0 ) ) )
+	if ( ! bp_action_variable( 0 ) || ! is_numeric( bp_action_variable( 0 ) ) )
 		return false;
 
 	// Get the activity details
@@ -62,7 +61,6 @@ function bp_activity_action_permalink_router() {
 	if ( empty( $activity['activities'][0] ) ) {
 		bp_do_404();
 		return;
-
 	} else {
 		$activity = $activity['activities'][0];
 	}
@@ -71,10 +69,10 @@ function bp_activity_action_permalink_router() {
 	$redirect = false;
 
 	// Redirect based on the type of activity
-	if ( bp_is_active( 'groups' ) && $activity->component == $bp->groups->id ) {
+	if ( bp_is_active( 'groups' ) && $activity->component == buddypress()->groups->id ) {
 
 		// Activity is a user update
-		if ( !empty( $activity->user_id ) ) {
+		if ( ! empty( $activity->user_id ) ) {
 			$redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . bp_get_activity_slug() . '/' . $activity->id . '/';
 
 		// Activity is something else
@@ -87,20 +85,21 @@ function bp_activity_action_permalink_router() {
 		}
 
 	// Set redirect to users' activity stream
-	} else {
+	} else if ( ! empty( $activity->user_id ) ) {
 		$redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . bp_get_activity_slug() . '/' . $activity->id . '/';
 	}
 
 	// If set, add the original query string back onto the redirect URL
-	if ( !empty( $_SERVER['QUERY_STRING'] ) ) {
+	if ( ! empty( $_SERVER['QUERY_STRING'] ) ) {
 		$query_frags = array();
 		wp_parse_str( $_SERVER['QUERY_STRING'], $query_frags );
 		$redirect = add_query_arg( urlencode_deep( $query_frags ), $redirect );
 	}
 
 	// Allow redirect to be filtered
-	if ( !$redirect = apply_filters_ref_array( 'bp_activity_permalink_redirect_url', array( $redirect, &$activity ) ) )
+	if ( ! $redirect = apply_filters_ref_array( 'bp_activity_permalink_redirect_url', array( $redirect, &$activity ) ) ) {
 		bp_core_redirect( bp_get_root_domain() );
+	}
 
 	// Redirect to the actual activity permalink page
 	bp_core_redirect( $redirect );
@@ -422,16 +421,22 @@ add_action( 'bp_actions', 'bp_activity_action_remove_favorite' );
  * @return bool False on failure
  */
 function bp_activity_action_sitewide_feed() {
-	global $bp, $wp_query;
+	global $bp;
 
-	if ( !bp_is_activity_component() || !bp_is_current_action( 'feed' ) || bp_is_user() || !empty( $bp->groups->current_group ) )
+	if ( ! bp_is_activity_component() || ! bp_is_current_action( 'feed' ) || bp_is_user() || ! empty( $bp->groups->current_group ) )
 		return false;
 
-	$wp_query->is_404 = false;
-	status_header( 200 );
+	// setup the feed
+	buddypress()->activity->feed = new BP_Activity_Feed( array(
+		'id'            => 'sitewide',
+
+		/* translators: Sitewide activity RSS title - "[Site Name] | Site Wide Activity" */
+		'title'         => sprintf( __( '%s | Site Wide Activity', 'buddypress' ), bp_get_site_name() ),
 
-	include_once( 'feeds/bp-activity-sitewide-feed.php' );
-	die;
+		'link'          => bp_get_activity_directory_permalink(),
+		'description'   => __( 'Activity feed for the entire site.', 'buddypress' ),
+		'activity_args' => 'display_comments=threaded'
+	) );
 }
 add_action( 'bp_actions', 'bp_activity_action_sitewide_feed' );
 
@@ -448,16 +453,21 @@ add_action( 'bp_actions', 'bp_activity_action_sitewide_feed' );
  * @return bool False on failure
  */
 function bp_activity_action_personal_feed() {
-	global $wp_query;
-
-	if ( !bp_is_user_activity() || !bp_is_current_action( 'feed' ) )
+	if ( ! bp_is_user_activity() || ! bp_is_current_action( 'feed' ) ) {
 		return false;
+	}
+
+	// setup the feed
+	buddypress()->activity->feed = new BP_Activity_Feed( array(
+		'id'            => 'personal',
 
-	$wp_query->is_404 = false;
-	status_header( 200 );
+		/* translators: Personal activity RSS title - "[Site Name] | [User Display Name] | Activity" */
+		'title'         => sprintf( __( '%1$s | %2$s | Activity', 'buddypress' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),
 
-	include_once( 'feeds/bp-activity-personal-feed.php' );
-	die;
+		'link'          => trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() ),
+		'description'   => sprintf( __( 'Activity feed for %s.', 'buddypress' ), bp_get_displayed_user_fullname() ),
+		'activity_args' => 'user_id=' . bp_displayed_user_id()
+	) );
 }
 add_action( 'bp_actions', 'bp_activity_action_personal_feed' );
 
@@ -477,16 +487,21 @@ add_action( 'bp_actions', 'bp_activity_action_personal_feed' );
  * @return bool False on failure
  */
 function bp_activity_action_friends_feed() {
-	global $wp_query;
-
-	if ( !bp_is_active( 'friends' ) || !bp_is_user_activity() || !bp_is_current_action( bp_get_friends_slug() ) || !bp_is_action_variable( 'feed', 0 ) )
+	if ( ! bp_is_active( 'friends' ) || ! bp_is_user_activity() || ! bp_is_current_action( bp_get_friends_slug() ) || ! bp_is_action_variable( 'feed', 0 ) ) {
 		return false;
+	}
+
+	// setup the feed
+	buddypress()->activity->feed = new BP_Activity_Feed( array(
+		'id'            => 'friends',
 
-	$wp_query->is_404 = false;
-	status_header( 200 );
+		/* translators: Friends activity RSS title - "[Site Name] | [User Display Name] | Friends Activity" */
+		'title'         => sprintf( __( '%1$s | %2$s | Friends Activity', 'buddypress' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),
 
-	include_once( 'feeds/bp-activity-friends-feed.php' );
-	die;
+		'link'          => trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() ),
+		'description'   => sprintf( __( "Activity feed for %s's friends.", 'buddypress' ), bp_get_displayed_user_fullname() ),
+		'activity_args' => 'scope=friends'
+	) );
 }
 add_action( 'bp_actions', 'bp_activity_action_friends_feed' );
 
@@ -506,16 +521,29 @@ add_action( 'bp_actions', 'bp_activity_action_friends_feed' );
  * @return bool False on failure
  */
 function bp_activity_action_my_groups_feed() {
-	global $wp_query;
-
-	if ( !bp_is_active( 'groups' ) || !bp_is_user_activity() || !bp_is_current_action( bp_get_groups_slug() ) || !bp_is_action_variable( 'feed', 0 ) )
+	if ( ! bp_is_active( 'groups' ) || ! bp_is_user_activity() || ! bp_is_current_action( bp_get_groups_slug() ) || ! bp_is_action_variable( 'feed', 0 ) ) {
 		return false;
+	}
 
-	$wp_query->is_404 = false;
-	status_header( 200 );
-
-	include_once( 'feeds/bp-activity-mygroups-feed.php' );
-	die;
+	// get displayed user's group IDs
+	$groups    = groups_get_user_groups();
+	$group_ids = implode( ',', $groups['groups'] );
+
+	// setup the feed
+	buddypress()->activity->feed = new BP_Activity_Feed( array(
+		'id'            => 'mygroups',
+
+		/* translators: Member groups activity RSS title - "[Site Name] | [User Display Name] | Groups Activity" */
+		'title'         => sprintf( __( '%1$s | %2$s | Group Activity', 'buddypress' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),
+
+		'link'          => trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() ),
+		'description'   => sprintf( __( "Public group activity feed of which %s is a member of.", 'buddypress' ), bp_get_displayed_user_fullname() ),
+		'activity_args' => array(
+			'object'           => buddypress()->groups->id,
+			'primary_id'       => $group_ids,
+			'display_comments' => 'threaded'
+		)
+	) );
 }
 add_action( 'bp_actions', 'bp_activity_action_my_groups_feed' );
 
@@ -533,16 +561,27 @@ add_action( 'bp_actions', 'bp_activity_action_my_groups_feed' );
  * @return bool False on failure
  */
 function bp_activity_action_mentions_feed() {
-	global $wp_query;
+	if ( ! bp_activity_do_mentions() ) {
+		return false;
+	}
 
-	if ( !bp_is_user_activity() || !bp_is_current_action( 'mentions' ) || !bp_is_action_variable( 'feed', 0 ) )
+	if ( !bp_is_user_activity() || ! bp_is_current_action( 'mentions' ) || ! bp_is_action_variable( 'feed', 0 ) ) {
 		return false;
+	}
 
-	$wp_query->is_404 = false;
-	status_header( 200 );
+	// setup the feed
+	buddypress()->activity->feed = new BP_Activity_Feed( array(
+		'id'            => 'mentions',
 
-	include_once( 'feeds/bp-activity-mentions-feed.php' );
-	die;
+		/* translators: User mentions activity RSS title - "[Site Name] | [User Display Name] | Mentions" */
+		'title'         => sprintf( __( '%1$s | %2$s | Mentions', 'buddypress' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),
+
+		'link'          => bp_displayed_user_domain() . bp_get_activity_slug() . '/mentions/',
+		'description'   => sprintf( __( "Activity feed mentioning %s.", 'buddypress' ), bp_get_displayed_user_fullname() ),
+		'activity_args' => array(
+			'search_terms' => '@' . bp_core_get_username( bp_displayed_user_id() )
+		)
+	) );
 }
 add_action( 'bp_actions', 'bp_activity_action_mentions_feed' );
 
@@ -560,16 +599,25 @@ add_action( 'bp_actions', 'bp_activity_action_mentions_feed' );
  * @return bool False on failure
  */
 function bp_activity_action_favorites_feed() {
-	global $wp_query;
-
-	if ( !bp_is_user_activity() || !bp_is_current_action( 'favorites' ) || !bp_is_action_variable( 'feed', 0 ) )
+	if ( ! bp_is_user_activity() || ! bp_is_current_action( 'favorites' ) || ! bp_is_action_variable( 'feed', 0 ) ) {
 		return false;
+	}
+
+	// get displayed user's favorite activity IDs
+	$favs = bp_activity_get_user_favorites( bp_displayed_user_id() );
+	$fav_ids = implode( ',', (array) $favs );
+
+	// setup the feed
+	buddypress()->activity->feed = new BP_Activity_Feed( array(
+		'id'            => 'favorites',
 
-	$wp_query->is_404 = false;
-	status_header( 200 );
+		/* translators: User activity favorites RSS title - "[Site Name] | [User Display Name] | Favorites" */
+		'title'         => sprintf( __( '%1$s | %2$s | Favorites', 'buddypress' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),
 
-	include_once( 'feeds/bp-activity-favorites-feed.php' );
-	die;
+		'link'          => bp_displayed_user_domain() . bp_get_activity_slug() . '/favorites/',
+		'description'   => sprintf( __( "Activity feed of %s's favorites.", 'buddypress' ), bp_get_displayed_user_fullname() ),
+		'activity_args' => 'include=' . $fav_ids
+	) );
 }
 add_action( 'bp_actions', 'bp_activity_action_favorites_feed' );
 
diff --git a/wp-content/plugins/buddypress/bp-activity/bp-activity-admin.php b/wp-content/plugins/buddypress/bp-activity/bp-activity-admin.php
index ab88d81363f5dce08d970d406e62857d41e8ed2e..a65ddff3c787490be1ef06c53b680f8a1d038e4d 100644
--- a/wp-content/plugins/buddypress/bp-activity/bp-activity-admin.php
+++ b/wp-content/plugins/buddypress/bp-activity/bp-activity-admin.php
@@ -588,7 +588,7 @@ function bp_activity_admin_edit() {
 
 					<div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
 						<div id="post-body-content">
-							<div id="postdiv" class="postarea">
+							<div id="postdiv">
 								<div id="bp_activity_action" class="postbox">
 									<h3><?php _e( 'Action', 'buddypress' ); ?></h3>
 									<div class="inside">
@@ -1127,13 +1127,13 @@ class BP_Activity_List_Table extends WP_List_Table {
 	 * @since BuddyPress (1.6)
 	 */
 	function get_views() {
-		$redirect_to = remove_query_arg( array( 'activity_status', 'aid', 'deleted', 'error', 'spammed', 'unspammed', 'updated', ), $_SERVER['REQUEST_URI'] );
-	?>
+		$url_base = bp_get_admin_url( 'admin.php?page=bp-activity' ); ?>
+
 		<ul class="subsubsub">
-			<li class="all"><a href="<?php echo esc_attr( esc_url( $redirect_to ) ); ?>" class="<?php if ( 'spam' != $this->view ) echo 'current'; ?>"><?php _e( 'All', 'buddypress' ); ?></a> |</li>
-			<li class="spam"><a href="<?php echo esc_attr( esc_url( add_query_arg( 'activity_status', 'spam', $redirect_to ) ) ); ?>" class="<?php if ( 'spam' == $this->view ) echo 'current'; ?>"><?php printf( __( 'Spam <span class="count">(%s)</span>', 'buddypress' ), number_format_i18n( $this->spam_count ) ); ?></a></li>
+			<li class="all"><a href="<?php echo esc_attr( esc_url( $url_base ) ); ?>" class="<?php if ( 'spam' != $this->view ) echo 'current'; ?>"><?php _e( 'All', 'buddypress' ); ?></a> |</li>
+			<li class="spam"><a href="<?php echo esc_attr( esc_url( add_query_arg( 'activity_status', 'spam', $url_base ) ) ); ?>" class="<?php if ( 'spam' == $this->view ) echo 'current'; ?>"><?php printf( __( 'Spam <span class="count">(%s)</span>', 'buddypress' ), number_format_i18n( $this->spam_count ) ); ?></a></li>
 
-			<?php do_action( 'bp_activity_list_table_get_views', $redirect_to, $this->view ); ?>
+			<?php do_action( 'bp_activity_list_table_get_views', $url_base, $this->view ); ?>
 		</ul>
 	<?php
 	}
@@ -1224,7 +1224,7 @@ class BP_Activity_List_Table extends WP_List_Table {
 	 * @since BuddyPress (1.6)
 	 */
 	function column_cb( $item ) {
-		printf( '<input type="checkbox" name="aid[]" value="%d" />', (int) $item['id'] );
+		printf( '<label class="screen-reader-text" for="aid-%1$d">' . __( 'Select activity item %1$d', 'buddypress' ) . '</label><input type="checkbox" name="aid[]" value="%1$d" id="aid-%1$d" />', $item['id'] );
 	}
 
 	/**
@@ -1297,7 +1297,7 @@ class BP_Activity_List_Table extends WP_List_Table {
 		$actions = apply_filters( 'bp_activity_admin_comment_row_actions', array_filter( $actions ), $item );
 
 		/* translators: 2: activity admin ui date/time */
-		printf( __( 'Submitted on <a href="%1$s">%2$s at %3$s</a>', 'buddypress' ), bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/p/' . $item['id'] . '/', date_i18n( get_option( 'date_format' ), strtotime( $item['date_recorded'] ) ), date_i18n( get_option( 'time_format' ), strtotime( $item['date_recorded'] ) ) );
+		printf( __( 'Submitted on <a href="%1$s">%2$s at %3$s</a>', 'buddypress' ), bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/p/' . $item['id'] . '/', get_date_from_gmt( $item['date_recorded'], get_option( 'date_format' ) ), get_date_from_gmt( $item['date_recorded'], get_option( 'time_format' ) ) );
 
 		// End timestamp
 		echo '</div>';
diff --git a/wp-content/plugins/buddypress/bp-activity/bp-activity-cache.php b/wp-content/plugins/buddypress/bp-activity/bp-activity-cache.php
index a79b3dd9437e9325467b1fc3f1bac666b31a2431..a7e5965e550f8e72b5d1a1bc2b708fd4052df0a2 100644
--- a/wp-content/plugins/buddypress/bp-activity/bp-activity-cache.php
+++ b/wp-content/plugins/buddypress/bp-activity/bp-activity-cache.php
@@ -32,6 +32,23 @@ function bp_activity_update_meta_cache( $activity_ids = false ) {
 		'meta_table' 	   => $bp->activity->table_name_meta,
 		'cache_key_prefix' => 'bp_activity_meta'
 	);
-	
+
 	bp_update_meta_cache( $cache_args );
 }
+
+/**
+ * Clear the cache for all metadata of a given activity
+ *
+ * @param int $activity_id
+ */
+function bp_activity_clear_meta_cache_for_activity( $activity_id ) {
+	global $wp_object_cache;
+
+	if ( is_object( $wp_object_cache ) && ! empty( $wp_object_cache->cache['bp'] ) ) {
+		foreach ( $wp_object_cache->cache['bp'] as $ckey => $cvalue ) {
+			if ( 0 === strpos( $ckey, 'bp_activity_meta_' . $activity_id ) ) {
+				wp_cache_delete( $ckey, 'bp' );
+			}
+		}
+	}
+}
diff --git a/wp-content/plugins/buddypress/bp-activity/bp-activity-classes.php b/wp-content/plugins/buddypress/bp-activity/bp-activity-classes.php
index 9c632d70080c94b0f828f1d7f7f668fb27fcc6e7..47ec54088f9a63ca7342c30cf3215960a5270779 100644
--- a/wp-content/plugins/buddypress/bp-activity/bp-activity-classes.php
+++ b/wp-content/plugins/buddypress/bp-activity/bp-activity-classes.php
@@ -144,6 +144,7 @@ class BP_Activity_Activity {
 			'sort'             => 'DESC',     // ASC or DESC
 			'exclude'          => false,      // Array of ids to exclude
 			'in'               => false,      // Array of ids to limit query by (IN)
+			'meta_query'       => false,      // Filter by activitymeta
 			'filter'           => false,      // See self::get_filter_sql()
 			'search_terms'     => false,      // Terms to search by
 			'display_comments' => false,      // Whether to include activity comments
@@ -154,10 +155,12 @@ class BP_Activity_Activity {
 		extract( $r );
 
 		// Select conditions
-		$select_sql = "SELECT a.*, u.user_email, u.user_nicename, u.user_login, u.display_name";
+		$select_sql = "SELECT DISTINCT a.*, u.user_email, u.user_nicename, u.user_login, u.display_name";
 
 		$from_sql = " FROM {$bp->activity->table_name} a LEFT JOIN {$wpdb->users} u ON a.user_id = u.ID";
 
+		$join_sql = '';
+
 		// Where conditions
 		$where_conditions = array();
 
@@ -169,7 +172,7 @@ class BP_Activity_Activity {
 
 		// Searching
 		if ( $search_terms ) {
-			$search_terms = $wpdb->escape( $search_terms );
+			$search_terms = esc_sql( $search_terms );
 			$where_conditions['search_sql'] = "a.content LIKE '%%" . esc_sql( like_escape( $search_terms ) ) . "%%'";
 		}
 
@@ -197,6 +200,17 @@ class BP_Activity_Activity {
 			$where_conditions['in'] = "a.id IN ({$in})";
 		}
 
+		// Process meta_query into SQL
+		$meta_query_sql = self::get_meta_query_sql( $meta_query );
+
+		if ( ! empty( $meta_query_sql['join'] ) ) {
+			$join_sql .= $meta_query_sql['join'];
+		}
+
+		if ( ! empty( $meta_query_sql['where'] ) ) {
+			$where_conditions[] = $meta_query_sql['where'];
+		}
+
 		// Alter the query based on whether we want to show activity item
 		// comments in the stream like normal comments or threaded below
 		// the activity.
@@ -228,12 +242,12 @@ class BP_Activity_Activity {
 			$per_page = absint( $per_page );
 
 			$pag_sql    = $wpdb->prepare( "LIMIT %d, %d", absint( ( $page - 1 ) * $per_page ), $per_page );
-			$activities = $wpdb->get_results( apply_filters( 'bp_activity_get_user_join_filter', "{$select_sql} {$from_sql} {$where_sql} ORDER BY a.date_recorded {$sort} {$pag_sql}", $select_sql, $from_sql, $where_sql, $sort, $pag_sql ) );
+			$activities = $wpdb->get_results( apply_filters( 'bp_activity_get_user_join_filter', "{$select_sql} {$from_sql} {$join_sql} {$where_sql} ORDER BY a.date_recorded {$sort} {$pag_sql}", $select_sql, $from_sql, $where_sql, $sort, $pag_sql ) );
 		} else {
-			$activities = $wpdb->get_results( apply_filters( 'bp_activity_get_user_join_filter', "{$select_sql} {$from_sql} {$where_sql} ORDER BY a.date_recorded {$sort}", $select_sql, $from_sql, $where_sql, $sort ) );
+			$activities = $wpdb->get_results( apply_filters( 'bp_activity_get_user_join_filter', "{$select_sql} {$from_sql} {$join_sql} {$where_sql} ORDER BY a.date_recorded {$sort}", $select_sql, $from_sql, $where_sql, $sort ) );
 		}
 
-		$total_activities_sql = apply_filters( 'bp_activity_total_activities_sql', "SELECT count(a.id) FROM {$bp->activity->table_name} a {$index_hint_sql} {$where_sql} ORDER BY a.date_recorded {$sort}", $where_sql, $sort );
+		$total_activities_sql = apply_filters( 'bp_activity_total_activities_sql', "SELECT count(DISTINCT a.id) FROM {$bp->activity->table_name} a {$index_hint_sql} {$join_sql} {$where_sql} ORDER BY a.date_recorded {$sort}", $where_sql, $sort );
 
 		$total_activities = $wpdb->get_var( $total_activities_sql );
 
@@ -242,7 +256,7 @@ class BP_Activity_Activity {
 			$activity_user_ids = wp_list_pluck( $activities, 'user_id' );
 			$activity_user_ids = implode( ',', wp_parse_id_list( $activity_user_ids ) );
 
-			if ( !empty( $activity_user_ids ) ) {				
+			if ( !empty( $activity_user_ids ) ) {
 				if ( $names = $wpdb->get_results( "SELECT user_id, value AS user_fullname FROM {$bp->profile->table_name_data} WHERE field_id = 1 AND user_id IN ({$activity_user_ids})" ) ) {
 					foreach ( (array) $names as $name )
 						$tmp_names[$name->user_id] = $name->user_fullname;
@@ -280,6 +294,46 @@ class BP_Activity_Activity {
 		return array( 'activities' => $activities, 'total' => (int) $total_activities );
 	}
 
+	/**
+	 * Get the SQL for the 'meta_query' param in BP_Activity_Activity::get()
+	 *
+	 * We use WP_Meta_Query to do the heavy lifting of parsing the
+	 * meta_query array and creating the necessary SQL clauses. However,
+	 * since BP_Activity_Activity::get() builds its SQL differently than
+	 * WP_Query, we have to alter the return value (stripping the leading
+	 * AND keyword from the 'where' clause).
+	 *
+	 * @since BuddyPress (1.8)
+	 *
+	 * @param array $meta_query An array of meta_query filters. See the
+	 *   documentation for WP_Meta_Query for details.
+	 * @return array $sql_array 'join' and 'where' clauses
+	 */
+	public static function get_meta_query_sql( $meta_query = array() ) {
+		global $wpdb;
+
+		$sql_array = array(
+			'join'  => '',
+			'where' => '',
+		);
+
+		if ( ! empty( $meta_query ) ) {
+			$activity_meta_query = new WP_Meta_Query( $meta_query );
+
+			// WP_Meta_Query expects the table name at
+			// $wpdb->activitymeta
+			$wpdb->activitymeta = buddypress()->activity->table_name_meta;
+
+			$meta_sql = $activity_meta_query->get_sql( 'activity', 'a', 'id' );
+
+			// Strip the leading AND - BP handles it in get()
+			$sql_array['where'] = preg_replace( '/^\sAND/', '', $meta_sql['where'] );
+			$sql_array['join']  = $meta_sql['join'];
+		}
+
+		return $sql_array;
+	}
+
 	/**
 	 * In BuddyPress 1.2.x, this was used to retrieve specific activity stream items (for example, on an activity's permalink page).
 	 * As of 1.5.x, use BP_Activity_Activity::get() with an 'in' parameter instead.
@@ -425,6 +479,10 @@ class BP_Activity_Activity {
 
 		$activity_ids = implode( ',', wp_parse_id_list( $activity_ids ) );
 
+		foreach ( (array) $activity_ids as $activity_id ) {
+			bp_activity_clear_meta_cache_for_activity( $activity_id );
+		}
+
 		return $wpdb->query( "DELETE FROM {$bp->activity->table_name_meta} WHERE activity_id IN ({$activity_ids})" );
 	}
 
@@ -556,10 +614,14 @@ class BP_Activity_Activity {
 		return $wpdb->get_results( $wpdb->prepare( "SELECT id FROM {$bp->activity->table_name} WHERE type = 'activity_comment' AND secondary_item_id = %d", $parent_id ) );
 	}
 
+	/**
+	 * Fetch a list of all components that have activity items recorded
+	 *
+	 * @return array
+	 */
 	function get_recorded_components() {
 		global $wpdb, $bp;
-
-		return $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT component FROM {$bp->activity->table_name} ORDER BY component ASC" ) );
+		return $wpdb->get_col( "SELECT DISTINCT component FROM {$bp->activity->table_name} ORDER BY component ASC" );
 	}
 
 	function get_sitewide_items_for_feed( $limit = 35 ) {
@@ -668,3 +730,285 @@ class BP_Activity_Activity {
 		return $wpdb->get_var( $wpdb->prepare( "UPDATE {$bp->activity->table_name} SET hide_sitewide = 1 WHERE user_id = %d", $user_id ) );
 	}
 }
+
+/**
+ * Create a RSS feed using the activity component.
+ *
+ * You should only construct a new feed when you've validated that you're on
+ * the appropriate screen.
+ *
+ * See {@link bp_activity_action_sitewide_feed()} as an example.
+ *
+ * Accepted parameters:
+ *   id	              - internal id for the feed; should be alphanumeric only
+ *                      (required)
+ *   title            - RSS feed title
+ *   link             - Relevant link for the RSS feed
+ *   description      - RSS feed description
+ *   ttl              - Time-to-live (see inline doc in constructor)
+ *   update_period    - Part of the syndication module (see inline doc in
+ *                      constructor for more info)
+ *   update_frequency - Part of the syndication module (see inline doc in
+ *                      constructor for more info)
+ *   max              - Number of feed items to display
+ *   activity_args    - Arguments passed to {@link bp_has_activities()}
+ *
+ * @since BuddyPress (1.8)
+ */
+class BP_Activity_Feed {
+	/**
+	 * Holds our custom class properties.
+	 *
+	 * These variables are stored in a protected array that is magically
+	 * updated using PHP 5.2+ methods.
+	 *
+	 * @see BP_Feed::__construct() This is where $data is added
+	 * @var array
+	 */
+	protected $data;
+
+	/**
+	 * Magic method for checking the existence of a certain data variable.
+	 *
+	 * @param string $key
+	 */
+	public function __isset( $key ) { return isset( $this->data[$key] ); }
+
+	/**
+	 * Magic method for getting a certain data variable.
+	 *
+	 * @param string $key
+	 */
+	public function __get( $key ) { return isset( $this->data[$key] ) ? $this->data[$key] : null; }
+
+	/**
+	 * Constructor.
+	 *
+	 * @param array $args Optional
+	 */
+	public function __construct( $args = array() ) {
+		// If feeds are disabled, stop now!
+		if ( false === (bool) apply_filters( 'bp_activity_enable_feeds', true ) ) {
+			global $wp_query;
+
+			// set feed flag to false
+			$wp_query->is_feed = false;
+
+			return false;
+		}
+
+		// Setup data
+		$this->data = wp_parse_args( $args, array(
+			// Internal identifier for the RSS feed - should be alphanumeric only
+			'id'               => '',
+
+			// RSS title - should be plain-text
+			'title'            => '',
+
+			// relevant link for the RSS feed
+			'link'             => '',
+
+			// RSS description - should be plain-text
+			'description'      => '',
+
+			// Time-to-live - number of minutes to cache the data before an aggregator
+			// requests it again.  This is only acknowledged if the RSS client supports it
+			//
+			// See: http://www.rssboard.org/rss-profile#element-channel-ttl
+			//      http://www.kbcafe.com/rss/rssfeedstate.html#ttl
+			'ttl'              => '30',
+
+			// Syndication module - similar to ttl, but not really supported by RSS
+			// clients
+			//
+			// See: http://web.resource.org/rss/1.0/modules/syndication/#description
+			//      http://www.kbcafe.com/rss/rssfeedstate.html#syndicationmodule
+			'update_period'    => 'hourly',
+			'update_frequency' => 2,
+
+			// Number of items to display
+			'max'              => 50,
+
+			// Activity arguments passed to bp_has_activities()
+			'activity_args'    => array()
+		) );
+
+		// Plugins can use this filter to modify the feed before it is setup
+		do_action_ref_array( 'bp_activity_feed_prefetch', array( &$this ) );
+
+		// Setup class properties
+		$this->setup_properties();
+
+		// Check if id is valid
+		if ( empty( $this->id ) ) {
+			_doing_it_wrong( 'BP_Activity_Feed', __( "RSS feed 'id' must be defined", 'buddypress' ), 'BP 1.8' );
+			return false;
+		}
+
+		// Plugins can use this filter to modify the feed after it's setup
+		do_action_ref_array( 'bp_activity_feed_postfetch', array( &$this ) );
+
+		// Setup feed hooks
+		$this->setup_hooks();
+
+		// Output the feed
+		$this->output();
+
+		// Kill the rest of the output
+		die();
+	}
+
+	/** SETUP ****************************************************************/
+
+	/**
+	 * Setup and validate the class properties.
+	 */
+	protected function setup_properties() {
+		$this->id               = sanitize_title( $this->id );
+		$this->title            = strip_tags( $this->title );
+		$this->link             = esc_url_raw( $this->link );
+		$this->description      = strip_tags( $this->description );
+		$this->ttl              = (int) $this->ttl;
+		$this->update_period    = strip_tags( $this->update_period );
+		$this->update_frequency = (int) $this->update_frequency;
+
+		$this->activity_args    = wp_parse_args( $this->activity_args, array(
+			'max'              => $this->max,
+			'display_comments' => 'stream'
+		) );
+
+	}
+
+	/**
+	 * Setup some hooks that are used in the feed.
+	 *
+	 * Currently, these hooks are used to maintain backwards compatibility with
+	 * the RSS feeds previous to BP 1.8.
+	 */
+	protected function setup_hooks() {
+		add_action( 'bp_activity_feed_rss_attributes',   array( $this, 'backpat_rss_attributes' ) );
+		add_action( 'bp_activity_feed_channel_elements', array( $this, 'backpat_channel_elements' ) );
+		add_action( 'bp_activity_feed_item_elements',    array( $this, 'backpat_item_elements' ) );
+	}
+
+	/** BACKPAT HOOKS ********************************************************/
+
+	public function backpat_rss_attributes() {
+		do_action( 'bp_activity_' . $this->id . '_feed' );
+	}
+
+	public function backpat_channel_elements() {
+		do_action( 'bp_activity_' . $this->id . '_feed_head' );
+	}
+
+	public function backpat_item_elements() {
+		switch ( $this->id ) {
+
+			// sitewide and friends feeds use the 'personal' hook
+			case 'sitewide' :
+			case 'friends' :
+				$id = 'personal';
+
+				break;
+
+			default :
+				$id = $this->id;
+
+				break;
+		}
+
+		do_action( 'bp_activity_' . $id . '_feed_item' );
+	}
+
+	/** HELPERS **************************************************************/
+
+	/**
+	 * Output the feed's item content.
+	 */
+	protected function feed_content() {
+		bp_activity_content_body();
+
+		switch ( $this->id ) {
+
+			// also output parent activity item if we're on a specific feed
+			case 'favorites' :
+			case 'friends' :
+			case 'mentions' :
+			case 'personal' :
+
+				if ( 'activity_comment' == bp_get_activity_action_name() ) :
+			?>
+				<strong><?php _e( 'In reply to', 'buddypress' ) ?></strong> -
+				<?php bp_activity_parent_content() ?>
+			<?php
+				endif;
+
+				break;
+		}
+	}
+
+	/** OUTPUT ***************************************************************/
+
+	/**
+	 * Output the RSS feed.
+	 */
+	protected function output() {
+		// set up some additional headers if not on a directory page
+		// this is done b/c BP uses pseudo-pages
+		if ( ! bp_is_directory() ) {
+			global $wp_query;
+
+			$wp_query->is_404 = false;
+			status_header( 200 );
+		}
+
+		header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true );
+		echo '<?xml version="1.0" encoding="' . get_option( 'blog_charset' ) . '"?'.'>';
+	?>
+
+<rss version="2.0"
+	xmlns:content="http://purl.org/rss/1.0/modules/content/"
+	xmlns:atom="http://www.w3.org/2005/Atom"
+	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
+	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
+	<?php do_action( 'bp_activity_feed_rss_attributes' ); ?>
+>
+
+<channel>
+	<title><?php echo $this->title; ?></title>
+	<link><?php echo $this->link; ?></link>
+	<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
+	<description><?php echo $this->description ?></description>
+	<lastBuildDate><?php echo mysql2date( 'D, d M Y H:i:s O', bp_activity_get_last_updated(), false ); ?></lastBuildDate>
+	<generator>http://buddypress.org/?v=<?php bp_version(); ?></generator>
+	<language><?php bloginfo_rss( 'language' ); ?></language>
+	<ttl><?php echo $this->ttl; ?></ttl>
+	<sy:updatePeriod><?php echo $this->update_period; ?></sy:updatePeriod>
+ 	<sy:updateFrequency><?php echo $this->update_frequency; ?></sy:updateFrequency>
+	<?php do_action( 'bp_activity_feed_channel_elements' ); ?>
+
+	<?php if ( bp_has_activities( $this->activity_args ) ) : ?>
+		<?php while ( bp_activities() ) : bp_the_activity(); ?>
+			<item>
+				<guid isPermaLink="false"><?php bp_activity_feed_item_guid(); ?></guid>
+				<title><?php echo stripslashes( bp_get_activity_feed_item_title() ); ?></title>
+				<link><?php bp_activity_thread_permalink() ?></link>
+				<pubDate><?php echo mysql2date( 'D, d M Y H:i:s O', bp_get_activity_feed_item_date(), false ); ?></pubDate>
+
+				<?php if ( bp_get_activity_feed_item_description() ) : ?>
+					<content:encoded><![CDATA[<?php $this->feed_content(); ?>]]></content:encoded>
+				<?php endif; ?>
+
+				<?php if ( bp_activity_can_comment() ) : ?>
+					<slash:comments><?php bp_activity_comment_count(); ?></slash:comments>
+				<?php endif; ?>
+
+				<?php do_action( 'bp_activity_feed_item_elements' ); ?>
+			</item>
+		<?php endwhile; ?>
+
+	<?php endif; ?>
+</channel>
+</rss><?php
+	}
+}
diff --git a/wp-content/plugins/buddypress/bp-activity/bp-activity-filters.php b/wp-content/plugins/buddypress/bp-activity/bp-activity-filters.php
index a3f1f81436f9c65ea2a7440725e46d4cf6118fcd..a3dfeb02ba94dafbefcf9d87ff3b3771c33d4403 100644
--- a/wp-content/plugins/buddypress/bp-activity/bp-activity-filters.php
+++ b/wp-content/plugins/buddypress/bp-activity/bp-activity-filters.php
@@ -125,7 +125,6 @@ function bp_activity_get_moderated_activity_types() {
  *
  * @since BuddyPress (1.6)
  * @param BP_Activity_Activity $activity
- * @return If activity type is not an update or comment
  */
 function bp_activity_check_moderation_keys( $activity ) {
 
@@ -144,7 +143,6 @@ function bp_activity_check_moderation_keys( $activity ) {
  *
  * @since BuddyPress (1.6)
  * @param BP_Activity_Activity $activity
- * @return If activity type is not an update or comment
  */
 function bp_activity_check_blacklist_keys( $activity ) {
 
@@ -208,6 +206,11 @@ function bp_activity_filter_kses( $content ) {
  */
 function bp_activity_at_name_filter( $content, $activity_id = 0 ) {
 
+	// Are mentions disabled?
+	if ( ! bp_activity_do_mentions() ) {
+		return $content;
+	}
+
 	// Try to find mentions
 	$usernames = bp_activity_find_mentions( $content );
 
@@ -232,11 +235,16 @@ function bp_activity_at_name_filter( $content, $activity_id = 0 ) {
  *
  * @since BuddyPress (1.5)
  *
- * @param obj $activity
+ * @param BP_Activity_Activity $activity
  *
  * @uses bp_activity_find_mentions()
  */
 function bp_activity_at_name_filter_updates( $activity ) {
+	// Are mentions disabled?
+	if ( ! bp_activity_do_mentions() ) {
+		return;
+	}
+
 	// If activity was marked as spam, stop the rest of this function.
 	if ( ! empty( $activity->is_spam ) )
 		return;
@@ -265,12 +273,17 @@ function bp_activity_at_name_filter_updates( $activity ) {
  *
  * @since BuddyPress (1.7)
  *
- * @param obj $activity The BP_Activity_Activity object
+ * @param BP_Activity_Activity $activity The BP_Activity_Activity object
  *
  * @uses bp_activity_at_message_notification()
  * @uses bp_activity_update_mention_count_for_user()
  */
 function bp_activity_at_name_send_emails( $activity ) {
+	// Are mentions disabled?
+	if ( ! bp_activity_do_mentions() ) {
+		return;
+	}
+
 	// If our temporary variable doesn't exist, stop now.
 	if ( empty( buddypress()->activity->mentioned_users ) )
 		return;
@@ -326,7 +339,7 @@ function bp_activity_make_nofollow_filter( $text ) {
  *
  * @since BuddyPress (1.5)
  *
- * @param $text The original activity entry text
+ * @param string $text The original activity entry text
  *
  * @uses bp_is_single_activity()
  * @uses apply_filters() To call the 'bp_activity_excerpt_append_text' hook
diff --git a/wp-content/plugins/buddypress/bp-activity/bp-activity-functions.php b/wp-content/plugins/buddypress/bp-activity/bp-activity-functions.php
index 851a447c4785c74178a5dda960fbb4bdbbe111a9..361c947b39a2ce4bfbda327d0a8851ae617a203a 100644
--- a/wp-content/plugins/buddypress/bp-activity/bp-activity-functions.php
+++ b/wp-content/plugins/buddypress/bp-activity/bp-activity-functions.php
@@ -27,6 +27,30 @@ function bp_activity_has_directory() {
 	return (bool) !empty( $bp->pages->activity->id );
 }
 
+/**
+ * Are mentions enabled or disabled?
+ *
+ * The Mentions feature does a number of things, all of which will be turned
+ * off if you disable mentions:
+ *   - Detecting and auto-linking @username in all BP/WP content
+ *   - Sending BP notifications and emails to users when they are mentioned
+ *     using the @username syntax
+ *   - The Public Message button on user profiles
+ *
+ * Mentions are enabled by default. To disable, put the following line in
+ * bp-custom.php or your theme's functions.php file:
+ *
+ *   add_filter( 'bp_activity_do_mentions', '__return_false' );
+ *
+ * @since BuddyPress (1.8)
+ *
+ * @uses apply_filters() To call 'bp_activity_do_mentions' hook.
+ * @return bool $retval True to enable mentions, false to disable.
+ */
+function bp_activity_do_mentions() {
+	return (bool) apply_filters( 'bp_activity_do_mentions', true );
+}
+
 /**
  * Searches through the content of an activity item to locate usernames,
  * designated by an @ sign.
@@ -367,7 +391,7 @@ function bp_activity_add_user_favorite( $activity_id, $user_id = 0 ) {
 		$user_id = bp_loggedin_user_id();
 
 	// Update the user's personal favorites
-	$my_favs   = bp_get_user_meta( bp_loggedin_user_id(), 'bp_favorite_activities', true );
+	$my_favs   = bp_get_user_meta( $user_id, 'bp_favorite_activities', true );
 	$my_favs[] = $activity_id;
 
 	// Update the total number of users who have favorited this activity
@@ -375,7 +399,7 @@ function bp_activity_add_user_favorite( $activity_id, $user_id = 0 ) {
 	$fav_count = !empty( $fav_count ) ? (int) $fav_count + 1 : 1;
 
 	// Update user meta
-	bp_update_user_meta( bp_loggedin_user_id(), 'bp_favorite_activities', $my_favs );
+	bp_update_user_meta( $user_id, 'bp_favorite_activities', $my_favs );
 
 	// Update activity meta counts
 	if ( true === bp_activity_update_meta( $activity_id, 'favorite_count', $fav_count ) ) {
@@ -661,7 +685,7 @@ function bp_activity_update_meta( $activity_id, $meta_key, $meta_value ) {
 
 	// Sanitize value
 	if ( is_string( $meta_value ) )
-		$meta_value = stripslashes( $wpdb->escape( $meta_value ) );
+		$meta_value = stripslashes( esc_sql( $meta_value ) );
 
 	// Maybe, just maybe... serialize
 	$meta_value = maybe_serialize( $meta_value );
@@ -881,6 +905,7 @@ function bp_activity_get( $args = '' ) {
 		'display_comments' => false,        // false for no comments. 'stream' for within stream display, 'threaded' for below each activity item
 
 		'search_terms'     => false,        // Pass search terms as a string
+		'meta_query'       => false,        // Filter by activity meta. See WP_Meta_Query for format
 		'show_hidden'      => false,        // Show activity items that are hidden site-wide?
 		'exclude'          => false,        // Comma-separated list of activity IDs to exclude
 		'in'               => false,        // Comma-separated list or array of activity IDs to which you want to limit the query
@@ -902,7 +927,7 @@ function bp_activity_get( $args = '' ) {
 	extract( $r, EXTR_SKIP );
 
 	// Attempt to return a cached copy of the first page of sitewide activity.
-	if ( 1 == (int) $page && empty( $max ) && empty( $search_terms ) && empty( $filter ) && empty( $exclude ) && empty( $in ) && 'DESC' == $sort && empty( $exclude ) && 'ham_only' == $spam ) {
+	if ( 1 == (int) $page && empty( $max ) && empty( $search_terms ) && empty( $meta_query ) && empty( $filter ) && empty( $exclude ) && empty( $in ) && 'DESC' == $sort && empty( $exclude ) && 'ham_only' == $spam ) {
 		if ( !$activity = wp_cache_get( 'bp_activity_sitewide_front', 'bp' ) ) {
 			$args = array(
 				'page'             => $page,
@@ -910,6 +935,7 @@ function bp_activity_get( $args = '' ) {
 				'max'              => $max,
 				'sort'             => $sort,
 				'search_terms'     => $search_terms,
+				'meta_query'       => $meta_query,
 				'filter'           => $filter,
 				'display_comments' => $display_comments,
 				'show_hidden'      => $show_hidden,
@@ -926,6 +952,7 @@ function bp_activity_get( $args = '' ) {
 			'max'              => $max,
 			'sort'             => $sort,
 			'search_terms'     => $search_terms,
+			'meta_query'       => $meta_query,
 			'filter'           => $filter,
 			'display_comments' => $display_comments,
 			'show_hidden'      => $show_hidden,
@@ -1103,10 +1130,10 @@ function bp_activity_post_update( $args = '' ) {
 		'type'         => 'activity_update'
 	) );
 
-	$activity_content = apply_filters( 'bp_activity_latest_update_content', $content );
+	$activity_content = apply_filters( 'bp_activity_latest_update_content', $content, $activity_content );
 
 	// Add this update to the "latest update" usermeta so it can be fetched anywhere.
-	bp_update_user_meta( bp_loggedin_user_id(), 'bp_latest_update', array( 'id' => $activity_id, 'content' => $content ) );
+	bp_update_user_meta( bp_loggedin_user_id(), 'bp_latest_update', array( 'id' => $activity_id, 'content' => $activity_content ) );
 
 	do_action( 'bp_activity_posted_update', $content, $user_id, $activity_id );
 
@@ -1498,13 +1525,15 @@ function bp_activity_hide_user_activity( $user_id ) {
  *
  * @param string $content The content to work with
  * @param string $link Optional. The URL that the image should link to
+ * @param array $activity_args Optional. The args passed to the activity
+ *   creation function (eg bp_blogs_record_activity())
  *
  * @uses esc_attr()
  * @uses apply_filters() To call the 'bp_activity_thumbnail_content_images' hook
  *
  * @return string $content The content with images stripped and replaced with a single thumb.
  */
-function bp_activity_thumbnail_content_images( $content, $link = false ) {
+function bp_activity_thumbnail_content_images( $content, $link = false, $args = false ) {
 
 	preg_match_all( '/<img[^>]*>/Ui', $content, $matches );
 
@@ -1543,7 +1572,7 @@ function bp_activity_thumbnail_content_images( $content, $link = false ) {
 		}
 	}
 
-	return apply_filters( 'bp_activity_thumbnail_content_images', $content, $matches );
+	return apply_filters( 'bp_activity_thumbnail_content_images', $content, $matches, $args );
 }
 
 /**
diff --git a/wp-content/plugins/buddypress/bp-activity/bp-activity-loader.php b/wp-content/plugins/buddypress/bp-activity/bp-activity-loader.php
index 30eb057707743620eb7b4d36d5071cfff87ad7a9..9a0074f5976a4c88ed2da0fa42cc975eb05149f0 100644
--- a/wp-content/plugins/buddypress/bp-activity/bp-activity-loader.php
+++ b/wp-content/plugins/buddypress/bp-activity/bp-activity-loader.php
@@ -37,7 +37,7 @@ class BP_Activity_Component extends BP_Component {
 	 *
 	 * @since BuddyPress (1.5)
 	 */
-	function includes() {
+	public function includes( $includes = array() ) {
 		// Files to include
 		$includes = array(
 			'actions',
@@ -71,7 +71,7 @@ class BP_Activity_Component extends BP_Component {
 	 *
 	 * @global object $bp BuddyPress global settings
 	 */
-	function setup_globals() {
+	public function setup_globals( $args = array() ) {
 		global $bp;
 
 		// Define a slug, if necessary
@@ -109,7 +109,7 @@ class BP_Activity_Component extends BP_Component {
 	 * @uses bp_get_friends_slug()
 	 * @uses bp_get_groups_slug()
 	 */
-	function setup_nav() {
+	public function setup_nav( $main_nav = array(), $sub_nav = array() ) {
 
 		$sub_nav = array();
 
@@ -150,15 +150,17 @@ class BP_Activity_Component extends BP_Component {
 		);
 
 		// @ mentions
-		$sub_nav[] = array(
-			'name'            => __( 'Mentions', 'buddypress' ),
-			'slug'            => 'mentions',
-			'parent_url'      => $activity_link,
-			'parent_slug'     => $this->slug,
-			'screen_function' => 'bp_activity_screen_mentions',
-			'position'        => 20,
-			'item_css_id'     => 'activity-mentions'
-		);
+		if ( bp_activity_do_mentions() ) {
+			$sub_nav[] = array(
+				'name'            => __( 'Mentions', 'buddypress' ),
+				'slug'            => 'mentions',
+				'parent_url'      => $activity_link,
+				'parent_slug'     => $this->slug,
+				'screen_function' => 'bp_activity_screen_mentions',
+				'position'        => 20,
+				'item_css_id'     => 'activity-mentions'
+			);
+		}
 
 		// Favorite activity items
 		$sub_nav[] = array(
@@ -214,7 +216,7 @@ class BP_Activity_Component extends BP_Component {
 	 * @uses bp_get_friends_slug()
 	 * @uses bp_get_groups_slug()
 	 */
-	function setup_admin_bar() {
+	public function setup_admin_bar( $wp_admin_nav = array() ) {
 		global $bp;
 
 		// Prevent debug notices
@@ -228,11 +230,13 @@ class BP_Activity_Component extends BP_Component {
 			$activity_link = trailingslashit( $user_domain . $this->slug );
 
 			// Unread message count
-			$count = bp_get_total_mention_count_for_user( bp_loggedin_user_id() );
-			if ( !empty( $count ) ) {
-				$title = sprintf( __( 'Mentions <span class="count">%s</span>', 'buddypress' ), number_format_i18n( $count ) );
-			} else {
-				$title = __( 'Mentions', 'buddypress' );
+			if ( bp_activity_do_mentions() ) {
+				$count = bp_get_total_mention_count_for_user( bp_loggedin_user_id() );
+				if ( !empty( $count ) ) {
+					$title = sprintf( __( 'Mentions <span class="count">%s</span>', 'buddypress' ), number_format_i18n( $count ) );
+				} else {
+					$title = __( 'Mentions', 'buddypress' );
+				}
 			}
 
 			// Add the "Activity" sub menu
@@ -244,12 +248,14 @@ class BP_Activity_Component extends BP_Component {
 			);
 
 			// Mentions
-			$wp_admin_nav[] = array(
-				'parent' => 'my-account-' . $this->id,
-				'id'     => 'my-account-' . $this->id . '-mentions',
-				'title'  => $title,
-				'href'   => trailingslashit( $activity_link . 'mentions' )
-			);
+			if ( bp_activity_do_mentions() ) {
+				$wp_admin_nav[] = array(
+					'parent' => 'my-account-' . $this->id,
+					'id'     => 'my-account-' . $this->id . '-mentions',
+					'title'  => $title,
+					'href'   => trailingslashit( $activity_link . 'mentions' )
+				);
+			}
 
 			// Personal
 			$wp_admin_nav[] = array(
diff --git a/wp-content/plugins/buddypress/bp-activity/bp-activity-screens.php b/wp-content/plugins/buddypress/bp-activity/bp-activity-screens.php
index c03fed41a23d587671c7c1190c1dec88e58c9477..eddf90697503b22338f681414e3d6b395eb8f6d2 100644
--- a/wp-content/plugins/buddypress/bp-activity/bp-activity-screens.php
+++ b/wp-content/plugins/buddypress/bp-activity/bp-activity-screens.php
@@ -265,11 +265,17 @@ add_action( 'bp_screens', 'bp_activity_screen_single_activity_permalink' );
  */
 function bp_activity_screen_notification_settings() {
 
-	if ( !$mention = bp_get_user_meta( bp_displayed_user_id(), 'notification_activity_new_mention', true ) )
-		$mention = 'yes';
+	if ( bp_activity_do_mentions() ) {
+		if ( ! $mention = bp_get_user_meta( bp_displayed_user_id(), 'notification_activity_new_mention', true ) ) {
+			$mention = 'yes';
+		}
+	}
+
+	if ( ! $reply = bp_get_user_meta( bp_displayed_user_id(), 'notification_activity_new_reply', true ) ) {
+		$reply = 'yes';
+	}
 
-	if ( !$reply = bp_get_user_meta( bp_displayed_user_id(), 'notification_activity_new_reply', true ) )
-		$reply = 'yes'; ?>
+	?>
 
 	<table class="notification-settings" id="activity-notification-settings">
 		<thead>
@@ -282,12 +288,15 @@ function bp_activity_screen_notification_settings() {
 		</thead>
 
 		<tbody>
-			<tr id="activity-notification-settings-mentions">
-				<td>&nbsp;</td>
-				<td><?php printf( __( 'A member mentions you in an update using "@%s"', 'buddypress' ), bp_core_get_username( bp_displayed_user_id() ) ) ?></td>
-				<td class="yes"><input type="radio" name="notifications[notification_activity_new_mention]" value="yes" <?php checked( $mention, 'yes', true ) ?>/></td>
-				<td class="no"><input type="radio" name="notifications[notification_activity_new_mention]" value="no" <?php checked( $mention, 'no', true ) ?>/></td>
-			</tr>
+			<?php if ( bp_activity_do_mentions() ) : ?>
+				<tr id="activity-notification-settings-mentions">
+					<td>&nbsp;</td>
+					<td><?php printf( __( 'A member mentions you in an update using "@%s"', 'buddypress' ), bp_core_get_username( bp_displayed_user_id() ) ) ?></td>
+					<td class="yes"><input type="radio" name="notifications[notification_activity_new_mention]" value="yes" <?php checked( $mention, 'yes', true ) ?>/></td>
+					<td class="no"><input type="radio" name="notifications[notification_activity_new_mention]" value="no" <?php checked( $mention, 'no', true ) ?>/></td>
+				</tr>
+			<?php endif; ?>
+
 			<tr id="activity-notification-settings-replies">
 				<td>&nbsp;</td>
 				<td><?php _e( "A member replies to an update or comment you've posted", 'buddypress' ) ?></td>
@@ -309,7 +318,7 @@ add_action( 'bp_notification_settings', 'bp_activity_screen_notification_setting
  * The main theme compat class for BuddyPress Activity
  *
  * This class sets up the necessary theme compatability actions to safely output
- * group template parts to the_title and the_content areas of a theme.
+ * activity template parts to the_title and the_content areas of a theme.
  *
  * @since BuddyPress (1.7)
  */
@@ -341,11 +350,13 @@ class BP_Activity_Theme_Compat {
 
 			do_action( 'bp_activity_screen_index' );
 
+			add_filter( 'bp_get_buddypress_template',                array( $this, 'directory_template_hierarchy' ) );
 			add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'directory_dummy_post' ) );
 			add_filter( 'bp_replace_the_content',                    array( $this, 'directory_content'    ) );
 
 		// Single activity
 		} elseif ( bp_is_single_activity() ) {
+			add_filter( 'bp_get_buddypress_template',                array( $this, 'single_template_hierarchy' ) );
 			add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'single_dummy_post' ) );
 			add_filter( 'bp_replace_the_content',                    array( $this, 'single_dummy_content'    ) );
 		}
@@ -353,6 +364,29 @@ class BP_Activity_Theme_Compat {
 
 	/** Directory *************************************************************/
 
+	/**
+	 * Add template hierarchy to theme compat for the activity directory page.
+	 *
+	 * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
+	 *
+	 * @since BuddyPress (1.8)
+	 *
+	 * @param string $templates The templates from bp_get_theme_compat_templates()
+	 * @return array $templates Array of custom templates to look for.
+	 */
+	public function directory_template_hierarchy( $templates ) {
+		// Setup our templates based on priority
+		$new_templates = apply_filters( 'bp_template_hierarchy_activity_directory', array(
+			'activity/index-directory.php'
+		) );
+
+		// Merge new templates with existing stack
+		// @see bp_get_theme_compat_templates()
+		$templates = array_merge( (array) $new_templates, $templates );
+
+		return $templates;
+	}
+
 	/**
 	 * Update the global $post with directory data
 	 *
@@ -383,6 +417,29 @@ class BP_Activity_Theme_Compat {
 
 	/** Single ****************************************************************/
 
+	/**
+	 * Add custom template hierarchy to theme compat for activity permalink pages.
+	 *
+	 * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
+	 *
+	 * @since BuddyPress (1.8)
+	 *
+	 * @param string $templates The templates from bp_get_theme_compat_templates()
+	 * @return array $templates Array of custom templates to look for.
+	 */
+	public function single_template_hierarchy( $templates ) {
+		// Setup our templates based on priority
+		$new_templates = apply_filters( 'bp_template_hierarchy_activity_single_item', array(
+			'activity/single/index.php'
+		) );
+
+		// Merge new templates with existing stack
+		// @see bp_get_theme_compat_templates()
+		$templates = array_merge( (array) $new_templates, $templates );
+
+		return $templates;
+	}
+
 	/**
 	 * Update the global $post with the displayed user's data
 	 *
diff --git a/wp-content/plugins/buddypress/bp-activity/bp-activity-template.php b/wp-content/plugins/buddypress/bp-activity/bp-activity-template.php
index 736f126a5af734f88ba77e16e26aa1742fd8016a..a0dcbf11a5f79208a33e50b9bff625a3183255c4 100644
--- a/wp-content/plugins/buddypress/bp-activity/bp-activity-template.php
+++ b/wp-content/plugins/buddypress/bp-activity/bp-activity-template.php
@@ -150,6 +150,7 @@ class BP_Activity_Template {
 			'in'               => false,
 			'filter'           => false,
 			'search_terms'     => false,
+			'meta_query'       => false,
 			'display_comments' => 'threaded',
 			'show_hidden'      => false,
 			'spam'             => 'ham_only',
@@ -172,7 +173,7 @@ class BP_Activity_Template {
 
 		// Fetch all activity items
 		else
-			$this->activities = bp_activity_get( array( 'display_comments' => $display_comments, 'max' => $max, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'sort' => $sort, 'search_terms' => $search_terms, 'filter' => $filter, 'show_hidden' => $show_hidden, 'exclude' => $exclude, 'in' => $in, 'spam' => $spam ) );
+			$this->activities = bp_activity_get( array( 'display_comments' => $display_comments, 'max' => $max, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'sort' => $sort, 'search_terms' => $search_terms, 'meta_query' => $meta_query, 'filter' => $filter, 'show_hidden' => $show_hidden, 'exclude' => $exclude, 'in' => $in, 'spam' => $spam ) );
 
 		if ( !$max || $max >= (int) $this->activities['total'] )
 			$this->total_activity_count = (int) $this->activities['total'];
@@ -361,6 +362,8 @@ function bp_has_activities( $args = '' ) {
 		'primary_id'       => $primary_id,  // object ID to filter on e.g. a group_id or forum_id or blog_id etc.
 		'secondary_id'     => false,        // secondary object ID to filter on e.g. a post_id
 
+		'meta_query'       => false,        // filter on activity meta. See WP_Meta_Query for format
+
 		// Searching
 		'search_terms'     => false         // specify terms to search on
 	);
@@ -410,11 +413,17 @@ function bp_has_activities( $args = '' ) {
 					if ( empty( $favs ) )
 						return false;
 
-					$include          = implode( ',', (array) $favs );
+					$in = implode( ',', (array) $favs );
 					$display_comments = true;
+					$user_id = 0;
 					break;
 				case 'mentions':
 
+					// Are mentions disabled?
+					if ( ! bp_activity_do_mentions() ) {
+						return false;
+					}
+
 					// Start search at @ symbol and stop search at closing tag delimiter.
 					$search_terms     = '@' . bp_core_get_username( $user_id ) . '<';
 					$display_comments = 'stream';
@@ -453,6 +462,7 @@ function bp_has_activities( $args = '' ) {
 		'in'               => $in,
 		'filter'           => $filter,
 		'search_terms'     => $search_terms,
+		'meta_query'       => $meta_query,
 		'display_comments' => $display_comments,
 		'show_hidden'      => $show_hidden,
 		'spam'             => $spam
@@ -672,7 +682,7 @@ function bp_activities_no_activity() {
 	 * @global string $bp_activity_no_activity
 	 * @uses apply_filters() To call the 'bp_get_activities_no_activity' hook
 	 *
-	 * @return unknown_type
+	 * @return string
 	 */
 	function bp_get_activities_no_activity() {
 		global $bp_activity_no_activity;
@@ -1073,14 +1083,14 @@ function bp_activity_secondary_avatar( $args = '' ) {
 			case 'groups' :
 				$object  = 'group';
 				$item_id = $activities_template->activity->item_id;
+				$link    = '';
+				$name    = '';
 
 				// Only if groups is active
 				if ( bp_is_active( 'groups' ) ) {
 					$group = groups_get_group( array( 'group_id' => $item_id ) );
 					$link  = bp_get_group_permalink( $group );
 					$name  = $group->name;
-				} else {
-					$name = '';
 				}
 
 				if ( empty( $alt ) ) {
@@ -2019,6 +2029,34 @@ function bp_activity_thread_permalink() {
 	 	return apply_filters( 'bp_get_activity_thread_permalink', $link );
 	}
 
+/**
+ * Echoes the activity comment permalink
+ *
+ * @since BuddyPress (1.8)
+ *
+ * @uses bp_get_activity_permalink_id()
+ */
+function bp_activity_comment_permalink() {
+	echo bp_get_activity_comment_permalink();
+}
+	/**
+	 * Gets the activity comment permalink
+	 *
+	 * @since BuddyPress (1.8)
+	 *
+	 * @uses bp_activity_get_permalink()
+	 * @uses apply_filters() To call the 'bp_get_activity_comment_permalink' hook
+	 *
+	 * @return string $link The activity comment permalink
+	 */
+	function bp_get_activity_comment_permalink() {
+		global $activities_template;
+
+		$link = bp_activity_get_permalink( $activities_template->activity->id, $activities_template->activity ) . '#acomment-' . $activities_template->activity->current_comment->id;
+
+		return apply_filters( 'bp_get_activity_comment_permalink', $link );
+	}
+
 /**
  * Echoes the activity favorite link
  *
@@ -2395,6 +2433,10 @@ function bp_total_favorite_count_for_user( $user_id = 0 ) {
 	 * @return int The total favorite count for a specified user
 	 */
 	function bp_get_total_favorite_count_for_user( $user_id = 0 ) {
+		if ( ! $user_id ) {
+			$user_id = bp_displayed_user_id();
+		}
+
 		return apply_filters( 'bp_get_total_favorite_count_for_user', bp_activity_total_favorites_for_user( $user_id ) );
 	}
 
@@ -2408,7 +2450,7 @@ function bp_total_favorite_count_for_user( $user_id = 0 ) {
  * @uses bp_get_total_favorite_count_for_user()
  */
 function bp_total_mention_count_for_user( $user_id = 0 ) {
-	echo bp_get_total_favorite_count_for_user( $user_id );
+	echo bp_get_total_mention_count_for_user( $user_id );
 }
 
 	/**
@@ -2422,6 +2464,10 @@ function bp_total_mention_count_for_user( $user_id = 0 ) {
 	 * @return int The total mention count for a specified user
 	 */
 	function bp_get_total_mention_count_for_user( $user_id = 0 ) {
+		if ( ! $user_id ) {
+			$user_id = bp_displayed_user_id();
+		}
+
 		return apply_filters( 'bp_get_total_mention_count_for_user', bp_get_user_meta( $user_id, 'bp_new_mention_count', true ) );
 	}
 
@@ -2458,7 +2504,7 @@ function bp_send_public_message_link() {
 		if ( bp_is_my_profile() || !is_user_logged_in() )
 			return false;
 
-		return apply_filters( 'bp_get_send_public_message_link', wp_nonce_url( bp_loggedin_user_domain() . bp_get_activity_slug() . '/?r=' . bp_core_get_username( bp_displayed_user_id(), bp_get_displayed_user_username(), $bp->displayed_user->userdata->user_login ) ) );
+		return apply_filters( 'bp_get_send_public_message_link', wp_nonce_url( bp_get_activity_directory_permalink() . '?r=' . bp_core_get_username( bp_displayed_user_id(), bp_get_displayed_user_username(), $bp->displayed_user->userdata->user_login ) ) );
 	}
 
 /**
@@ -2757,7 +2803,7 @@ function bp_activities_member_rss_link() { echo bp_get_member_activity_feed_link
 			$link = bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/feed/';
 		elseif ( 'favorites' == bp_current_action() )
 			$link = bp_displayed_user_domain() . bp_get_activity_slug() . '/favorites/feed/';
-		elseif ( 'mentions' == bp_current_action() )
+		elseif ( 'mentions' == bp_current_action() && bp_activity_do_mentions() )
 			$link = bp_displayed_user_domain() . bp_get_activity_slug() . '/mentions/feed/';
 		else
 			$link = '';
diff --git a/wp-content/plugins/buddypress/bp-blogs/bp-blogs-actions.php b/wp-content/plugins/buddypress/bp-blogs/bp-blogs-actions.php
index 1f6bb7e1ae7bc434cbb32f5f8fdaf5bef02125e1..d259864998de23293fcfc12a9897a7331f4c22d1 100644
--- a/wp-content/plugins/buddypress/bp-blogs/bp-blogs-actions.php
+++ b/wp-content/plugins/buddypress/bp-blogs/bp-blogs-actions.php
@@ -26,7 +26,7 @@ function bp_blogs_redirect_to_random_blog() {
 	// Multisite is active so find a random blog
 	if ( is_multisite() ) {
 		$blog = bp_blogs_get_random_blogs( 1, 1 );
-		bp_core_redirect( get_site_url( $blog['blogs'][0]->blog_id ) );
+		bp_core_redirect( get_home_url( $blog['blogs'][0]->blog_id ) );
 
 	// No multisite and still called, always redirect to root
 	} else {
diff --git a/wp-content/plugins/buddypress/bp-blogs/bp-blogs-activity.php b/wp-content/plugins/buddypress/bp-blogs/bp-blogs-activity.php
index 46f5d19cb5b59ebc8f855b49f45a2823c8b38771..490b86e60f2bfaa15e7692fd92609e5963e112b8 100644
--- a/wp-content/plugins/buddypress/bp-blogs/bp-blogs-activity.php
+++ b/wp-content/plugins/buddypress/bp-blogs/bp-blogs-activity.php
@@ -73,7 +73,7 @@ function bp_blogs_record_activity( $args = '' ) {
 
 	// Remove large images and replace them with just one image thumbnail
  	if ( !empty( $content ) )
-		$content = bp_activity_thumbnail_content_images( $content, $primary_link );
+		$content = bp_activity_thumbnail_content_images( $content, $primary_link, $r );
 
 	if ( !empty( $action ) )
 		$action = apply_filters( 'bp_blogs_record_activity_action', $action );
@@ -101,7 +101,6 @@ function bp_blogs_record_activity( $args = '' ) {
  * @subpackage BlogsActivity
  * @global BuddyPress $bp
  * @param array $args
- * @return If activity is not active
  */
 function bp_blogs_delete_activity( $args = true ) {
 	global $bp;
diff --git a/wp-content/plugins/buddypress/bp-blogs/bp-blogs-cache.php b/wp-content/plugins/buddypress/bp-blogs/bp-blogs-cache.php
index 8f4b444491ac945db87f9df4ef7a743ddcb09f17..64660d15c55b3490f1a67a34508a068570a05e2e 100644
--- a/wp-content/plugins/buddypress/bp-blogs/bp-blogs-cache.php
+++ b/wp-content/plugins/buddypress/bp-blogs/bp-blogs-cache.php
@@ -33,7 +33,7 @@ function bp_blogs_clear_blog_object_cache( $blog_id, $user_id ) {
  * @since BuddyPress (1.0)
  * @package BuddyPress
  * @subpackage BlogsCache
- * @param Blog $recorded_blog_obj
+ * @param BP_Blogs_Blog $recorded_blog_obj
  */
 function bp_blogs_format_clear_blog_cache( $recorded_blog_obj ) {
 	bp_blogs_clear_blog_object_cache( false, $recorded_blog_obj->user_id );
diff --git a/wp-content/plugins/buddypress/bp-blogs/bp-blogs-functions.php b/wp-content/plugins/buddypress/bp-blogs/bp-blogs-functions.php
index f0410fcd3d30be6f159ace644b13c1db6206826f..7ecd4c3acf0dc910a6a50e23e0270bc2cb688142 100644
--- a/wp-content/plugins/buddypress/bp-blogs/bp-blogs-functions.php
+++ b/wp-content/plugins/buddypress/bp-blogs/bp-blogs-functions.php
@@ -49,21 +49,21 @@ function bp_blogs_record_existing_blogs() {
 	$wpdb->query( "TRUNCATE TABLE {$bp->blogs->table_name}" );
 
 	if ( is_multisite() ) {
-		$blog_ids = $wpdb->get_col( $wpdb->prepare( "SELECT blog_id FROM {$wpdb->base_prefix}blogs WHERE mature = 0 AND spam = 0 AND deleted = 0 AND site_id = %d" ), $wpdb->siteid );
+		$blog_ids = $wpdb->get_col( $wpdb->prepare( "SELECT blog_id FROM {$wpdb->base_prefix}blogs WHERE mature = 0 AND spam = 0 AND deleted = 0 AND site_id = %d", $wpdb->siteid ) );
 	} else {
 		$blog_ids = 1;
 	}
 
 	if ( !empty( $blog_ids ) ) {
 		foreach( (array) $blog_ids as $blog_id ) {
-			$users       = get_users( array( 'blog_id' => $blog_id ) );
-			$subscribers = get_users( array( 'blog_id' => $blog_id, 'role' => 'subscriber' ) );
+			$users       = get_users( array( 'blog_id' => $blog_id, 'fields' => 'ID' ) );
+			$subscribers = get_users( array( 'blog_id' => $blog_id, 'fields' => 'ID', 'role' => 'subscriber' ) );
 
 			if ( !empty( $users ) ) {
 				foreach ( (array) $users as $user ) {
 					// Don't record blogs for subscribers
 					if ( !in_array( $user, $subscribers ) ) {
-						bp_blogs_record_blog( $blog_id, $user->ID, true );
+						bp_blogs_record_blog( $blog_id, $user, true );
 					}
 				}
 			}
@@ -76,7 +76,7 @@ function bp_blogs_record_existing_blogs() {
  *
  * If $user_id is provided, you can restrict site from being recordable
  * only to particular users.
- * 
+ *
  * @since BuddyPress (1.7)
  * @param int $blog_id
  * @param int|null $user_id
@@ -104,7 +104,7 @@ function bp_blogs_is_blog_recordable( $blog_id, $user_id = 0 ) {
  * Makes BuddyPress aware of sites that activities shouldn't be trackable.
  * If $user_id is provided, the developer can restrict site from
  * being trackable only to particular users.
- * 
+ *
  * @since BuddyPress (1.7)
  * @param int $blog_id
  * @param int|null $user_id
@@ -135,7 +135,7 @@ function bp_blogs_is_blog_trackable( $blog_id, $user_id = 0 ) {
  * @since BuddyPress (1.0)
  * @param int $blog_id
  * @param int $user_id
- * @param $bool $no_activity ; optional.
+ * @param bool $no_activity Optional; defaults to false
  * @uses BP_Blogs_Blog
  */
 function bp_blogs_record_blog( $blog_id, $user_id, $no_activity = false ) {
@@ -172,8 +172,8 @@ function bp_blogs_record_blog( $blog_id, $user_id, $no_activity = false ) {
 		// Record this in activity streams
 		bp_blogs_record_activity( array(
 			'user_id'      => $recorded_blog->user_id,
-			'action'       => apply_filters( 'bp_blogs_activity_created_blog_action', sprintf( __( '%s created the site %s', 'buddypress'), bp_core_get_userlink( $recorded_blog->user_id ), '<a href="' . get_site_url( $recorded_blog->blog_id ) . '">' . esc_attr( $name ) . '</a>' ), $recorded_blog, $name, $description ),
-			'primary_link' => apply_filters( 'bp_blogs_activity_created_blog_primary_link', get_site_url( $recorded_blog->blog_id ), $recorded_blog->blog_id ),
+			'action'       => apply_filters( 'bp_blogs_activity_created_blog_action', sprintf( __( '%s created the site %s', 'buddypress'), bp_core_get_userlink( $recorded_blog->user_id ), '<a href="' . get_home_url( $recorded_blog->blog_id ) . '">' . esc_attr( $name ) . '</a>' ), $recorded_blog, $name, $description ),
+			'primary_link' => apply_filters( 'bp_blogs_activity_created_blog_primary_link', get_home_url( $recorded_blog->blog_id ), $recorded_blog->blog_id ),
 			'type'         => 'new_blog',
 			'item_id'      => $recorded_blog->blog_id
 		) );
@@ -257,7 +257,6 @@ function bp_blogs_record_post( $post_id, $post, $user_id = 0 ) {
 			if ( bp_is_active( 'activity' ) ) {
 				$existing = bp_activity_get( array(
 					'filter' => array(
-						'user_id'      => (int) $post->post_author,
 						'action'       => 'new_blog_post',
 						'primary_id'   => $blog_id,
 						'secondary_id' => $post_id,
@@ -709,7 +708,7 @@ function bp_blogs_update_blogmeta( $blog_id, $meta_key, $meta_value ) {
 	$meta_key = preg_replace( '|[^a-z0-9_]|i', '', $meta_key );
 
 	if ( is_string($meta_value) )
-		$meta_value = stripslashes($wpdb->escape($meta_value));
+		$meta_value = stripslashes( esc_sql( $meta_value ) );
 
 	$meta_value = maybe_serialize($meta_value);
 
diff --git a/wp-content/plugins/buddypress/bp-blogs/bp-blogs-loader.php b/wp-content/plugins/buddypress/bp-blogs/bp-blogs-loader.php
index 6eaa1111f80625e75bb3e13548fa8ef2526f3618..a4762731453c66d4406f4bf2ff6f17bfe615431e 100644
--- a/wp-content/plugins/buddypress/bp-blogs/bp-blogs-loader.php
+++ b/wp-content/plugins/buddypress/bp-blogs/bp-blogs-loader.php
@@ -36,7 +36,7 @@ class BP_Blogs_Component extends BP_Component {
 	 * @since BuddyPress (1.5)
 	 * @global BuddyPress $bp The one true BuddyPress instance
 	 */
-	function setup_globals() {
+	public function setup_globals( $args = array() ) {
 		global $bp;
 
 		if ( !defined( 'BP_BLOGS_SLUG' ) )
@@ -67,7 +67,7 @@ class BP_Blogs_Component extends BP_Component {
 	/**
 	 * Include files
 	 */
-	function includes() {
+	public function includes( $includes = array() ) {
 		// Files to include
 		$includes = array(
 			'cache',
@@ -93,7 +93,7 @@ class BP_Blogs_Component extends BP_Component {
 	 *
 	 * @global BuddyPress $bp The one true BuddyPress instance
 	 */
-	function setup_nav() {
+	public function setup_nav( $main_nav = array(), $sub_nav = array() ) {
 		global $bp;
 
 		/**
@@ -145,7 +145,7 @@ class BP_Blogs_Component extends BP_Component {
 	 *
 	 * @global BuddyPress $bp The one true BuddyPress instance
 	 */
-	function setup_admin_bar() {
+	public function setup_admin_bar( $wp_admin_nav = array() ) {
 		global $bp;
 
 		/**
@@ -180,6 +180,15 @@ class BP_Blogs_Component extends BP_Component {
 				'href'   => trailingslashit( $blogs_link )
 			);
 
+			// Create a Blog
+			if ( bp_blog_signup_enabled() ) {
+				$wp_admin_nav[] = array(
+					'parent' => 'my-account-' . $this->id,
+					'id'     => 'my-account-' . $this->id . '-create',
+					'title'  => __( 'Create a Blog', 'buddypress' ),
+					'href'   => trailingslashit( bp_get_blogs_directory_permalink() . 'create' )
+				);
+			}
 		}
 
 		parent::setup_admin_bar( $wp_admin_nav );
diff --git a/wp-content/plugins/buddypress/bp-blogs/bp-blogs-screens.php b/wp-content/plugins/buddypress/bp-blogs/bp-blogs-screens.php
index 6ffd8278650d9aaf8f053a0a024ac04f60485c25..72bd7dd3de38b35caa758c3000b2af0091fdb75f 100644
--- a/wp-content/plugins/buddypress/bp-blogs/bp-blogs-screens.php
+++ b/wp-content/plugins/buddypress/bp-blogs/bp-blogs-screens.php
@@ -86,11 +86,13 @@ class BP_Blogs_Theme_Compat {
 
 			do_action( 'bp_blogs_screen_index' );
 
+			add_filter( 'bp_get_buddypress_template',                array( $this, 'directory_template_hierarchy' ) );
 			add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'directory_dummy_post' ) );
 			add_filter( 'bp_replace_the_content',                    array( $this, 'directory_content'    ) );
 
 		// Create blog
 		} elseif ( is_user_logged_in() && bp_blog_signup_enabled() ) {
+			add_filter( 'bp_get_buddypress_template',                array( $this, 'create_template_hierarchy' ) );
 			add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'create_dummy_post' ) );
 			add_filter( 'bp_replace_the_content',                    array( $this, 'create_content'    ) );			
 		}
@@ -98,6 +100,29 @@ class BP_Blogs_Theme_Compat {
 
 	/** Directory *************************************************************/
 
+	/**
+	 * Add template hierarchy to theme compat for the blog directory page.
+	 *
+	 * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
+	 *
+	 * @since BuddyPress (1.8)
+	 *
+	 * @param string $templates The templates from bp_get_theme_compat_templates()
+	 * @return array $templates Array of custom templates to look for.
+	 */
+	public function directory_template_hierarchy( $templates ) {
+		// Setup our templates based on priority
+		$new_templates = apply_filters( 'bp_template_hierarchy_blogs_create', array(
+			'blogs/index-directory.php'
+		) );
+
+		// Merge new templates with existing stack
+		// @see bp_get_theme_compat_templates()
+		$templates = array_merge( (array) $new_templates, $templates );
+
+		return $templates;
+	}
+
 	/**
 	 * Update the global $post with directory data
 	 *
@@ -136,6 +161,29 @@ class BP_Blogs_Theme_Compat {
 	
 	/** Create ****************************************************************/
 
+	/**
+	 * Add custom template hierarchy to theme compat for the blog create page.
+	 *
+	 * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
+	 *
+	 * @since BuddyPress (1.8)
+	 *
+	 * @param string $templates The templates from bp_get_theme_compat_templates()
+	 * @return array $templates Array of custom templates to look for.
+	 */
+	public function create_template_hierarchy( $templates ) {
+		// Setup our templates based on priority
+		$new_templates = apply_filters( 'bp_template_hierarchy_blogs_create', array(
+			'blogs/index-create.php'
+		) );
+
+		// Merge new templates with existing stack
+		// @see bp_get_theme_compat_templates()
+		$templates = array_merge( (array) $new_templates, $templates );
+
+		return $templates;
+	}
+
 	/**
 	 * Update the global $post with create screen data
 	 *
diff --git a/wp-content/plugins/buddypress/bp-blogs/bp-blogs-template.php b/wp-content/plugins/buddypress/bp-blogs/bp-blogs-template.php
index c1545647835c80c8557b0bba04010683dd2d9996..636d5253107d804a6c825fb5af27723e6b53c13e 100644
--- a/wp-content/plugins/buddypress/bp-blogs/bp-blogs-template.php
+++ b/wp-content/plugins/buddypress/bp-blogs/bp-blogs-template.php
@@ -705,7 +705,7 @@ function bp_blogs_subdomain_base() {
 	 * a subdomain installation of WordPress MS
 	 *
 	 * @since BuddyPress (1.6)
-	 * @return str The base URL - eg, 'example.com' for site_url() example.com or www.example.com
+	 * @return string The base URL - eg, 'example.com' for site_url() example.com or www.example.com
 	 */
 	function bp_blogs_get_subdomain_base() {
 		global $current_site;
@@ -788,9 +788,7 @@ function bp_blogs_blog_tabs() {
 	</ul>
 
 <?php
-
-	// @todo where does $current_tab come from?
-	do_action( 'bp_blogs_blog_tabs', $current_tab );
+	do_action( 'bp_blogs_blog_tabs' );
 }
 
 function bp_directory_blogs_search_form() {
diff --git a/wp-content/plugins/buddypress/bp-blogs/bp-blogs-widgets.php b/wp-content/plugins/buddypress/bp-blogs/bp-blogs-widgets.php
index 506d788ac4e5d508a2d4c62024c1e75197acac2a..fe161f0e3a06c7c04c4dd2e5e2752ea8b20326ad 100644
--- a/wp-content/plugins/buddypress/bp-blogs/bp-blogs-widgets.php
+++ b/wp-content/plugins/buddypress/bp-blogs/bp-blogs-widgets.php
@@ -19,18 +19,29 @@ function bp_blogs_register_widgets() {
 }
 add_action( 'bp_register_widgets', 'bp_blogs_register_widgets' );
 
+/**
+ * The Recent Networkwide Posts widget
+ */
 class BP_Blogs_Recent_Posts_Widget extends WP_Widget {
 
 	function __construct() {
-		parent::__construct( false, $name = _x( '(BuddyPress) Recent Networkwide Posts', 'widget name', 'buddypress' ) );
+		$widget_ops = array(
+			'description' => __( 'A list of recently published posts from across your network.', 'buddypress' ),
+			'classname'   => 'widget_bp_blogs_widget buddypress widget',
+		);
+		parent::__construct( false, $name = _x( '(BuddyPress) Recent Networkwide Posts', 'widget name', 'buddypress' ), $widget_ops );
 	}
 
-	function widget($args, $instance) {
+	function widget( $args, $instance ) {
+
+		$title = ! empty( $instance['title'] ) ? esc_html( $instance['title'] ) : __( 'Recent Networkwide Posts', 'buddypress' );
 
-		extract( $args );
+		if ( ! empty( $instance['link_title'] ) ) {
+			$title = '<a href="' . trailingslashit( bp_get_root_domain() ) . trailingslashit( bp_get_blogs_root_slug() ) . '">' . esc_html( $title ) . '</a>';
+		}
 
-		echo $before_widget;
-		echo $before_title . $widget_name . $after_title;
+		echo $args['before_widget'];
+		echo $args['before_title'] . $title . $args['after_title'];
 
 		if ( empty( $instance['max_posts'] ) || !$instance['max_posts'] )
 			$instance['max_posts'] = 10; ?>
@@ -68,23 +79,35 @@ class BP_Blogs_Recent_Posts_Widget extends WP_Widget {
 			</div>
 		<?php endif; ?>
 
-		<?php echo $after_widget; ?>
+		<?php echo $args['after_widget']; ?>
 	<?php
 	}
 
 	function update( $new_instance, $old_instance ) {
 		$instance = $old_instance;
+		$instance['title'] = strip_tags( $new_instance['title'] );
 		$instance['max_posts'] = strip_tags( $new_instance['max_posts'] );
+		$instance['link_title'] = (bool) $new_instance['link_title'];
 
 		return $instance;
 	}
 
 	function form( $instance ) {
-		$instance = wp_parse_args( (array) $instance, array( 'max_posts' => 10 ) );
+		$instance = wp_parse_args( (array) $instance, array(
+			'title'      => __( 'Recent Networkwide Posts', 'buddypress' ),
+			'max_posts'  => 10,
+			'link_title' => false,
+		) );
+
+		$title = strip_tags( $instance['title'] );
 		$max_posts = strip_tags( $instance['max_posts'] );
+		$link_title = (bool) $instance['link_title'];
+
 		?>
 
-		<p><label for="bp-blogs-widget-posts-max"><?php _e('Max posts to show:', 'buddypress'); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'max_posts' ); ?>" name="<?php echo $this->get_field_name( 'max_posts' ); ?>" type="text" value="<?php echo esc_attr( $max_posts ); ?>" style="width: 30%" /></label></p>
-	<?php
+		<p><label for="<?php echo $this->get_field_id( 'title' ) ?>"><?php _ex( 'Title:', 'Label for the Title field of the Recent Networkwide Posts widget', 'buddypress' ) ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ) ?>" name="<?php echo $this->get_field_name( 'title' ) ?>" type="text" value="<?php echo esc_attr( $title ) ?>" style="width: 100%;" /></label></p>
+		<p><label for="<?php echo $this->get_field_id( 'link_title' ) ?>"><input type="checkbox" name="<?php echo $this->get_field_name( 'link_title' ) ?>" value="1" <?php checked( $link_title ) ?> /> <?php _e( 'Link widget title to Blogs directory', 'buddypress' ) ?></label></p>
+		<p><label for="<?php echo $this->get_field_id( 'max_posts' ) ?>"><?php _e( 'Max posts to show:', 'buddypress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'max_posts' ); ?>" name="<?php echo $this->get_field_name( 'max_posts' ); ?>" type="text" value="<?php echo esc_attr( $max_posts ); ?>" style="width: 30%" /></label></p>
+		<?php
 	}
 }
diff --git a/wp-content/plugins/buddypress/bp-core/admin/bp-core-components.php b/wp-content/plugins/buddypress/bp-core/admin/bp-core-components.php
index 544c86bfb2cbeb6bf43c7c497ed6bb2eb44a7665..e15ed3f65405dab889a888eeb841d1b31b39e02d 100644
--- a/wp-content/plugins/buddypress/bp-core/admin/bp-core-components.php
+++ b/wp-content/plugins/buddypress/bp-core/admin/bp-core-components.php
@@ -221,7 +221,6 @@ function bp_core_admin_components_options() {
  *
  * @since BuddyPress (1.6)
  * @todo Use settings API when it supports saving network settings
- * @return If not time to save settings
  */
 function bp_core_admin_components_settings_handler() {
 
diff --git a/wp-content/plugins/buddypress/bp-core/admin/bp-core-functions.php b/wp-content/plugins/buddypress/bp-core/admin/bp-core-functions.php
index a727417649e36b473af920b3e1dbb4dec5031c95..7e145fa3a9f17bb52cdabbe4ed9544f66e476871 100644
--- a/wp-content/plugins/buddypress/bp-core/admin/bp-core-functions.php
+++ b/wp-content/plugins/buddypress/bp-core/admin/bp-core-functions.php
@@ -308,8 +308,6 @@ function bp_core_activation_notice() {
  * @uses wp_safe_redirect() To redirect
  * @uses add_query_arg() To help build the URL to redirect to
  * @uses admin_url() To get the admin URL to index.php
- *
- * @return If no transient, or is bulk activation
  */
 function bp_do_activation_redirect() {
 
@@ -365,6 +363,18 @@ function bp_core_admin_tabs( $active_tab = '' ) {
 		)
 	);
 
+	// If forums component is active, add additional tab
+	if ( bp_is_active( 'forums' ) && class_exists( 'BP_Forums_Component' ) ) {
+		// enqueue thickbox
+		wp_enqueue_script( 'thickbox' );
+		wp_enqueue_style( 'thickbox' );
+
+		$tabs['3'] = array(
+			'href' => bp_get_admin_url( add_query_arg( array( 'page' => 'bb-forums-setup'  ), 'admin.php' ) ),
+			'name' => __( 'Forums', 'buddypress' )
+		);
+	}
+
 	// Loop through tabs and build navigation
 	foreach ( array_values( $tabs ) as $tab_data ) {
 		$is_current = (bool) ( $tab_data['name'] == $active_tab );
diff --git a/wp-content/plugins/buddypress/bp-core/admin/bp-core-slugs.php b/wp-content/plugins/buddypress/bp-core/admin/bp-core-slugs.php
index 3f3d10ee4f9a9ce0caa27f5da47d85351637041c..8de0a08bf1e6fe330cc634beec1f3c514c3f8ae4 100644
--- a/wp-content/plugins/buddypress/bp-core/admin/bp-core-slugs.php
+++ b/wp-content/plugins/buddypress/bp-core/admin/bp-core-slugs.php
@@ -194,7 +194,6 @@ function bp_core_admin_slugs_options() {
  *
  * @since BuddyPress (1.6)
  * @todo Use settings API
- * @return False if referer does not check out
  */
 function bp_core_admin_slugs_setup_handler() {
 
diff --git a/wp-content/plugins/buddypress/bp-core/bp-core-actions.php b/wp-content/plugins/buddypress/bp-core/bp-core-actions.php
index 9c2c3b816393e278e5337f977958775d2ff4f496..57b378d1fc7095087d6e88e448e2dd231d168c2e 100644
--- a/wp-content/plugins/buddypress/bp-core/bp-core-actions.php
+++ b/wp-content/plugins/buddypress/bp-core/bp-core-actions.php
@@ -41,6 +41,7 @@ add_action( 'wp_enqueue_scripts',      'bp_enqueue_scripts',        10    );
 add_action( 'admin_bar_menu',          'bp_setup_admin_bar',        20    ); // After WP core
 add_action( 'template_redirect',       'bp_template_redirect',      10    );
 add_action( 'widgets_init',            'bp_widgets_init',           10    );
+add_action( 'generate_rewrite_rules',  'bp_generate_rewrite_rules', 10    );
 
 /**
  * bp_loaded - Attached to 'plugins_loaded' above
@@ -67,6 +68,7 @@ add_action( 'bp_init', 'bp_setup_globals',           4  );
 add_action( 'bp_init', 'bp_setup_nav',               6  );
 add_action( 'bp_init', 'bp_setup_title',             8  );
 add_action( 'bp_init', 'bp_core_load_admin_bar_css', 12 );
+add_action( 'bp_init', 'bp_add_rewrite_tags',        20 );
 
 /**
  * bp_template_redirect - Attached to 'template_redirect' above
diff --git a/wp-content/plugins/buddypress/bp-core/bp-core-admin.php b/wp-content/plugins/buddypress/bp-core/bp-core-admin.php
index a6fb61b7b03aabc766861f4913d9affec3373847..7fb67f5ed2424c628eb25044f94b73cb92de8a5f 100644
--- a/wp-content/plugins/buddypress/bp-core/bp-core-admin.php
+++ b/wp-content/plugins/buddypress/bp-core/bp-core-admin.php
@@ -380,15 +380,15 @@ class BP_Admin {
 		list( $display_version ) = explode( '-', bp_get_version() ); ?>
 
 		<div class="wrap about-wrap">
-			<h1><?php printf( __( 'Welcome to BuddyPress %s' ), $display_version ); ?></h1>
+			<h1><?php printf( __( 'Welcome to BuddyPress %s', 'buddypress' ), $display_version ); ?></h1>
 			<div class="about-text">
 				<?php if ( $is_new_install ) : ?>
-					<?php printf( __( 'BuddyPress %s is our safest, fastest, most flexible version ever.' ), $display_version ); ?>
+					<?php printf( __( 'BuddyPress %s is our safest, fastest, most flexible version ever.', 'buddypress' ), $display_version ); ?>
 				<?php else : ?>
-					<?php printf( __( 'Thank you for updating! BuddyPress %s is our safest, fastest, most flexible version ever.' ), $display_version ); ?>
+					<?php printf( __( 'Thank you for updating! BuddyPress %s is our safest, fastest, most flexible version ever.', 'buddypress' ), $display_version ); ?>
 				<?php endif; ?>
 			</div>
-			<div class="bp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
+			<div class="bp-badge"><?php printf( __( 'Version %s', 'buddypress' ), $display_version ); ?></div>
 
 			<h2 class="nav-tab-wrapper">
 				<a class="nav-tab nav-tab-active" href="<?php echo esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-about' ), 'index.php' ) ) ); ?>">
@@ -418,19 +418,19 @@ class BP_Admin {
 			<?php endif; ?>
 
 			<div class="changelog">
-				<h3><?php _e( 'A Declaration of (Theme) Independence', 'buddypress' ); ?></h3>
+				<h3><?php _e( 'Improved Theme Integration', 'buddypress' ); ?></h3>
 
 				<div class="feature-section">
-					<h4><?php _e( 'It Just Works', 'buddypress' ); ?></h4>
-					<p><?php _e( 'BuddyPress is now compatible with <strong>any WordPress theme</strong>. If your theme has BuddyPress-specific templates and styling, we&#8217;ll use them. If not, we provide what you need to make your BuddyPress content look great. Still want to customize? No problem - you can override our templates just like you would in a WordPress child theme. <a href="http://codex.buddypress.org/theme-compatibility/">Learn more about theme compatibility</a>.', 'buddypress' ); ?></p>
+					<h4><?php _e( 'Hey, Good Lookin&#8217;', 'buddypress' ); ?></h4>
+					<p><?php _e( 'We&#8217;ve streamlined our stylesheets, so that BuddyPress content looks more at home in your theme. And theme developers will love BP&#8217;s new hierarchies that make it easy to override specific top-level templates, stylesheets, and JavaScript files.', 'buddypress' ) ?></p>
 				</div>
 			</div>
 
 			<div class="changelog">
-				<h3><?php _e( 'Group Management', 'buddypress' ); ?></h3>
+				<h3><?php _e( 'Better Group Member Management', 'buddypress' ); ?></h3>
 
 				<div class="feature-section">
-					<h4><?php _e( 'Get More Done Quickly', 'buddypress' ); ?></h4>
+					<h4><?php _e( '<em>Add</em>, <em>Remove</em>, and More, in a Snap', 'buddypress' ); ?></h4>
 
 					<?php
 					$group_admin_text = __( 'Groups administration panel', 'buddypress' );
@@ -440,7 +440,7 @@ class BP_Admin {
 					?>
 
 					<p><?php printf(
-						__( 'The new %s makes it easy to handle large numbers of groups on your BuddyPress installation. Delete groups, edit group details, modify memberships, and more, with just a few clicks.', 'buddypress' ),
+						__( 'The Manage Members section of the %s has been rewritten, to make it easier to handle groups with many members. We&#8217;ve also made the interface nicer to use, to ensure that you don&#8217;t make changes and then forget to save them.', 'buddypress' ),
 						$group_admin_text
 					); ?></p>
 				</div>
@@ -451,19 +451,19 @@ class BP_Admin {
 
 				<div class="feature-section three-col">
 					<div>
-						<h4><?php _e( 'Faster Member Queries', 'buddypress' ); ?></h4>
-						<p><?php _e( 'The new <code>BP_User_Query</code> makes member queries (like in the Members directory) up to 4x faster than before.', 'buddypress' ); ?></p>
+						<h4><?php _e( 'Superpowered Group Extensions', 'buddypress' ); ?></h4>
+						<p><?php _e( '<code>BP_Group_Extension</code> has been overhauled, making it easier than ever before to add custom functionality to groups.', 'buddypress' ); ?></p>
 
-						<h4><?php _e( 'Sortable Profile Options', 'buddypress' ); ?></h4>
-						<p><?php _e( 'Profile field types with multiple options - like radio buttons and checkboxes - now support drag-and-drop reordering.', 'buddypress' ); ?></p>
+						<h4><?php _e( 'Filter Groups or Activity by Metadata', 'buddypress' ); ?></h4>
+						<p><?php _e( '<code>bp_has_groups()</code> and <code>bp_has_activities()</code> now accept a <code>meta_query</code> paramater, for more powerful directory queries.', 'buddypress' ); ?></p>
 					</div>
 
 					<div>
-						<h4><?php _e( 'New Visibility Level', 'buddypress' ); ?></h4>
-						<p><?php _e( 'By popular demand, the "Admins Only" visibility setting is now available for profile fields.', 'buddypress' ); ?></p>
+						<h4><?php _e( 'Feed Me, Seymour', 'buddypress' ); ?></h4>
+						<p><?php _e( 'The new <code>BP_Activity_Feed</code> class centralizes BP&#8217;s RSS logic, making our feeds more standards-compliant, and giving developers more tools for building custom feeds.', 'buddypress' ); ?></p>
 
-						<h4><?php _e( 'Better bbPress Integration', 'buddypress' ); ?></h4>
-						<p><?php _e( 'Support for group and sitewide forums, using the latest version of the bbPress plugin, is better than ever. Still using bbPress 1.x? Our new migration tools are field-tested.', 'buddypress' ); ?></p>
+						<h4><?php _e( 'Disable @-Mentions', 'buddypress' ); ?></h4>
+						<p><?php _e( "Not using @-mentions? Disable them with <code>add_filter( 'bp_activity_do_mentions', '__return_false' );</code>", 'buddypress' ); ?></p>
 					</div>
 			</div>
 
@@ -489,9 +489,9 @@ class BP_Admin {
 		list( $display_version ) = explode( '-', bp_get_version() ); ?>
 
 		<div class="wrap about-wrap">
-			<h1><?php printf( __( 'Welcome to BuddyPress %s' ), $display_version ); ?></h1>
-			<div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! BuddyPress %s is ready to make your community a safer, faster, and better looking place to hang out!' ), $display_version ); ?></div>
-			<div class="bp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
+			<h1><?php printf( __( 'Welcome to BuddyPress %s', 'buddypress' ), $display_version ); ?></h1>
+			<div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! BuddyPress %s is ready to make your community a safer, faster, and better looking place to hang out!', 'buddypress' ), $display_version ); ?></div>
+			<div class="bp-badge"><?php printf( __( 'Version %s', 'buddypress' ), $display_version ); ?></div>
 
 			<h2 class="nav-tab-wrapper">
 				<a href="<?php echo esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-about' ), 'index.php' ) ) ); ?>" class="nav-tab">
@@ -549,49 +549,52 @@ class BP_Admin {
 				</li>
 			</ul>
 
-			<h4 class="wp-people-group"><?php _e( 'Core Contributors to BuddyPress 1.7', 'buddypress' ); ?></h4>
+			<h4 class="wp-people-group"><?php _e( 'Core Contributors to BuddyPress 1.8', 'buddypress' ); ?></h4>
 			<p class="wp-credits-list">
-				<a href="http://profiles.wordpress.org/aesqe">aesqe</a>,
-				<a href="http://profiles.wordpress.org/apeatling">apeatling</a>,
+				<a href="http://profiles.wordpress.org/boonebgorges">boonebgorges</a>,
 				<a href="http://profiles.wordpress.org/borkweb">borkweb</a>,
-				<a href="http://profiles.wordpress.org/calin">calin</a>,
 				<a href="http://profiles.wordpress.org/chouf1">chouf1</a>,
-				<a href="http://profiles.wordpress.org/chrisclayton">chrisclayton</a>,
-				<a href="http://profiles.wordpress.org/cnorris23">cnorris23</a>,
+				<a href="http://profiles.wordpress.org/chriskeeble">chriskeeble</a>,
+				<a href="http://profiles.wordpress.org/chroniko">chroniko</a>,
+				<a href="http://profiles.wordpress.org/czarate">czarate</a>,
+				<a href="http://profiles.wordpress.org/danbp">danbp</a>,
+				<a href="http://profiles.wordpress.org/dcavins">dcavins</a>,
+				<a href="http://profiles.wordpress.org/dcowgill">dcowgill</a>,
 				<a href="http://profiles.wordpress.org/ddean">ddean</a>,
-				<a href="http://profiles.wordpress.org/DennisSmolek">DennisSmolek</a>,
-				<a href="http://profiles.wordpress.org/Dianakc">Dianakc</a>,
+				<a href="http://profiles.wordpress.org/djpaul">djpaul</a>,
 				<a href="http://profiles.wordpress.org/dontdream">dontdream</a>,
-				<a href="http://profiles.wordpress.org/empireoflight">empireoflight</a>,
-				<a href="http://profiles.wordpress.org/enej">enej</a>,
-				<a href="http://profiles.wordpress.org/ethitter">ethitter</a>,
-				<a href="http://profiles.wordpress.org/fanquake">fanquake</a>,
-				<a href="http://profiles.wordpress.org/gmax21">gmax21</a>,
+				<a href="http://profiles.wordpress.org/eggproject">eggproject</a>,
+				<a href="http://profiles.wordpress.org/ericlewis">ericlewis</a>,
+				grahamwashbroo,
 				<a href="http://profiles.wordpress.org/hnla">hnla</a>,
-				<a href="http://profiles.wordpress.org/humanshell">humanshell</a>,
 				<a href="http://profiles.wordpress.org/imath">imath</a>,
-				<a href="http://profiles.wordpress.org/Jacek">Jacek</a>,
-				<a href="http://profiles.wordpress.org/jag1989">jag1989</a>,
-				<a href="http://profiles.wordpress.org/jbobich">jbobich</a>,
-				<a href="http://profiles.wordpress.org/jkudish">jkudish</a>,
-				<a href="http://profiles.wordpress.org/jpsb">jpsb</a>,
-				<a href="http://profiles.wordpress.org/MacPresss">MacPresss</a>,
+				<a href="http://profiles.wordpress.org/johnjamesjacoby">johnjamesjacoby</a>,
+				<a href="http://profiles.wordpress.org/karmatosed">karmatosed</a>,
+				<a href="http://profiles.wordpress.org/lenasterg">lenasterg</a>,
 				<a href="http://profiles.wordpress.org/magnus78">magnus78</a>,
-				<a href="http://profiles.wordpress.org/markjaquith">markjaquith</a>,
-				<a href="http://profiles.wordpress.org/Maty">Maty</a>,
-				<a href="http://profiles.wordpress.org/michael.ecklund">michael.ecklund</a>,
+				<a href="http://profiles.wordpress.org/megainfo">megainfo</a>,
+				<a href="http://profiles.wordpress.org/rogercoathup">rogercoathup</a>,
+				<a href="http://profiles.wordpress.org/mercime">mercime</a>,
+				<a href="http://profiles.wordpress.org/merty">merty</a>,
+				<a href="http://profiles.wordpress.org/mjustice">mjustice</a>,
 				<a href="http://profiles.wordpress.org/modemlooper">modemlooper</a>,
+				<a href="http://profiles.wordpress.org/mort3n">mort3n</a>,
+				<a href="http://profiles.wordpress.org/mukkundthanki">mukkundthanki</a>,
 				<a href="http://profiles.wordpress.org/nacin">nacin</a>,
-				<a href="http://profiles.wordpress.org/netweb">netweb</a>,
-				<a href="http://profiles.wordpress.org/rogercoathup">rogercoathup</a>,
-				<a href="http://profiles.wordpress.org/sboisvert">sboisvert</a>,
+				<a href="http://profiles.wordpress.org/needle">needle</a>,
+				<a href="http://profiles.wordpress.org/r-a-y">r-a-y</a>,
+				<a href="http://profiles.wordpress.org/saurabhshukla">saurabhshukla</a>,
 				<a href="http://profiles.wordpress.org/sbrajesh">sbrajesh</a>,
-				<a href="http://profiles.wordpress.org/slaFFik">slaFFik</a>,
-				<a href="http://profiles.wordpress.org/steve7777">steve7777</a>,
-				<a href="http://profiles.wordpress.org/tiraeth">tiraeth</a>,
-				<a href="http://profiles.wordpress.org/will_c">will_c</a>,
-				<a href="http://profiles.wordpress.org/wpdennis">wpdennis</a>,
-				<a href="http://profiles.wordpress.org/xt4v">xt4v</a>.
+				<a href="http://profiles.wordpress.org/SergeyBiryukov">SergeyBiryukov</a>,
+				<a href="http://profiles.wordpress.org/SGr33n">SGr33n</a>,
+				<a href="http://profiles.wordpress.org/shanebp">shanebp</a>,
+				<a href="http://profiles.wordpress.org/splatte">splatte</a>,
+				<a href="http://profiles.wordpress.org/thebrandonallen">thebrandonallen</a>,
+				<a href="http://profiles.wordpress.org/themightymo">themightymo</a>,
+				<a href="http://profiles.wordpress.org/tivnet">tivnet</a>,
+				<a href="http://profiles.wordpress.org/trishasalas">trishasalas</a>,
+				<a href="http://profiles.wordpress.org/vegasgeek">vegasgeek</a>,
+				<a href="http://profiles.wordpress.org/wpdennis">wpdennis</a>
 			</p>
 
 			<div class="return-to-dashboard">
diff --git a/wp-content/plugins/buddypress/bp-core/bp-core-adminbar.php b/wp-content/plugins/buddypress/bp-core/bp-core-adminbar.php
index e674ba9278e0e64b18c2a9c2f59c96364c2f392d..3fe2c05a377f1d028a0859b83ea2e30fb4e298ee 100644
--- a/wp-content/plugins/buddypress/bp-core/bp-core-adminbar.php
+++ b/wp-content/plugins/buddypress/bp-core/bp-core-adminbar.php
@@ -17,7 +17,6 @@ if ( !defined( 'ABSPATH' ) ) exit;
  *
  * @since BuddyPress 1.6
  * @global WP_Admin_Bar $wp_admin_bar
- * @return If doing ajax
  */
 function bp_admin_bar_my_account_root() {
 	global $wp_admin_bar;
@@ -62,6 +61,7 @@ add_action( 'admin_bar_menu', 'bp_admin_bar_my_account_root', 100 );
  * @uses add_action() To hook 'bp_core_admin_bar' to 'admin_footer'
  */
 function bp_core_load_admin_bar() {
+
 	// Show the Toolbar for logged out users
 	if ( ! is_user_logged_in() && (int) bp_get_option( 'hide-loggedout-adminbar' ) != 1 ) {
 		show_admin_bar( true );
diff --git a/wp-content/plugins/buddypress/bp-core/bp-core-avatars.php b/wp-content/plugins/buddypress/bp-core/bp-core-avatars.php
index c4f61698d69fa97d8f17daa2974b9983bf67685f..4962ea881d29f18de4bac66032bb54d3568607c0 100644
--- a/wp-content/plugins/buddypress/bp-core/bp-core-avatars.php
+++ b/wp-content/plugins/buddypress/bp-core/bp-core-avatars.php
@@ -338,7 +338,7 @@ function bp_core_fetch_avatar( $args = '' ) {
 
 			// ...or only the URL
 			} else {
-				return apply_filters( 'bp_core_fetch_avatar_url', $avatar_url );
+				return apply_filters( 'bp_core_fetch_avatar_url', $avatar_url, $params );
 			}
 		}
 	}
@@ -399,7 +399,7 @@ function bp_core_fetch_avatar( $args = '' ) {
 	if ( true === $html ) {
 		return apply_filters( 'bp_core_fetch_avatar', '<img src="' . $gravatar . '" class="' . esc_attr( $class ) . '"' . $css_id . $html_width . $html_height . $html_alt . $title . ' />', $params, $item_id, $avatar_dir, $css_id, $html_width, $html_height, $avatar_folder_url, $avatar_folder_dir );
 	} else {
-		return apply_filters( 'bp_core_fetch_avatar_url', $gravatar );
+		return apply_filters( 'bp_core_fetch_avatar_url', $gravatar, $params );
 	}
 }
 
@@ -701,7 +701,7 @@ function bp_core_avatar_handle_crop( $args = '' ) {
  * @param int $size Size of the avatar image (thumb/full)
  * @param string $default URL to a default image to use if no avatar is available
  * @param string $alt Alternate text to use in image tag. Defaults to blank
- * @return <type>
+ * @return string
  */
 function bp_core_fetch_avatar_filter( $avatar, $user, $size, $default, $alt = '' ) {
 	global $pagenow;
@@ -783,49 +783,107 @@ function bp_core_check_avatar_type($file) {
 }
 
 /**
- * bp_core_avatar_upload_path()
+ * Fetches data from the BP root blog's upload directory.
  *
- * Returns the absolute upload path for the WP installation
+ * Handy for multisite instances because all uploads are made on the BP root
+ * blog and we need to query the BP root blog for the upload directory data.
  *
- * @uses wp_upload_dir To get upload directory info
- * @return string Absolute path to WP upload directory
+ * This function ensures that we only need to use {@link switch_to_blog()}
+ * once to get what we need.
+ *
+ * @since BuddyPress (1.8)
+ *
+ * @uses wp_upload_dir()
+ *
+ * @param string $type The variable we want to return from the $bp->avatars object.
+ *  Only 'upload_path' and 'url' are supported.
+ * @return string
  */
-function bp_core_avatar_upload_path() {
+function bp_core_get_upload_dir( $type = 'upload_path' ) {
 	$bp = buddypress();
 
+	switch ( $type ) {
+		case 'upload_path' :
+			$constant = 'BP_AVATAR_UPLOAD_PATH';
+			$key      = 'basedir';
+
+			break;
+
+		case 'url' :
+			$constant = 'BP_AVATAR_URL';
+			$key      = 'baseurl';
+
+			break;
+
+		default :
+			return false;
+
+			break;
+	}
+
 	// See if the value has already been calculated and stashed in the $bp global
-	if ( isset( $bp->avatar->upload_path ) ) {
-		$basedir = $bp->avatar->upload_path;
+	if ( isset( $bp->avatar->$type ) ) {
+		$retval = $bp->avatar->$type;
 	} else {
 		// If this value has been set in a constant, just use that
-		if ( defined( 'BP_AVATAR_UPLOAD_PATH' ) ) {
-			$basedir = BP_AVATAR_UPLOAD_PATH;
+		if ( defined( $constant ) ) {
+			$retval = constant( $constant );
 		} else {
-			if ( !bp_is_root_blog() ) {
-				// Switch dynamically in order to support BP_ENABLE_MULTIBLOG
-				switch_to_blog( bp_get_root_blog_id() );
-			}
 
-			// Get upload directory information from current site
-			$upload_dir = wp_upload_dir();
+			// Use cached upload dir data if available
+			if ( ! empty( $bp->avatar->upload_dir ) ) {
+				$upload_dir = $bp->avatar->upload_dir;
+
+			// No cache, so query for it
+			} else {
+				// We need to switch to the root blog on multisite installs
+				if ( is_multisite() ) {
+					switch_to_blog( bp_get_root_blog_id() );
+				}
+
+				// Get upload directory information from current site
+				$upload_dir = wp_upload_dir();
+
+				// Will bail if not switched
+				restore_current_blog();
+
+				// Stash upload directory data for later use
+				$bp->avatar->upload_dir = $upload_dir;
+			}
 
 			// Directory does not exist and cannot be created
-			if ( !empty( $upload_dir['error'] ) ) {
-				$basedir = '';
+			if ( ! empty( $upload_dir['error'] ) ) {
+				$retval = '';
 
 			} else {
-				$basedir = $upload_dir['basedir'];
+				$retval = $upload_dir[$key];
+
+				// If $key is 'baseurl', check to see if we're on SSL
+				// Workaround for WP13941, WP15928, WP19037.
+				if ( $key == 'baseurl' && is_ssl() ) {
+					$retval = str_replace( 'http://', 'https://', $retval );
+				}
 			}
 
-			// Will bail if not switched
-			restore_current_blog();
 		}
 
 		// Stash in $bp for later use
-		$bp->avatar->upload_path = $basedir;
+		$bp->avatar->$type = $retval;
 	}
 
-	return apply_filters( 'bp_core_avatar_upload_path', $basedir );
+	return $retval;
+}
+
+/**
+ * bp_core_avatar_upload_path()
+ *
+ * Returns the absolute upload path for the WP installation
+ *
+ * @uses wp_upload_dir To get upload directory info
+ * @return string Absolute path to WP upload directory
+ */
+function bp_core_avatar_upload_path() {
+	return apply_filters( 'bp_core_avatar_upload_path', bp_core_get_upload_dir() );
 }
 
 /**
@@ -837,47 +895,7 @@ function bp_core_avatar_upload_path() {
  * @return string Full URL to current upload location
  */
 function bp_core_avatar_url() {
-	$bp = buddypress();
-
-	// See if the value has already been calculated and stashed in the $bp global
-	if ( isset( $bp->avatar->url ) ) {
-		$baseurl = $bp->avatar->url;
-
-	} else {
-		// If this value has been set in a constant, just use that
-		if ( defined( 'BP_AVATAR_URL' ) ) {
-			$baseurl = BP_AVATAR_URL;
-		} else {
-			// If multisite, and we're not on the BP root blog, switch to it
-			if ( is_multisite() ) {
-				switch_to_blog( bp_get_root_blog_id() );
-			}
-
-			// Get upload directory information from current site
-			$upload_dir = wp_upload_dir();
-
-			// Directory does not exist and cannot be created
-			if ( ! empty( $upload_dir['error'] ) ) {
-				$baseurl = '';
-
-			} else {
-				$baseurl = $upload_dir['baseurl'];
-
-				// If we're using https, update the protocol. Workaround for WP13941, WP15928, WP19037.
-				if ( is_ssl() )
-					$baseurl = str_replace( 'http://', 'https://', $baseurl );
-
-			}
-
-			// Will bail if not switched
-			restore_current_blog();
-		}
-
-		// Stash in $bp for later use
-		$bp->avatar->url = $baseurl;
-	}
-
-	return apply_filters( 'bp_core_avatar_url', $baseurl );
+	return apply_filters( 'bp_core_avatar_url', bp_core_get_upload_dir( 'url' ) );
 }
 
 /**
@@ -905,8 +923,8 @@ function bp_get_user_has_avatar( $user_id = 0 ) {
  * @package BuddyPress
  * @since BuddyPress (1.5)
  *
- * @param str $type 'thumb' for thumbs, otherwise full
- * @param str $h_or_w 'height' for height, otherwise width
+ * @param string $type 'thumb' for thumbs, otherwise full
+ * @param string $h_or_w 'height' for height, otherwise width
  * @return int $dim The dimension
  */
 function bp_core_avatar_dimension( $type = 'thumb', $h_or_w = 'height' ) {
diff --git a/wp-content/plugins/buddypress/bp-core/bp-core-buddybar.php b/wp-content/plugins/buddypress/bp-core/bp-core-buddybar.php
index 5e5e26225cf782cc34b89ccc30c4a97195d23fa7..263dbb46f74ab8767947933cf067dd4e80adf19d 100644
--- a/wp-content/plugins/buddypress/bp-core/bp-core-buddybar.php
+++ b/wp-content/plugins/buddypress/bp-core/bp-core-buddybar.php
@@ -81,8 +81,11 @@ function bp_core_new_nav_item( $args = '' ) {
 		if ( !empty( $default_subnav_slug ) && bp_is_current_action( $default_subnav_slug ) && !bp_action_variable( 0 ) ) {
 			unset( $bp->canonical_stack['action'] );
 		} elseif ( ! bp_current_action() ) {
-			$func = is_object( $screen_function[0] ) ? array( &$screen_function[0], $screen_function[1] ) : $screen_function;
-			add_action( 'bp_screens', $func, 3 );
+
+			// Add our screen hook if screen function is callable
+			if ( is_callable( $screen_function ) ) {
+				add_action( 'bp_screens', $screen_function, 3 );
+			}
 
 			if ( !empty( $default_subnav_slug ) ) {
 				$bp->current_action = apply_filters( 'bp_default_component_subnav', $default_subnav_slug, $r );
@@ -112,9 +115,8 @@ function bp_core_new_nav_default( $args = '' ) {
 	extract( $r, EXTR_SKIP );
 
 	if ( $function = $bp->bp_nav[$parent_slug]['screen_function'] ) {
-		if ( is_object( $function[0] ) ) {
-			remove_action( 'bp_screens', array( &$function[0], $function[1] ), 3 );
-		} else {
+		// Remove our screen hook if screen function is callable
+		if ( is_callable( $function ) ) {
 			remove_action( 'bp_screens', $function, 3 );
 		}
 	}
@@ -136,9 +138,7 @@ function bp_core_new_nav_default( $args = '' ) {
 		// No subnav item has been requested in the URL, so set a new nav default
 		if ( empty( $unfiltered_action ) ) {
 			if ( !bp_is_current_action( $subnav_slug ) ) {
-				if ( is_object( $screen_function[0] ) ) {
-					add_action( 'bp_screens', array( &$screen_function[0], $screen_function[1] ), 3 );
-				} else {
+				if ( is_callable( $screen_function ) ) {
 					add_action( 'bp_screens', $screen_function, 3 );
 				}
 
@@ -278,9 +278,8 @@ function bp_core_new_subnav_item( $args = '' ) {
 
 		// Before hooking the screen function, check user access
 		if ( !empty( $user_has_access ) ) {
-			if ( is_object( $screen_function[0] ) ) {
-				add_action( 'bp_screens', array( &$screen_function[0], $screen_function[1] ), 3 );
-			} else {
+			// Add our screen hook if screen function is callable
+			if ( is_callable( $screen_function ) ) {
 				add_action( 'bp_screens', $screen_function, 3 );
 			}
 		} else {
@@ -355,7 +354,7 @@ add_action( 'admin_head', 'bp_core_sort_subnav_items' );
  * @package BuddyPress
  * @since BuddyPress (1.5)
  *
- * @param str $nav_item The id of the top-level nav item whose nav items you're checking
+ * @param string $nav_item The id of the top-level nav item whose nav items you're checking
  * @return bool $has_subnav True if the nav item is found and has subnav items; false otherwise
  */
 function bp_nav_item_has_subnav( $nav_item = '' ) {
@@ -390,9 +389,8 @@ function bp_core_remove_nav_item( $parent_id ) {
 		return false;
 
 	if ( $function = $bp->bp_nav[$parent_id]['screen_function'] ) {
-		if ( is_object( $function[0] ) ) {
-			remove_action( 'bp_screens', array( &$function[0], $function[1] ), 3 );
-		} else {
+		// Remove our screen hook if screen function is callable
+		if ( is_callable( $function ) ) {
 			remove_action( 'bp_screens', $function, 3 );
 		}
 	}
@@ -404,18 +402,17 @@ function bp_core_remove_nav_item( $parent_id ) {
  * Removes a navigation item from the sub navigation array used in BuddyPress themes.
  *
  * @package BuddyPress Core
- * @param $parent_id The id of the parent navigation item.
- * @param $slug The slug of the sub navigation item.
+ * @param string $parent_id The id of the parent navigation item.
+ * @param string $slug The slug of the sub navigation item.
  */
 function bp_core_remove_subnav_item( $parent_id, $slug ) {
 	global $bp;
 
 	$screen_function = isset( $bp->bp_options_nav[$parent_id][$slug]['screen_function'] ) ? $bp->bp_options_nav[$parent_id][$slug]['screen_function'] : false;
 
-	if ( !empty( $screen_function ) ) {
-		if ( is_object( $screen_function[0] ) ) {
-			remove_action( 'bp_screens', array( &$screen_function[0], $screen_function[1] ), 3 );
-		} else {
+	if ( ! empty( $screen_function ) ) {
+		// Remove our screen hook if screen function is callable
+		if ( is_callable( $screen_function ) ) {
 			remove_action( 'bp_screens', $screen_function, 3 );
 		}
 	}
@@ -430,7 +427,7 @@ function bp_core_remove_subnav_item( $parent_id, $slug ) {
  * Clear the subnav items for a specific nav item.
  *
  * @package BuddyPress Core
- * @param $parent_id The id of the parent navigation item.
+ * @param string $parent_id The id of the parent navigation item.
  * @global BuddyPress $bp The one true BuddyPress instance
  */
 function bp_core_reset_subnav_items( $parent_slug ) {
diff --git a/wp-content/plugins/buddypress/bp-core/bp-core-caps.php b/wp-content/plugins/buddypress/bp-core/bp-core-caps.php
index b0f0cc60ca6bf1eea2dc05e0bc63f345e289f9bc..4b5adee7636080ce8bf27d0fbb54b4efddfaa9a6 100644
--- a/wp-content/plugins/buddypress/bp-core/bp-core-caps.php
+++ b/wp-content/plugins/buddypress/bp-core/bp-core-caps.php
@@ -151,8 +151,6 @@ function bp_get_caps_for_role( $role = '' ) {
  * @uses is_user_logged_in()
  * @uses current_user_can()
  * @uses WP_User::set_role()
- *
- * @return If user is not spam/deleted or is already capable
  */
 function bp_set_current_user_default_role() {
 
diff --git a/wp-content/plugins/buddypress/bp-core/bp-core-catchuri.php b/wp-content/plugins/buddypress/bp-core/bp-core-catchuri.php
index d20ba424398ccb7f2a67abb27d76308c0495e8dc..2fcb5641519ca5b4f6fc2f381d454e850c58ce3e 100644
--- a/wp-content/plugins/buddypress/bp-core/bp-core-catchuri.php
+++ b/wp-content/plugins/buddypress/bp-core/bp-core-catchuri.php
@@ -340,8 +340,8 @@ function bp_core_enable_root_profiles() {
  *   wp-content/themes/[activated_theme]/members/index.php
  *
  * @package BuddyPress Core
- * @param $username str Username to check.
- * @return false|int The user ID of the matched user, or false.
+ * @param string $username Username to check.
+ * @return int|bool The user ID of the matched user, or false.
  */
 function bp_core_load_template( $templates ) {
 	global $post, $bp, $wp_query, $wpdb;
diff --git a/wp-content/plugins/buddypress/bp-core/bp-core-classes.php b/wp-content/plugins/buddypress/bp-core/bp-core-classes.php
index f3b9139338c11d454e8a52e754bfe3c8125c47a2..36b57ed1f4fdce7da21674226d6c1c7289e21816 100644
--- a/wp-content/plugins/buddypress/bp-core/bp-core-classes.php
+++ b/wp-content/plugins/buddypress/bp-core/bp-core-classes.php
@@ -47,6 +47,14 @@ class BP_User_Query {
 
 	/** Variables *************************************************************/
 
+	/**
+	 * Unaltered params as passed to the constructor
+	 *
+	 * @since BuddyPress (1.8)
+	 * @var array
+	 */
+	public $query_vars_raw = array();
+
 	/**
 	 * Array of variables to query with
 	 *
@@ -119,8 +127,15 @@ class BP_User_Query {
 	 * @param string|array $query The query variables
 	 */
 	public function __construct( $query = null ) {
-		if ( ! empty( $query ) ) {
-			$this->query_vars = wp_parse_args( $query, array(
+
+		// Store the raw query vars for later access
+		$this->query_vars_raw = $query;
+
+		// Allow extending classes to register action/filter hooks
+		$this->setup_hooks();
+
+		if ( ! empty( $this->query_vars_raw ) ) {
+			$this->query_vars = wp_parse_args( $this->query_vars_raw, array(
 				'type'            => 'newest',
 				'per_page'        => 0,
 				'page'            => 1,
@@ -161,6 +176,22 @@ class BP_User_Query {
 		$this->populate_extras();
 	}
 
+	/**
+	 * Allow extending classes to set up action/filter hooks
+	 *
+	 * When extending BP_User_Query, you may need to use some of its
+	 * internal hooks to modify the output. It's not convenient to call
+	 * add_action() or add_filter() in your class constructor, because
+	 * BP_User_Query::__construct() contains a fair amount of logic that
+	 * you may not want to override in your class. Define this method in
+	 * your own class if you need a place where your extending class can
+	 * add its hooks early in the query-building process. See
+	 * BP_Group_Member_Query::setup_hooks() for an example.
+	 *
+	 * @since BuddyPress (1.8)
+	 */
+	public function setup_hooks() {}
+
 	/**
 	 * Prepare the query for user_ids
 	 *
@@ -198,11 +229,13 @@ class BP_User_Query {
 		switch ( $type ) {
 
 			// 'online' query happens against the last_activity usermeta key
+			// Filter 'bp_user_query_online_interval' to modify the
+			// number of minutes used as an interval
 			case 'online' :
 				$this->uid_name = 'user_id';
 				$sql['select']  = "SELECT DISTINCT u.{$this->uid_name} as id FROM {$wpdb->usermeta} u";
 				$sql['where'][] = $wpdb->prepare( "u.meta_key = %s", bp_get_user_meta_key( 'last_activity' ) );
-				$sql['where'][] = 'u.meta_value >= DATE_SUB( UTC_TIMESTAMP(), INTERVAL 5 MINUTE )';
+				$sql['where'][] = $wpdb->prepare( "u.meta_value >= DATE_SUB( UTC_TIMESTAMP(), INTERVAL %d MINUTE )", apply_filters( 'bp_user_query_online_interval', 15 ) );
 				$sql['orderby'] = "ORDER BY u.meta_value";
 				$sql['order']   = "DESC";
 
@@ -234,7 +267,7 @@ class BP_User_Query {
 				$this->uid_name = 'user_id';
 				$sql['select']  = "SELECT DISTINCT u.{$this->uid_name} as id FROM {$wpdb->usermeta} u";
 				$sql['where'][] = $wpdb->prepare( "u.meta_key = %s", bp_get_user_meta_key( 'total_friend_count' ) );
-				$sql['orderby'] = "ORDER BY u.meta_value";
+				$sql['orderby'] = "ORDER BY CONVERT(u.meta_value, SIGNED)";
 				$sql['order']   = "DESC";
 
 				break;
@@ -282,32 +315,31 @@ class BP_User_Query {
 		/** WHERE *************************************************************/
 
 		// 'include' - User ids to include in the results
-		if ( false !== $include ) {
-			$include        = wp_parse_id_list( $include );
-			$include_ids    = $wpdb->escape( implode( ',', (array) $include ) );
+		$include     = false !== $include ? wp_parse_id_list( $include ) : array();
+		$include_ids = $this->get_include_ids( $include );
+		if ( ! empty( $include_ids ) ) {
+			$include_ids    = implode( ',', wp_parse_id_list( $include_ids ) );
 			$sql['where'][] = "u.{$this->uid_name} IN ({$include_ids})";
 		}
 
 		// 'exclude' - User ids to exclude from the results
 		if ( false !== $exclude ) {
-			$exclude        = wp_parse_id_list( $exclude );
-			$exclude_ids    = $wpdb->escape( implode( ',', (array) $exclude ) );
+			$exclude_ids    = implode( ',', wp_parse_id_list( $exclude ) );
 			$sql['where'][] = "u.{$this->uid_name} NOT IN ({$exclude_ids})";
 		}
 
 		// 'user_id' - When a user id is passed, limit to the friends of the user
-		// Only parse this if no 'include' param is passed, to account for
-		// friend request queries
 		// @todo remove need for bp_is_active() check
-		if ( empty( $include ) && ! empty( $user_id ) && bp_is_active( 'friends' ) ) {
+		if ( ! empty( $user_id ) && bp_is_active( 'friends' ) ) {
 			$friend_ids = friends_get_friend_user_ids( $user_id );
 			$friend_ids = implode( ',', wp_parse_id_list( $friend_ids ) );
 
 			if ( ! empty( $friend_ids ) ) {
 				$sql['where'][] = "u.{$this->uid_name} IN ({$friend_ids})";
 
-			// If the user has no friends, and we're not including specific users, make sure the query returns null
-			} elseif ( empty( $include ) ) {
+			// If the user has no friends, the query should always
+			// return no users
+			} else {
 				$sql['where'][] = $this->no_results['where'];
 			}
 		}
@@ -318,7 +350,10 @@ class BP_User_Query {
 		// To avoid global joins, do a separate query
 		// @todo remove need for bp_is_active() check
 		if ( false !== $search_terms && bp_is_active( 'xprofile' ) ) {
-			$found_user_ids = $wpdb->get_col( $wpdb->prepare( "SELECT user_id FROM {$bp->profile->table_name_data} WHERE value LIKE %s", '%%' . like_escape( $search_terms ) . '%%' ) );
+			$search_terms_clean = mysql_real_escape_string( mysql_real_escape_string( $search_terms ) );
+			$search_terms_clean = like_escape( $search_terms_clean );
+			$found_user_ids_query = "SELECT user_id FROM {$bp->profile->table_name_data} WHERE value LIKE '%" . $search_terms_clean . "%'";
+			$found_user_ids = $wpdb->get_col( $found_user_ids_query );
 
 			if ( ! empty( $found_user_ids ) ) {
 				$sql['where'][] = "u.{$this->uid_name} IN (" . implode( ',', wp_parse_id_list( $found_user_ids ) ) . ")";
@@ -425,6 +460,26 @@ class BP_User_Query {
 		}
 	}
 
+	/**
+	 * Fetches the ids of users to put in the IN clause of the main query
+	 *
+	 * By default, returns the value passed to it
+	 * ($this->query_vars['include']). Having this abstracted into a
+	 * standalone method means that extending classes can override the
+	 * logic, parsing together their own user_id limits with the 'include'
+	 * ids passed to the class constructor. See BP_Group_Member_Query for
+	 * an example.
+	 *
+	 * @since BuddyPress (1.8)
+	 * @param array Sanitized array of user ids, as passed to the 'include'
+	 *   parameter of the class constructor
+	 * @return array The list of users to which the main query should be
+	 *   limited
+	 */
+	public function get_include_ids( $include = array() ) {
+		return $include;
+	}
+
 	/**
 	 * Perform a database query to populate any extra metadata we might need.
 	 * Different components will hook into the 'bp_user_query_populate_extras'
@@ -1313,7 +1368,7 @@ class BP_Core_Notification {
 	 * @global BuddyPress $bp The one true BuddyPress instance
 	 * @global wpdb $wpdb WordPress database object
 	 * @param integer $user_id User ID
-	 * @param str $status 'is_new' or 'all'
+	 * @param string $status 'is_new' or 'all'
 	 * @return array Associative array
 	 * @static
 	 */
@@ -1569,6 +1624,10 @@ class BP_Button {
 		if ( true == $this->block_self && bp_is_my_profile() )
 			return false;
 
+		// No button if you are the current user in a loop
+		if ( true === $this->block_self && is_user_logged_in() && bp_loggedin_user_id() === bp_get_member_user_id() )
+			return false;
+
 		// Wrapper properties
 		if ( false !== $this->wrapper ) {
 
diff --git a/wp-content/plugins/buddypress/bp-core/bp-core-component.php b/wp-content/plugins/buddypress/bp-core/bp-core-component.php
index 5e9e6a2dfb23e0a4161c2f73438fe1f76f6fd16b..a82c1145c7b32254b23124acff0c3533e37abb55 100644
--- a/wp-content/plugins/buddypress/bp-core/bp-core-component.php
+++ b/wp-content/plugins/buddypress/bp-core/bp-core-component.php
@@ -1,4 +1,5 @@
 <?php
+
 // Exit if accessed directly
 if ( !defined( 'ABSPATH' ) ) exit;
 
@@ -18,51 +19,53 @@ if ( !class_exists( 'BP_Component' ) ) :
  */
 class BP_Component {
 
+	/** Variables *************************************************************/
+
 	/**
 	 * @var string Unique name (for internal identification)
 	 * @internal
 	 */
-	var $name;
+	public $name = '';
 
 	/**
 	 * @var Unique ID (normally for custom post type)
 	 */
-	var $id;
+	public $id = '';
 
 	/**
 	 * @var string Unique slug (used in query string and permalinks)
 	 */
-	var $slug;
+	public $slug = '';
 
 	/**
 	 * @var bool Does this component need a top-level directory?
 	 */
-	var $has_directory;
+	public $has_directory = false;
 
 	/**
 	 * @var string The path to the component's files
 	 */
-	var $path;
+	public $path = '';
 
 	/**
 	 * @var WP_Query The loop for this component
 	 */
-	var $query;
+	public $query = false;
 
 	/**
 	 * @var string The current ID of the queried object
 	 */
-	var $current_id;
+	public $current_id = '';
 
 	/**
 	 * @var string Function to call for notifications
 	 */
-	var $notification_callback;
+	public $notification_callback = '';
 
 	/**
 	 * @var array WordPress Toolbar links
 	 */
-	var $admin_menu;
+	public $admin_menu = '';
 
 	/**
 	 * Search input box placeholder string for the component
@@ -70,7 +73,7 @@ class BP_Component {
 	 * @since BuddyPress (1.5)
 	 * @var string
 	 */
-	public $search_string;
+	public $search_string = '';
 
 	/**
 	 * Component's root slug
@@ -78,20 +81,23 @@ class BP_Component {
 	 * @since BuddyPress (1.5)
 	 * @var string
 	 */
-	public $root_slug;
+	public $root_slug = '';
+
+	/** Methods ***************************************************************/
 
 	/**
 	 * Component loader
 	 *
 	 * @since BuddyPress (1.5)
 	 *
-	 * @param mixed $args Required. Supports these args:
-	 *  - id: Unique ID (for internal identification). Letters, numbers, and underscores only
-	 *  - name: Unique name. This should be a translatable name, eg __( 'Groups', 'buddypress' )
-	 *  - path: The file path for the component's files. Used by BP_Component::includes()
+	 * @param string $id Unique ID (for internal identification). Letters, numbers, and underscores only
+	 * @param string $name Unique name. This should be a translatable name, eg __( 'Groups', 'buddypress' )
+	 * @param string $path The file path for the component's files. Used by BP_Component::includes()
+	 *
 	 * @uses bp_Component::setup_actions() Setup the hooks and actions
 	 */
-	function start( $id, $name, $path ) {
+	public function start( $id = '', $name = '', $path = '' ) {
+
 		// Internal identifier of component
 		$this->id   = $id;
 
@@ -113,40 +119,39 @@ class BP_Component {
 	 * @uses apply_filters() Calls 'bp_{@link bp_Component::name}_id'
 	 * @uses apply_filters() Calls 'bp_{@link bp_Component::name}_slug'
 	 *
-	 * @param arr $args Used to
+	 * @param array $args Optional
 	 */
-	function setup_globals( $args = '' ) {
-		global $bp;
+	public function setup_globals( $args = array() ) {
 
 		/** Slugs *************************************************************/
 
-		$defaults = array(
+		$r = wp_parse_args( $args, array(
 			'slug'                  => $this->id,
 			'root_slug'             => '',
 			'has_directory'         => false,
 			'notification_callback' => '',
 			'search_string'         => '',
 			'global_tables'         => ''
-		);
-		$r = wp_parse_args( $args, $defaults );
+		) );
 
 		// Slug used for permalink URI chunk after root
-		$this->slug          = apply_filters( 'bp_' . $this->id . '_slug',          $r['slug']          );
+		$this->slug                  = apply_filters( 'bp_' . $this->id . '_slug',                  $r['slug']                  );
 
 		// Slug used for root directory
-		$this->root_slug     = apply_filters( 'bp_' . $this->id . '_root_slug',     $r['root_slug']     );
+		$this->root_slug             = apply_filters( 'bp_' . $this->id . '_root_slug',             $r['root_slug']             );
 
 		// Does this component have a top-level directory?
-		$this->has_directory = apply_filters( 'bp_' . $this->id . '_has_directory', $r['has_directory'] );
+		$this->has_directory         = apply_filters( 'bp_' . $this->id . '_has_directory',         $r['has_directory']         );
 
 		// Search string
-		$this->search_string = apply_filters( 'bp_' . $this->id . '_search_string', $r['search_string'] );
+		$this->search_string         = apply_filters( 'bp_' . $this->id . '_search_string',         $r['search_string']         );
 
 		// Notifications callback
 		$this->notification_callback = apply_filters( 'bp_' . $this->id . '_notification_callback', $r['notification_callback'] );
 
 		// Set up global table names
 		if ( !empty( $r['global_tables'] ) ) {
+
 			// This filter allows for component-specific filtering of table names
 			// To filter *all* tables, use the 'bp_core_get_table_prefix' filter instead
 			$r['global_tables'] = apply_filters( 'bp_' . $this->id . '_global_tables', $r['global_tables'] );
@@ -154,12 +159,12 @@ class BP_Component {
 			foreach ( $r['global_tables'] as $global_name => $table_name ) {
 				$this->$global_name = $table_name;
 			}
-                }
+		}
 
 		/** BuddyPress ********************************************************/
 
 		// Register this component in the loaded components array
-		$bp->loaded_components[$this->slug] = $this->id;
+		buddypress()->loaded_components[$this->slug] = $this->id;
 
 		// Call action
 		do_action( 'bp_' . $this->id . '_setup_globals' );
@@ -189,14 +194,16 @@ class BP_Component {
 	 *
 	 * @uses do_action() Calls 'bp_{@link bp_Component::name}includes'
 	 */
-	function includes( $includes = '' ) {
+	public function includes( $includes = array() ) {
+
+		// Bail if no files to include
 		if ( empty( $includes ) )
 			return;
 
 		$slashed_path = trailingslashit( $this->path );
 
 		// Loop through files to be included
-		foreach ( $includes as $file ) {
+		foreach ( (array) $includes as $file ) {
 
 			$paths = array(
 
@@ -231,38 +238,38 @@ class BP_Component {
 	 * @uses add_action() To add various actions
 	 * @uses do_action() Calls 'bp_{@link BP_Component::name}setup_actions'
 	 */
-	function setup_actions() {
+	public function setup_actions() {
 
 		// Setup globals
-		add_action( 'bp_setup_globals',          array ( $this, 'setup_globals'          ), 10 );
+		add_action( 'bp_setup_globals',          array( $this, 'setup_globals'          ), 10 );
 
 		// Include required files. Called early to ensure that BP core
 		// components are loaded before plugins that hook their loader functions
 		// to bp_include with the default priority of 10. This is for backwards
 		// compatibility; henceforth, plugins should register themselves by
 		// extending this base class.
-		add_action( 'bp_include',                array ( $this, 'includes'               ), 8 );
+		add_action( 'bp_include',                array( $this, 'includes'               ), 8 );
 
 		// Setup navigation
-		add_action( 'bp_setup_nav',              array ( $this, 'setup_nav'              ), 10 );
+		add_action( 'bp_setup_nav',              array( $this, 'setup_nav'              ), 10 );
 
 		// Setup WP Toolbar menus
-		add_action( 'bp_setup_admin_bar',        array ( $this, 'setup_admin_bar'        ), 10 );
+		add_action( 'bp_setup_admin_bar',        array( $this, 'setup_admin_bar'        ), 10 );
 
 		// Setup component title
-		add_action( 'bp_setup_title',            array ( $this, 'setup_title'            ), 10 );
+		add_action( 'bp_setup_title',            array( $this, 'setup_title'            ), 10 );
 
 		// Register post types
-		add_action( 'bp_register_post_types',    array ( $this, 'register_post_types'    ), 10 );
+		add_action( 'bp_register_post_types',    array( $this, 'register_post_types'    ), 10 );
 
 		// Register taxonomies
-		add_action( 'bp_register_taxonomies',    array ( $this, 'register_taxonomies'    ), 10 );
+		add_action( 'bp_register_taxonomies',    array( $this, 'register_taxonomies'    ), 10 );
 
 		// Add the rewrite tags
-		add_action( 'bp_add_rewrite_tags',       array ( $this, 'add_rewrite_tags'       ), 10 );
+		add_action( 'bp_add_rewrite_tags',       array( $this, 'add_rewrite_tags'       ), 10 );
 
 		// Generate rewrite rules
-		add_action( 'bp_generate_rewrite_rules', array ( $this, 'generate_rewrite_rules' ), 10 );
+		add_action( 'bp_generate_rewrite_rules', array( $this, 'generate_rewrite_rules' ), 10 );
 
 		// Additional actions can be attached here
 		do_action( 'bp_' . $this->id . '_setup_actions' );
@@ -271,10 +278,10 @@ class BP_Component {
 	/**
 	 * Setup the navigation
 	 *
-	 * @param arr $main_nav Optional
-	 * @param arr $sub_nav Optional
+	 * @param array $main_nav Optional
+	 * @param array $sub_nav Optional
 	 */
-	function setup_nav( $main_nav = '', $sub_nav = '' ) {
+	public function setup_nav( $main_nav = array(), $sub_nav = array() ) {
 
 		// No sub nav items without a main nav item
 		if ( !empty( $main_nav ) ) {
@@ -282,7 +289,7 @@ class BP_Component {
 
 			// Sub nav items are not required
 			if ( !empty( $sub_nav ) ) {
-				foreach( $sub_nav as $nav ) {
+				foreach( (array) $sub_nav as $nav ) {
 					bp_core_new_subnav_item( $nav );
 				}
 			}
@@ -298,7 +305,7 @@ class BP_Component {
 	 * @global obj $wp_admin_bar
 	 * @param array $wp_admin_menus
 	 */
-	function setup_admin_bar( $wp_admin_nav = '' ) {
+	public function setup_admin_bar( $wp_admin_nav = array() ) {
 
 		// Bail if this is an ajax request
 		if ( defined( 'DOING_AJAX' ) )
@@ -318,8 +325,9 @@ class BP_Component {
 			global $wp_admin_bar;
 
 			// Add each admin menu
-			foreach( $this->admin_menu as $admin_menu )
+			foreach( $this->admin_menu as $admin_menu ) {
 				$wp_admin_bar->add_menu( $admin_menu );
+			}
 		}
 
 		// Call action
@@ -333,7 +341,7 @@ class BP_Component {
 	 *
 	 * @uses do_action() Calls 'bp_{@link bp_Component::name}setup_title'
 	 */
-	function setup_title( ) {
+	public function setup_title() {
 		do_action(  'bp_' . $this->id . '_setup_title' );
 	}
 
@@ -344,7 +352,7 @@ class BP_Component {
 	 *
 	 * @uses do_action() Calls 'bp_{@link bp_Component::name}_register_post_types'
 	 */
-	function register_post_types() {
+	public function register_post_types() {
 		do_action( 'bp_' . $this->id . '_register_post_types' );
 	}
 
@@ -355,7 +363,7 @@ class BP_Component {
 	 *
 	 * @uses do_action() Calls 'bp_{@link bp_Component::name}_register_taxonomies'
 	 */
-	function register_taxonomies() {
+	public function register_taxonomies() {
 		do_action( 'bp_' . $this->id . '_register_taxonomies' );
 	}
 
@@ -366,7 +374,7 @@ class BP_Component {
 	 *
 	 * @uses do_action() Calls 'bp_{@link bp_Component::name}_add_rewrite_tags'
 	 */
-	function add_rewrite_tags() {
+	public function add_rewrite_tags() {
 		do_action( 'bp_' . $this->id . '_add_rewrite_tags' );
 	}
 
@@ -377,7 +385,7 @@ class BP_Component {
 	 *
 	 * @uses do_action() Calls 'bp_{@link bp_Component::name}_generate_rewrite_rules'
 	 */
-	function generate_rewrite_rules ( $wp_rewrite ) {
+	public function generate_rewrite_rules() {
 		do_action( 'bp_' . $this->id . '_generate_rewrite_rules' );
 	}
 }
diff --git a/wp-content/plugins/buddypress/bp-core/bp-core-dependency.php b/wp-content/plugins/buddypress/bp-core/bp-core-dependency.php
index 553d6582954f3c1267fd65628e95c61b56b910c0..59ed95fb31030d4148c6bcb0d7c17aca876aa107 100644
--- a/wp-content/plugins/buddypress/bp-core/bp-core-dependency.php
+++ b/wp-content/plugins/buddypress/bp-core/bp-core-dependency.php
@@ -180,6 +180,16 @@ function bp_enqueue_scripts() {
 	do_action ( 'bp_enqueue_scripts' );
 }
 
+/**
+ * Add the BuddyPress-specific rewrite tags
+ *
+ * @since BuddyPress (1.8)
+ * @uses do_action() Calls 'bp_add_rewrite_tags'
+ */
+function bp_add_rewrite_tags() {
+	do_action( 'bp_add_rewrite_tags' );
+}
+
 /**
  * Piggy back action for BuddyPress sepecific theme actions before the theme has
  * been setup and the theme's functions.php has loaded.
diff --git a/wp-content/plugins/buddypress/bp-core/bp-core-filters.php b/wp-content/plugins/buddypress/bp-core/bp-core-filters.php
index 67b7812302112b3e8e6ec692b76b7618738a6afb..ac2d1a1ba9f46f077d90aedf255f6d31276ee118 100644
--- a/wp-content/plugins/buddypress/bp-core/bp-core-filters.php
+++ b/wp-content/plugins/buddypress/bp-core/bp-core-filters.php
@@ -51,6 +51,7 @@ add_filter( 'bp_core_render_message_content', 'convert_smilies'   );
 add_filter( 'bp_core_render_message_content', 'convert_chars'     );
 add_filter( 'bp_core_render_message_content', 'wpautop'           );
 add_filter( 'bp_core_render_message_content', 'shortcode_unautop' );
+add_filter( 'bp_core_render_message_content', 'wp_kses_data', 5   );
 
 /**
  * Template Compatibility
@@ -105,7 +106,7 @@ add_filter( 'wp_list_pages_excludes', 'bp_core_exclude_pages' );
  *
  * @package BuddyPress Core
  * @uses bp_get_option() fetches the value for a meta_key in the wp_X_options table
- * @return The blog name for the root blog
+ * @return string The blog name for the root blog
  */
 function bp_core_email_from_name_filter() {
  	return apply_filters( 'bp_core_email_from_name_filter', bp_get_option( 'blogname', 'WordPress' ) );
@@ -158,7 +159,7 @@ add_filter( 'comments_array', 'bp_core_filter_comments', 10, 2 );
  *   login
  * @param string $redirect_to The URL to be redirected to, sanitized in wp-login.php
  * @param string $redirect_to_raw The unsanitized redirect_to URL ($_REQUEST['redirect_to'])
- * @param obj $user The WP_User object corresponding to a successfully logged-in user. Otherwise
+ * @param WP_User $user The WP_User object corresponding to a successfully logged-in user. Otherwise
  *   a WP_Error object
  * @return string The redirect URL
  */
diff --git a/wp-content/plugins/buddypress/bp-core/bp-core-functions.php b/wp-content/plugins/buddypress/bp-core/bp-core-functions.php
index fd0a6506b059ac159801ebe31e1d4bbb75f64ace..91df205d50ddf90e589c6b4d0d176282d63602ea 100644
--- a/wp-content/plugins/buddypress/bp-core/bp-core-functions.php
+++ b/wp-content/plugins/buddypress/bp-core/bp-core-functions.php
@@ -84,6 +84,124 @@ function bp_core_get_table_prefix() {
 	return apply_filters( 'bp_core_get_table_prefix', $wpdb->base_prefix );
 }
 
+/**
+ * Format numbers the BuddyPress way
+ *
+ * @param int $number
+ * @param bool $decimals
+ * @return string
+ */
+function bp_core_number_format( $number, $decimals = false ) {
+
+	// Force number to 0 if needed
+	if ( empty( $number ) )
+		$number = 0;
+
+	return apply_filters( 'bp_core_number_format', number_format_i18n( $number, $decimals ), $number, $decimals );
+}
+
+/**
+ * A utility for parsing individual function arguments into an array.
+ *
+ * The purpose of this function is to help with backward compatibility in cases where
+ *
+ *   function foo( $bar = 1, $baz = false, $barry = array(), $blip = false ) { // ...
+ *
+ * is deprecated in favor of
+ *
+ *   function foo( $args = array() ) {
+ *       $defaults = array(
+ *           'bar'  => 1,
+ *           'arg2' => false,
+ *           'arg3' => array(),
+ *           'arg4' => false,
+ *       );
+ *       $r = wp_parse_args( $args, $defaults ); // ...
+ *
+ * The first argument, $old_args_keys, is an array that matches the parameter positions (keys) to
+ * the new $args keys (values):
+ *
+ *   $old_args_keys = array(
+ *       0 => 'bar', // because $bar was the 0th parameter for foo()
+ *       1 => 'baz', // because $baz was the 1st parameter for foo()
+ *       2 => 'barry', // etc
+ *       3 => 'blip'
+ *   );
+ *
+ * For the second argument, $func_args, you should just pass the value of func_get_args().
+ *
+ * @since BuddyPress (1.6)
+ * @param array $old_args_keys
+ * @param array $func_args
+ * @return array $new_args
+ */
+function bp_core_parse_args_array( $old_args_keys, $func_args ) {
+	$new_args = array();
+
+	foreach( $old_args_keys as $arg_num => $arg_key ) {
+		if ( isset( $func_args[$arg_num] ) ) {
+			$new_args[$arg_key] = $func_args[$arg_num];
+		}
+	}
+
+	return $new_args;
+}
+
+/**
+ * Sanitize an 'order' parameter for use in building SQL queries
+ *
+ * Strings like 'DESC', 'desc', ' desc' will be interpreted into 'DESC'.
+ * Everything else becomes 'ASC'.
+ *
+ * @since BuddyPress (1.8)
+ * @param string $order The 'order' string, as passed to the SQL constructor
+ * @return string The sanitized value 'DESC' or 'ASC'
+ */
+function bp_esc_sql_order( $order = '' ) {
+	$order = strtoupper( trim( $order ) );
+	return 'DESC' === $order ? 'DESC' : 'ASC';
+}
+
+/**
+ * Are we running username compatibility mode?
+ *
+ * @package BuddyPress
+ * @since BuddyPress (1.5)
+ *
+ * @uses apply_filters() Filter 'bp_is_username_compatibility_mode' to alter
+ * @return bool False when compatibility mode is disabled (default); true when enabled
+ * @todo Move to members component?
+ */
+function bp_is_username_compatibility_mode() {
+	return apply_filters( 'bp_is_username_compatibility_mode', defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE' ) && BP_ENABLE_USERNAME_COMPATIBILITY_MODE );
+}
+
+/**
+ * Should we use the WP Toolbar?
+ *
+ * The WP Toolbar, introduced in WP 3.1, is fully supported in BuddyPress as of BP 1.5.
+ * For BP 1.6, the WP Toolbar is the default.
+ *
+ * @return bool False when WP Toolbar support is disabled; true when enabled (default)
+ * @since BuddyPress (1.5)
+ * @uses apply_filters() Filter 'bp_use_wp_admin_bar' to alter
+ */
+function bp_use_wp_admin_bar() {
+	$use_admin_bar = true;
+
+	// Has the WP Toolbar constant been explicity set?
+	if ( defined( 'BP_USE_WP_ADMIN_BAR' ) && ! BP_USE_WP_ADMIN_BAR )
+		$use_admin_bar = false;
+
+	// Has the admin chosen to use the BuddyBar during an upgrade?
+	elseif ( (bool) bp_get_option( '_bp_force_buddybar', false ) )
+		$use_admin_bar = false;
+
+	return apply_filters( 'bp_use_wp_admin_bar', $use_admin_bar );
+}
+
+/** Directory *****************************************************************/
+
 /**
  * Fetches BP pages from the meta table, depending on setup
  *
@@ -126,7 +244,7 @@ function bp_core_update_directory_page_ids( $blog_page_ids ) {
  * @package BuddyPress Core
  * @since BuddyPress (1.5)
  *
- * @return obj $pages Page names, IDs, and slugs
+ * @return object Page names, IDs, and slugs
  */
 function bp_core_get_directory_pages() {
 	global $wpdb;
@@ -275,8 +393,8 @@ function bp_core_add_page_mappings( $components, $existing = 'keep' ) {
  * @package BuddyPress Core
  * @since BuddyPress (1.5)
  *
- * @param str $root_slug The root slug, which comes from $bp->pages->[component]->slug
- * @return str $slug The short slug for use in the middle of URLs
+ * @param string $root_slug The root slug, which comes from $bp->pages->[component]->slug
+ * @return string The short slug for use in the middle of URLs
  */
 function bp_core_component_slug_from_root_slug( $root_slug ) {
 	$slug_chunks = explode( '/', $root_slug );
@@ -286,149 +404,182 @@ function bp_core_component_slug_from_root_slug( $root_slug ) {
 }
 
 /**
- * Returns the domain for the root blog.
- * eg: http://domain.com/ OR https://domain.com
+ * This function originally let plugins add support for pages in the root of the install.
+ * These root level pages are now handled by actual WordPress pages and this function is now
+ * a convenience for compatibility with the new method.
  *
- * @package BuddyPress Core
- * @uses get_blog_option() WordPress function to fetch blog meta.
- * @return $domain The domain URL for the blog.
+ * @global $bp BuddyPress global settings
+ * @param string $slug The slug of the component
  */
-function bp_core_get_root_domain() {
+function bp_core_add_root_component( $slug ) {
+	global $bp;
 
-	$domain = get_home_url( bp_get_root_blog_id() );
+	if ( empty( $bp->pages ) )
+		$bp->pages = bp_core_get_directory_pages();
 
-	return apply_filters( 'bp_core_get_root_domain', $domain );
-}
+	$match = false;
 
-/**
- * Get the current GMT time to save into the DB
- *
- * @package BuddyPress Core
- * @since BuddyPress (1.2.6)
- */
-function bp_core_current_time( $gmt = true ) {
-	// Get current time in MYSQL format
-	$current_time = current_time( 'mysql', $gmt );
+	// Check if the slug is registered in the $bp->pages global
+	foreach ( (array) $bp->pages as $key => $page ) {
+		if ( $key == $slug || $page->slug == $slug )
+			$match = true;
+	}
 
-	return apply_filters( 'bp_core_current_time', $current_time );
+	// If there was no match, add a page for this root component
+	if ( empty( $match ) ) {
+		$bp->add_root[] = $slug;
+	}
+
+	// Make sure that this component is registered as requiring a top-level directory
+	if ( isset( $bp->{$slug} ) ) {
+		$bp->loaded_components[$bp->{$slug}->slug] = $bp->{$slug}->id;
+		$bp->{$slug}->has_directory = true;
+	}
 }
 
-/**
- * Adds a feedback (error/success) message to the WP cookie so it can be
- * displayed after the page reloads.
- *
- * @package BuddyPress Core
- *
- * @global BuddyPress $bp The one true BuddyPress instance
- * @param str $message Feedback to give to user
- * @param str $type updated|success|error|warning
- */
-function bp_core_add_message( $message, $type = '' ) {
+function bp_core_create_root_component_page() {
 	global $bp;
 
-	// Success is the default
-	if ( empty( $type ) )
-		$type = 'success';
+	$new_page_ids = array();
 
-	// Send the values to the cookie for page reload display
-	@setcookie( 'bp-message',      $message, time() + 60 * 60 * 24, COOKIEPATH );
-	@setcookie( 'bp-message-type', $type,    time() + 60 * 60 * 24, COOKIEPATH );
+	foreach ( (array) $bp->add_root as $slug )
+		$new_page_ids[$slug] = wp_insert_post( array( 'comment_status' => 'closed', 'ping_status' => 'closed', 'post_title' => ucwords( $slug ), 'post_status' => 'publish', 'post_type' => 'page' ) );
 
-	/***
-	 * Send the values to the $bp global so we can still output messages
-	 * without a page reload
-	 */
-	$bp->template_message      = $message;
-	$bp->template_message_type = $type;
+	$page_ids = array_merge( (array) $new_page_ids, (array) bp_core_get_directory_page_ids() );
+	bp_core_update_directory_page_ids( $page_ids );
 }
 
 /**
- * Checks if there is a feedback message in the WP cookie, if so, adds a
- * "template_notices" action so that the message can be parsed into the template
- * and displayed to the user.
+ * Adds illegal names to WP so that root components will not conflict with
+ * blog names on a subdirectory installation.
  *
- * After the message is displayed, it removes the message vars from the cookie
- * so that the message is not shown to the user multiple times.
+ * For example, it would stop someone creating a blog with the slug "groups".
  *
- * @package BuddyPress Core
- * @global $bp_message The message text
- * @global $bp_message_type The type of message (error/success)
- * @uses setcookie() Sets a cookie value for the user.
+ * @todo Deprecate?
  */
-function bp_core_setup_message() {
-	global $bp;
+function bp_core_add_illegal_names() {
+	update_site_option( 'illegal_names', get_site_option( 'illegal_names' ), array() );
+}
 
-	if ( empty( $bp->template_message ) && isset( $_COOKIE['bp-message'] ) )
-		$bp->template_message = $_COOKIE['bp-message'];
+/** URI ***********************************************************************/
 
-	if ( empty( $bp->template_message_type ) && isset( $_COOKIE['bp-message-type'] ) )
-		$bp->template_message_type = $_COOKIE['bp-message-type'];
+/**
+ * Returns the domain for the root blog.
+ * eg: http://domain.com/ OR https://domain.com
+ *
+ * @package BuddyPress Core
+ * @uses get_blog_option() WordPress function to fetch blog meta.
+ * @return string The domain URL for the blog.
+ */
+function bp_core_get_root_domain() {
 
-	add_action( 'template_notices', 'bp_core_render_message' );
+	$domain = get_home_url( bp_get_root_blog_id() );
 
-	@setcookie( 'bp-message',      false, time() - 1000, COOKIEPATH );
-	@setcookie( 'bp-message-type', false, time() - 1000, COOKIEPATH );
+	return apply_filters( 'bp_core_get_root_domain', $domain );
 }
-add_action( 'bp_actions', 'bp_core_setup_message', 5 );
 
 /**
- * Renders a feedback message (either error or success message) to the theme template.
- * The hook action 'template_notices' is used to call this function, it is not called directly.
+ * Performs a status safe wp_redirect() that is compatible with bp_catch_uri()
  *
  * @package BuddyPress Core
- * @global BuddyPress $bp The one true BuddyPress instance
+ * @uses wp_safe_redirect()
  */
-function bp_core_render_message() {
-	global $bp;
-
-	if ( !empty( $bp->template_message ) ) :
-		$type    = ( 'success' == $bp->template_message_type ) ? 'updated' : 'error';
-		$content = apply_filters( 'bp_core_render_message_content', $bp->template_message, $type ); ?>
-
-		<div id="message" class="bp-template-notice <?php echo $type; ?>">
-
-			<?php echo $content; ?>
-
-		</div>
+function bp_core_redirect( $location, $status = 302 ) {
 
-	<?php
+	// On some setups, passing the value of wp_get_referer() may result in an
+	// empty value for $location, which results in an error. Ensure that we
+	// have a valid URL.
+	if ( empty( $location ) )
+		$location = bp_get_root_domain();
 
-		do_action( 'bp_core_render_message' );
+	// Make sure we don't call status_header() in bp_core_do_catch_uri() as this
+	// conflicts with wp_redirect() and wp_safe_redirect().
+	buddypress()->no_status_set = true;
 
-	endif;
+	wp_safe_redirect( $location, $status );
+	die;
 }
 
 /**
- * Format numbers the BuddyPress way
+ * Returns the referrer URL without the http(s)://
  *
- * @param str $number
- * @param bool $decimals
- * @return str
+ * @package BuddyPress Core
+ * @return string The referrer URL
  */
-function bp_core_number_format( $number, $decimals = false ) {
-
-	// Force number to 0 if needed
-	if ( empty( $number ) )
-		$number = 0;
-
-	return apply_filters( 'bp_core_number_format', number_format_i18n( $number, $decimals ), $number, $decimals );
+function bp_core_referrer() {
+	$referer = explode( '/', wp_get_referer() );
+	unset( $referer[0], $referer[1], $referer[2] );
+	return implode( '/', $referer );
 }
 
 /**
- * Based on function created by Dunstan Orchard - http://1976design.com
+ * Get the path of of the current site.
  *
- * This function will return an English representation of the time elapsed
- * since a given date.
+ * @package BuddyPress Core
+ *
+ * @global object $current_site
+ * @return string
+ */
+function bp_core_get_site_path() {
+	global $current_site;
+
+	if ( is_multisite() )
+		$site_path = $current_site->path;
+	else {
+		$site_path = (array) explode( '/', home_url() );
+
+		if ( count( $site_path ) < 2 )
+			$site_path = '/';
+		else {
+			// Unset the first three segments (http(s)://domain.com part)
+			unset( $site_path[0] );
+			unset( $site_path[1] );
+			unset( $site_path[2] );
+
+			if ( !count( $site_path ) )
+				$site_path = '/';
+			else
+				$site_path = '/' . implode( '/', $site_path ) . '/';
+		}
+	}
+
+	return apply_filters( 'bp_core_get_site_path', $site_path );
+}
+
+/** Time **********************************************************************/
+
+/**
+ * Get the current GMT time to save into the DB
+ *
+ * @package BuddyPress Core
+ * @since BuddyPress (1.2.6)
+ */
+function bp_core_current_time( $gmt = true ) {
+	// Get current time in MYSQL format
+	$current_time = current_time( 'mysql', $gmt );
+
+	return apply_filters( 'bp_core_current_time', $current_time );
+}
+
+/**
+ * Based on function created by Dunstan Orchard - http://1976design.com
+ *
+ * This function will return an English representation of the time elapsed
+ * since a given date.
  * eg: 2 hours and 50 minutes
  * eg: 4 days
  * eg: 4 weeks and 6 days
  *
+ * Note that fractions of minutes are not represented in the return string. So
+ * an interval of 3 minutes will be represented by "3 minutes ago", as will an
+ * interval of 3 minutes 59 seconds.
+ *
  * @package BuddyPress Core
  * @uses apply_filters() Filter 'bp_core_time_since_pre' to bypass BP's calculations
  * @uses apply_filters() Filter 'bp_core_time_since' to modify BP's calculations
- * @param $older_date int Unix timestamp of date you want to calculate the time since for
- * @param $newer_date int Unix timestamp of date to compare older date to. Default false (current time).
- * @return str The time since.
+ * @param int $older_date Unix timestamp of date you want to calculate the time since for
+ * @param int $newer_date Unix timestamp of date to compare older date to. Default false (current time).
+ * @return string The time since.
  */
 function bp_core_time_since( $older_date, $newer_date = false ) {
 
@@ -444,13 +595,13 @@ function bp_core_time_since( $older_date, $newer_date = false ) {
 
 	// array of time period chunks
 	$chunks = array(
-		array( 60 * 60 * 24 * 365 , __( 'year',   'buddypress' ), __( 'years',   'buddypress' ) ),
-		array( 60 * 60 * 24 * 30 ,  __( 'month',  'buddypress' ), __( 'months',  'buddypress' ) ),
-		array( 60 * 60 * 24 * 7,    __( 'week',   'buddypress' ), __( 'weeks',   'buddypress' ) ),
-		array( 60 * 60 * 24 ,       __( 'day',    'buddypress' ), __( 'days',    'buddypress' ) ),
-		array( 60 * 60 ,            __( 'hour',   'buddypress' ), __( 'hours',   'buddypress' ) ),
-		array( 60 ,                 __( 'minute', 'buddypress' ), __( 'minutes', 'buddypress' ) ),
-		array( 1,                   __( 'second', 'buddypress' ), __( 'seconds', 'buddypress' ) )
+		YEAR_IN_SECONDS,
+		30 * DAY_IN_SECONDS,
+		WEEK_IN_SECONDS,
+		DAY_IN_SECONDS,
+		HOUR_IN_SECONDS,
+		MINUTE_IN_SECONDS,
+		1
 	);
 
 	if ( !empty( $older_date ) && !is_numeric( $older_date ) ) {
@@ -483,7 +634,7 @@ function bp_core_time_since( $older_date, $newer_date = false ) {
 
 		// Step one: the first chunk
 		for ( $i = 0, $j = count( $chunks ); $i < $j; ++$i ) {
-			$seconds = $chunks[$i][0];
+			$seconds = $chunks[$i];
 
 			// Finding the biggest chunk (if the chunk fits, break)
 			$count = floor( $since / $seconds );
@@ -499,17 +650,62 @@ function bp_core_time_since( $older_date, $newer_date = false ) {
 		} else {
 
 			// Set output var
-			$output = ( 1 == $count ) ? '1 '. $chunks[$i][1] : $count . ' ' . $chunks[$i][2];
+			switch ( $seconds ) {
+				case YEAR_IN_SECONDS :
+					$output = sprintf( _n( '%s year',   '%s years',   $count, 'buddypress' ), $count );
+					break;
+				case 30 * DAY_IN_SECONDS :
+					$output = sprintf( _n( '%s month',  '%s months',  $count, 'buddypress' ), $count );
+					break;
+				case WEEK_IN_SECONDS :
+					$output = sprintf( _n( '%s week',   '%s weeks',   $count, 'buddypress' ), $count );
+					break;
+				case DAY_IN_SECONDS :
+					$output = sprintf( _n( '%s day',    '%s days',    $count, 'buddypress' ), $count );
+					break;
+				case HOUR_IN_SECONDS :
+					$output = sprintf( _n( '%s hour',   '%s hours',   $count, 'buddypress' ), $count );
+					break;
+				case MINUTE_IN_SECONDS :
+					$output = sprintf( _n( '%s minute', '%s minutes', $count, 'buddypress' ), $count );
+					break;
+				default:
+					$output = sprintf( _n( '%s second', '%s seconds', $count, 'buddypress' ), $count );
+			}
 
 			// Step two: the second chunk
+			// A quirk in the implementation means that this
+			// condition fails in the case of minutes and seconds.
+			// We've left the quirk in place, since fractions of a
+			// minute are not a useful piece of information for our
+			// purposes
 			if ( $i + 2 < $j ) {
-				$seconds2 = $chunks[$i + 1][0];
-				$name2    = $chunks[$i + 1][1];
+				$seconds2 = $chunks[$i + 1];
 				$count2   = floor( ( $since - ( $seconds * $count ) ) / $seconds2 );
 
 				// Add to output var
 				if ( 0 != $count2 ) {
-					$output .= ( 1 == $count2 ) ? _x( ',', 'Separator in time since', 'buddypress' ) . ' 1 '. $name2 : _x( ',', 'Separator in time since', 'buddypress' ) . ' ' . $count2 . ' ' . $chunks[$i + 1][2];
+					$output .= _x( ',', 'Separator in time since', 'buddypress' ) . ' ';
+
+					switch ( $seconds2 ) {
+						case 30 * DAY_IN_SECONDS :
+							$output .= sprintf( _n( '%s month',  '%s months',  $count2, 'buddypress' ), $count2 );
+							break;
+						case WEEK_IN_SECONDS :
+							$output .= sprintf( _n( '%s week',   '%s weeks',   $count2, 'buddypress' ), $count2 );
+							break;
+						case DAY_IN_SECONDS :
+							$output .= sprintf( _n( '%s day',    '%s days',    $count2, 'buddypress' ), $count2 );
+							break;
+						case HOUR_IN_SECONDS :
+							$output .= sprintf( _n( '%s hour',   '%s hours',   $count2, 'buddypress' ), $count2 );
+							break;
+						case MINUTE_IN_SECONDS :
+							$output .= sprintf( _n( '%s minute', '%s minutes', $count2, 'buddypress' ), $count2 );
+							break;
+						default:
+							$output .= sprintf( _n( '%s second', '%s seconds', $count2, 'buddypress' ), $count2 );
+					}
 				}
 			}
 
@@ -528,339 +724,153 @@ function bp_core_time_since( $older_date, $newer_date = false ) {
 	return apply_filters( 'bp_core_time_since', $output, $older_date, $newer_date );
 }
 
-/**
- * Record user activity to the database. Many functions use a "last active" feature to
- * show the length of time since the user was last active.
- * This function will update that time as a usermeta setting for the user every 5 minutes.
- *
- * @package BuddyPress Core
- * @global $userdata WordPress user data for the current logged in user.
- * @uses bp_update_user_meta() BP function to update user metadata in the usermeta table.
- */
-function bp_core_record_activity() {
-
-	if ( !is_user_logged_in() )
-		return false;
-
-	$user_id = bp_loggedin_user_id();
-
-	if ( bp_is_user_inactive( $user_id ) )
-		return false;
-
-	$activity = bp_get_user_meta( $user_id, 'last_activity', true );
-
-	if ( !is_numeric( $activity ) )
-		$activity = strtotime( $activity );
-
-	// Get current time
-	$current_time = bp_core_current_time();
-
-	// Use this action to detect the very first activity for a given member
-	if ( empty( $activity ) ) {
-		do_action( 'bp_first_activity_for_member', $user_id );
-	}
-
-	if ( empty( $activity ) || strtotime( $current_time ) >= strtotime( '+5 minutes', $activity ) )
-		bp_update_user_meta( $user_id, 'last_activity', $current_time );
-}
-add_action( 'wp_head', 'bp_core_record_activity' );
-
-/**
- * Formats last activity based on time since date given.
- *
- * @package BuddyPress Core
- * @param last_activity_date The date of last activity.
- * @param $before The text to prepend to the activity time since figure.
- * @param $after The text to append to the activity time since figure.
- * @uses bp_core_time_since() This function will return an English representation of the time elapsed.
- */
-function bp_core_get_last_activity( $last_activity_date, $string ) {
-
-	if ( empty( $last_activity_date ) )
-		$last_active = __( 'Not recently active', 'buddypress' );
-	else
-		$last_active = sprintf( $string, bp_core_time_since( $last_activity_date ) );
-
-	return apply_filters( 'bp_core_get_last_activity', $last_active, $last_activity_date, $string );
-}
+/** Messages ******************************************************************/
 
 /**
- * Get the path of of the current site.
+ * Adds a feedback (error/success) message to the WP cookie so it can be
+ * displayed after the page reloads.
  *
  * @package BuddyPress Core
  *
- * @global object $current_site
- * @return string
+ * @global BuddyPress $bp The one true BuddyPress instance
+ * @param string $message Feedback to give to user
+ * @param string $type updated|success|error|warning
  */
-function bp_core_get_site_path() {
-	global $current_site;
-
-	if ( is_multisite() )
-		$site_path = $current_site->path;
-	else {
-		$site_path = (array) explode( '/', home_url() );
+function bp_core_add_message( $message, $type = '' ) {
+	global $bp;
 
-		if ( count( $site_path ) < 2 )
-			$site_path = '/';
-		else {
-			// Unset the first three segments (http(s)://domain.com part)
-			unset( $site_path[0] );
-			unset( $site_path[1] );
-			unset( $site_path[2] );
+	// Success is the default
+	if ( empty( $type ) )
+		$type = 'success';
 
-			if ( !count( $site_path ) )
-				$site_path = '/';
-			else
-				$site_path = '/' . implode( '/', $site_path ) . '/';
-		}
-	}
+	// Send the values to the cookie for page reload display
+	@setcookie( 'bp-message',      $message, time() + 60 * 60 * 24, COOKIEPATH );
+	@setcookie( 'bp-message-type', $type,    time() + 60 * 60 * 24, COOKIEPATH );
 
-	return apply_filters( 'bp_core_get_site_path', $site_path );
+	/***
+	 * Send the values to the $bp global so we can still output messages
+	 * without a page reload
+	 */
+	$bp->template_message      = $message;
+	$bp->template_message_type = $type;
 }
 
 /**
- * Performs a status safe wp_redirect() that is compatible with bp_catch_uri()
+ * Checks if there is a feedback message in the WP cookie, if so, adds a
+ * "template_notices" action so that the message can be parsed into the template
+ * and displayed to the user.
+ *
+ * After the message is displayed, it removes the message vars from the cookie
+ * so that the message is not shown to the user multiple times.
  *
  * @package BuddyPress Core
- * @uses wp_safe_redirect()
+ * @global $bp_message The message text
+ * @global $bp_message_type The type of message (error/success)
+ * @uses setcookie() Sets a cookie value for the user.
  */
-function bp_core_redirect( $location, $status = 302 ) {
-
-	// On some setups, passing the value of wp_get_referer() may result in an
-	// empty value for $location, which results in an error. Ensure that we
-	// have a valid URL.
-	if ( empty( $location ) )
-		$location = bp_get_root_domain();
+function bp_core_setup_message() {
+	global $bp;
 
-	// Make sure we don't call status_header() in bp_core_do_catch_uri() as this
-	// conflicts with wp_redirect() and wp_safe_redirect().
-	buddypress()->no_status_set = true;
+	if ( empty( $bp->template_message ) && isset( $_COOKIE['bp-message'] ) )
+		$bp->template_message = stripslashes( $_COOKIE['bp-message'] );
 
-	wp_safe_redirect( $location, $status );
-	die;
-}
+	if ( empty( $bp->template_message_type ) && isset( $_COOKIE['bp-message-type'] ) )
+		$bp->template_message_type = stripslashes( $_COOKIE['bp-message-type'] );
 
-/**
- * Returns the referrer URL without the http(s)://
- *
- * @package BuddyPress Core
- * @return The referrer URL
- */
-function bp_core_referrer() {
-	$referer = explode( '/', wp_get_referer() );
-	unset( $referer[0], $referer[1], $referer[2] );
-	return implode( '/', $referer );
-}
+	add_action( 'template_notices', 'bp_core_render_message' );
 
-/**
- * Adds illegal names to WP so that root components will not conflict with
- * blog names on a subdirectory installation.
- *
- * For example, it would stop someone creating a blog with the slug "groups".
- */
-function bp_core_add_illegal_names() {
-	update_site_option( 'illegal_names', get_site_option( 'illegal_names' ), array() );
+	if ( isset( $_COOKIE['bp-message'] ) )
+		@setcookie( 'bp-message', false, time() - 1000, COOKIEPATH );
+	if ( isset( $_COOKIE['bp-message-type'] ) )
+		@setcookie( 'bp-message-type', false, time() - 1000, COOKIEPATH );
 }
+add_action( 'bp_actions', 'bp_core_setup_message', 5 );
 
 /**
- * A javascript free implementation of the search functions in BuddyPress
+ * Renders a feedback message (either error or success message) to the theme template.
+ * The hook action 'template_notices' is used to call this function, it is not called directly.
  *
  * @package BuddyPress Core
- * @param string $slug The slug to redirect to for searching.
+ * @global BuddyPress $bp The one true BuddyPress instance
  */
-function bp_core_action_search_site( $slug = '' ) {
-
-	if ( !bp_is_current_component( bp_get_search_slug() ) )
-		return;
-
-	if ( empty( $_POST['search-terms'] ) ) {
-		bp_core_redirect( bp_get_root_domain() );
-		return;
-	}
-
-	$search_terms = stripslashes( $_POST['search-terms'] );
-	$search_which = !empty( $_POST['search-which'] ) ? $_POST['search-which'] : '';
-	$query_string = '/?s=';
-
-	if ( empty( $slug ) ) {
-		switch ( $search_which ) {
-			case 'posts':
-				$slug = '';
-				$var  = '/?s=';
-
-				// If posts aren't displayed on the front page, find the post page's slug.
-				if ( 'page' == get_option( 'show_on_front' ) ) {
-					$page = get_post( get_option( 'page_for_posts' ) );
-
-					if ( !is_wp_error( $page ) && !empty( $page->post_name ) ) {
-						$slug = $page->post_name;
-						$var  = '?s=';
-					}
-				}
-				break;
-
-			case 'blogs':
-				$slug = bp_is_active( 'blogs' )  ? bp_get_blogs_root_slug()  : '';
-				break;
-
-			case 'forums':
-				$slug = bp_is_active( 'forums' ) ? bp_get_forums_root_slug() : '';
-				$query_string = '/?fs=';
-				break;
+function bp_core_render_message() {
+	global $bp;
 
-			case 'groups':
-				$slug = bp_is_active( 'groups' ) ? bp_get_groups_root_slug() : '';
-				break;
+	if ( !empty( $bp->template_message ) ) :
+		$type    = ( 'success' == $bp->template_message_type ) ? 'updated' : 'error';
+		$content = apply_filters( 'bp_core_render_message_content', $bp->template_message, $type ); ?>
 
-			case 'members':
-			default:
-				$slug = bp_get_members_root_slug();
-				break;
-		}
+		<div id="message" class="bp-template-notice <?php echo $type; ?>">
 
-		if ( empty( $slug ) && 'posts' != $search_which ) {
-			bp_core_redirect( bp_get_root_domain() );
-			return;
-		}
-	}
+			<?php echo $content; ?>
 
-	bp_core_redirect( apply_filters( 'bp_core_search_site', home_url( $slug . $query_string . urlencode( $search_terms ) ), $search_terms ) );
-}
-add_action( 'bp_init', 'bp_core_action_search_site', 7 );
+		</div>
 
-/**
- * Prints the generation time in the footer of the site.
- *
- * @package BuddyPress Core
- */
-function bp_core_print_generation_time() {
-?>
+	<?php
 
-<!-- Generated in <?php timer_stop(1); ?> seconds. (<?php echo get_num_queries(); ?> q) -->
+		do_action( 'bp_core_render_message' );
 
-	<?php
+	endif;
 }
-add_action( 'wp_footer', 'bp_core_print_generation_time' );
 
-/**
- * Load the buddypress translation file for current language
- *
- * @package BuddyPress Core
- */
-function bp_core_load_buddypress_textdomain() {
-	$locale        = apply_filters( 'buddypress_locale', get_locale() );
-	$mofile        = sprintf( 'buddypress-%s.mo', $locale );
-	$mofile_global = WP_LANG_DIR . '/' . $mofile;
-	$mofile_local  = BP_PLUGIN_DIR . 'bp-languages/' . $mofile;
-
-	if ( file_exists( $mofile_global ) )
-		return load_textdomain( 'buddypress', $mofile_global );
-	elseif ( file_exists( $mofile_local ) )
-		return load_textdomain( 'buddypress', $mofile_local );
-	else
-		return false;
-}
-add_action ( 'bp_core_loaded', 'bp_core_load_buddypress_textdomain' );
+/** Last active ***************************************************************/
 
 /**
- * Initializes {@link BP_Embed} after everything is loaded.
+ * Record user activity to the database. Many functions use a "last active" feature to
+ * show the length of time since the user was last active.
+ * This function will update that time as a usermeta setting for the user every 5 minutes.
  *
- * @global object $bp BuddyPress global settings
  * @package BuddyPress Core
- * @since BuddyPress (1.5)
+ * @global $userdata WordPress user data for the current logged in user.
+ * @uses bp_update_user_meta() BP function to update user metadata in the usermeta table.
  */
-function bp_embed_init() {
-	global $bp;
+function bp_core_record_activity() {
 
-	if ( empty( $bp->embed ) )
-		$bp->embed = new BP_Embed();
-}
-add_action( 'bp_init', 'bp_embed_init', 9 );
+	if ( !is_user_logged_in() )
+		return false;
 
-/**
- * This function originally let plugins add support for pages in the root of the install.
- * These root level pages are now handled by actual WordPress pages and this function is now
- * a convenience for compatibility with the new method.
- *
- * @global $bp BuddyPress global settings
- * @param $slug str The slug of the component
- */
-function bp_core_add_root_component( $slug ) {
-	global $bp;
+	$user_id = bp_loggedin_user_id();
 
-	if ( empty( $bp->pages ) )
-		$bp->pages = bp_core_get_directory_pages();
+	if ( bp_is_user_inactive( $user_id ) )
+		return false;
 
-	$match = false;
+	$activity = bp_get_user_meta( $user_id, 'last_activity', true );
 
-	// Check if the slug is registered in the $bp->pages global
-	foreach ( (array) $bp->pages as $key => $page ) {
-		if ( $key == $slug || $page->slug == $slug )
-			$match = true;
-	}
+	if ( !is_numeric( $activity ) )
+		$activity = strtotime( $activity );
 
-	// If there was no match, add a page for this root component
-	if ( empty( $match ) ) {
-		$bp->add_root[] = $slug;
-	}
+	// Get current time
+	$current_time = bp_core_current_time();
 
-	// Make sure that this component is registered as requiring a top-level directory
-	if ( isset( $bp->{$slug} ) ) {
-		$bp->loaded_components[$bp->{$slug}->slug] = $bp->{$slug}->id;
-		$bp->{$slug}->has_directory = true;
+	// Use this action to detect the very first activity for a given member
+	if ( empty( $activity ) ) {
+		do_action( 'bp_first_activity_for_member', $user_id );
 	}
-}
-
-function bp_core_create_root_component_page() {
-	global $bp;
-
-	$new_page_ids = array();
-
-	foreach ( (array) $bp->add_root as $slug )
-		$new_page_ids[$slug] = wp_insert_post( array( 'comment_status' => 'closed', 'ping_status' => 'closed', 'post_title' => ucwords( $slug ), 'post_status' => 'publish', 'post_type' => 'page' ) );
 
-	$page_ids = array_merge( (array) $new_page_ids, (array) bp_core_get_directory_page_ids() );
-	bp_core_update_directory_page_ids( $page_ids );
+	if ( empty( $activity ) || strtotime( $current_time ) >= strtotime( '+5 minutes', $activity ) )
+		bp_update_user_meta( $user_id, 'last_activity', $current_time );
 }
+add_action( 'wp_head', 'bp_core_record_activity' );
 
 /**
- * Is this the root blog ID?
- *
- * @package BuddyPress
- * @since BuddyPress (1.5)
+ * Formats last activity based on time since date given.
  *
- * @param int $blog_id Optional. Defaults to the current blog id.
- * @return bool $is_root_blog Returns true if this is bp_get_root_blog_id().
+ * @package BuddyPress Core
+ * @param string $last_activity_date The date of last activity.
+ * @param string $string
+ * @uses bp_core_time_since() This function will return an English representation of the time elapsed.
  */
-function bp_is_root_blog( $blog_id = 0 ) {
-
-	// Assume false
-	$is_root_blog = false;
-
-	// Use current blog if no ID is passed
-	if ( empty( $blog_id ) )
-		$blog_id = get_current_blog_id();
+function bp_core_get_last_activity( $last_activity_date, $string ) {
 
-	// Compare to root blog ID
-	if ( $blog_id == bp_get_root_blog_id() )
-		$is_root_blog = true;
+	if ( empty( $last_activity_date ) )
+		$last_active = __( 'Not recently active', 'buddypress' );
+	else
+		$last_active = sprintf( $string, bp_core_time_since( $last_activity_date ) );
 
-	return (bool) apply_filters( 'bp_is_root_blog', (bool) $is_root_blog );
+	return apply_filters( 'bp_core_get_last_activity', $last_active, $last_activity_date, $string );
 }
 
-/**
- * Is this bp_get_root_blog_id()?
- *
- * @package BuddyPress
- * @since BuddyPress (1.5)
- *
- * @return int Return the root site ID
- */
-function bp_get_root_blog_id() {
-	global $bp;
-
-	return (int) apply_filters( 'bp_get_root_blog_id', (int) $bp->root_blog_id );
-}
+/** Meta **********************************************************************/
 
 /**
  * Get the meta_key for a given piece of user metadata
@@ -879,8 +889,8 @@ function bp_get_root_blog_id() {
  * @since BuddyPress (1.5)
  *
  * @uses apply_filters() Filter bp_get_user_meta_key to modify keys individually
- * @param str $key
- * @return str $key
+ * @param string $key
+ * @return string $key
  */
 function bp_get_user_meta_key( $key = false ) {
 	return apply_filters( 'bp_get_user_meta_key', $key );
@@ -920,169 +930,51 @@ function bp_get_user_meta( $user_id, $key, $single = false ) {
  * @uses update_user_meta() See update_user_meta() docs for more details on parameters
  * @param int $user_id The id of the user whose meta you're setting
  * @param string $key The meta key to set.
- * @param mixed $value Metadata value.
- * @param mixed $prev_value Optional. Previous value to check before removing.
- * @return bool False on failure, true if success.
- */
-function bp_update_user_meta( $user_id, $key, $value, $prev_value = '' ) {
-	return update_user_meta( $user_id, bp_get_user_meta_key( $key ), $value, $prev_value );
-}
-
-/**
- * Delete a piece of usermeta
- *
- * This is a wrapper for delete_user_meta() that allows for easy use of bp_get_user_meta_key(),
- * thereby increasing compatibility with non-standard BP setups.
- *
- * @package BuddyPress
- * @since BuddyPress (1.5)
- *
- * @uses bp_get_user_meta_key() For a filterable version of the meta key
- * @uses delete_user_meta() See delete_user_meta() docs for more details on parameters
- * @param int $user_id The id of the user whose meta you're deleting
- * @param string $key The meta key to delete.
- * @param mixed $value Optional. Metadata value.
- * @return bool False for failure. True for success.
- */
-function bp_delete_user_meta( $user_id, $key, $value = '' ) {
-	return delete_user_meta( $user_id, bp_get_user_meta_key( $key ), $value );
-}
-
-/**
- * Are we running username compatibility mode?
- *
- * @package BuddyPress
- * @since BuddyPress (1.5)
- *
- * @uses apply_filters() Filter 'bp_is_username_compatibility_mode' to alter
- * @return bool False when compatibility mode is disabled (default); true when enabled
- */
-function bp_is_username_compatibility_mode() {
-	return apply_filters( 'bp_is_username_compatibility_mode', defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE' ) && BP_ENABLE_USERNAME_COMPATIBILITY_MODE );
-}
-
-/**
- * Are we running multiblog mode?
- *
- * Note that BP_ENABLE_MULTIBLOG is different from (but dependent on) WordPress
- * Multisite. "Multiblog" is BuddyPress setup that allows BuddyPress components
- * to be viewed on every blog on the network, each with their own settings.
- *
- * Thus, instead of having all 'boonebgorges' links go to
- *   http://example.com/members/boonebgorges
- * on the root blog, each blog will have its own version of the same content, eg
- *   http://site2.example.com/members/boonebgorges (for subdomains)
- *   http://example.com/site2/members/boonebgorges (for subdirectories)
- *
- * Multiblog mode is disabled by default, meaning that all BuddyPress content
- * must be viewed on the root blog. It's also recommended not to use the
- * BP_ENABLE_MULTIBLOG constant beyond 1.7, as BuddyPress can now be activated
- * on individual sites.
- *
- * Why would you want to use this? Originally it was intended to allow
- * BuddyPress to live in mu-plugins and be visible on mapped domains. This is
- * a very small use-case with large architectural shortcomings, so do not go
- * down this road unless you specifically need to.
- *
- * @package BuddyPress
- * @since BuddyPress (1.5)
- *
- * @uses apply_filters() Filter 'bp_is_multiblog_mode' to alter
- * @return bool False when multiblog mode is disabled (default); true when enabled
- */
-function bp_is_multiblog_mode() {
-
-	// Setup some default values
-	$retval         = false;
-	$is_multisite   = is_multisite();
-	$network_active = bp_is_network_activated();
-	$is_multiblog   = defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG;
-
-	// Multisite, Network Activated, and Specifically Multiblog
-	if ( $is_multisite && $network_active && $is_multiblog ) {
-		$retval = true;
-
-	// Multisite, but not network activated
-	} elseif ( $is_multisite && ! $network_active ) {
-		$retval = true;
-	}
-
-	return apply_filters( 'bp_is_multiblog_mode', $retval );
-}
-
-/**
- * Should we use the WP Toolbar?
- *
- * The WP Toolbar, introduced in WP 3.1, is fully supported in BuddyPress as of BP 1.5.
- * For BP 1.6, the WP Toolbar is the default.
- *
- * @return bool False when WP Toolbar support is disabled; true when enabled (default)
- * @since BuddyPress (1.5)
- * @uses apply_filters() Filter 'bp_use_wp_admin_bar' to alter
- */
-function bp_use_wp_admin_bar() {
-	$use_admin_bar = true;
-
-	// Has the WP Toolbar constant been explicity set?
-	if ( defined( 'BP_USE_WP_ADMIN_BAR' ) && ! BP_USE_WP_ADMIN_BAR )
-		$use_admin_bar = false;
-
-	// Has the admin chosen to use the BuddyBar during an upgrade?
-	elseif ( (bool) bp_get_option( '_bp_force_buddybar', false ) )
-		$use_admin_bar = false;
-
-	return apply_filters( 'bp_use_wp_admin_bar', $use_admin_bar );
+ * @param mixed $value Metadata value.
+ * @param mixed $prev_value Optional. Previous value to check before removing.
+ * @return bool False on failure, true if success.
+ */
+function bp_update_user_meta( $user_id, $key, $value, $prev_value = '' ) {
+	return update_user_meta( $user_id, bp_get_user_meta_key( $key ), $value, $prev_value );
 }
 
 /**
- * A utility for parsing individual function arguments into an array.
- *
- * The purpose of this function is to help with backward compatibility in cases where
- *
- *   function foo( $bar = 1, $baz = false, $barry = array(), $blip = false ) { // ...
- *
- * is deprecated in favor of
- *
- *   function foo( $args = array() ) {
- *       $defaults = array(
- *           'bar'  => 1,
- *           'arg2' => false,
- *           'arg3' => array(),
- *           'arg4' => false,
- *       );
- *       $r = wp_parse_args( $args, $defaults ); // ...
- *
- * The first argument, $old_args_keys, is an array that matches the parameter positions (keys) to
- * the new $args keys (values):
+ * Delete a piece of usermeta
  *
- *   $old_args_keys = array(
- *       0 => 'bar', // because $bar was the 0th parameter for foo()
- *       1 => 'baz', // because $baz was the 1st parameter for foo()
- *       2 => 'barry', // etc
- *       3 => 'blip'
- *   );
+ * This is a wrapper for delete_user_meta() that allows for easy use of bp_get_user_meta_key(),
+ * thereby increasing compatibility with non-standard BP setups.
  *
- * For the second argument, $func_args, you should just pass the value of func_get_args().
+ * @package BuddyPress
+ * @since BuddyPress (1.5)
  *
- * @since BuddyPress (1.6)
- * @param array $old_args_keys
- * @param array $func_args
- * @return array $new_args
+ * @uses bp_get_user_meta_key() For a filterable version of the meta key
+ * @uses delete_user_meta() See delete_user_meta() docs for more details on parameters
+ * @param int $user_id The id of the user whose meta you're deleting
+ * @param string $key The meta key to delete.
+ * @param mixed $value Optional. Metadata value.
+ * @return bool False for failure. True for success.
  */
-function bp_core_parse_args_array( $old_args_keys, $func_args ) {
-	$new_args = array();
-
-	foreach( $old_args_keys as $arg_num => $arg_key ) {
-		if ( isset( $func_args[$arg_num] ) ) {
-			$new_args[$arg_key] = $func_args[$arg_num];
-		}
-	}
-
-	return $new_args;
+function bp_delete_user_meta( $user_id, $key, $value = '' ) {
+	return delete_user_meta( $user_id, bp_get_user_meta_key( $key ), $value );
 }
 
 /** Embeds ********************************************************************/
 
+/**
+ * Initializes {@link BP_Embed} after everything is loaded.
+ *
+ * @global object $bp BuddyPress global settings
+ * @package BuddyPress Core
+ * @since BuddyPress (1.5)
+ */
+function bp_embed_init() {
+	global $bp;
+
+	if ( empty( $bp->embed ) )
+		$bp->embed = new BP_Embed();
+}
+add_action( 'bp_init', 'bp_embed_init', 9 );
+
 /**
  * Are oembeds allowed in activity items?
  *
@@ -1197,6 +1089,96 @@ function bp_core_admin_hook() {
 	return apply_filters( 'bp_core_admin_hook', $hook );
 }
 
+/** Multisite *****************************************************************/
+
+/**
+ * Is this the root blog ID?
+ *
+ * @package BuddyPress
+ * @since BuddyPress (1.5)
+ *
+ * @param int $blog_id Optional. Defaults to the current blog id.
+ * @return bool $is_root_blog Returns true if this is bp_get_root_blog_id().
+ */
+function bp_is_root_blog( $blog_id = 0 ) {
+
+	// Assume false
+	$is_root_blog = false;
+
+	// Use current blog if no ID is passed
+	if ( empty( $blog_id ) )
+		$blog_id = get_current_blog_id();
+
+	// Compare to root blog ID
+	if ( $blog_id == bp_get_root_blog_id() )
+		$is_root_blog = true;
+
+	return (bool) apply_filters( 'bp_is_root_blog', (bool) $is_root_blog );
+}
+
+/**
+ * Is this bp_get_root_blog_id()?
+ *
+ * @package BuddyPress
+ * @since BuddyPress (1.5)
+ *
+ * @return int Return the root site ID
+ */
+function bp_get_root_blog_id() {
+	global $bp;
+
+	return (int) apply_filters( 'bp_get_root_blog_id', (int) $bp->root_blog_id );
+}
+
+/**
+ * Are we running multiblog mode?
+ *
+ * Note that BP_ENABLE_MULTIBLOG is different from (but dependent on) WordPress
+ * Multisite. "Multiblog" is BuddyPress setup that allows BuddyPress components
+ * to be viewed on every blog on the network, each with their own settings.
+ *
+ * Thus, instead of having all 'boonebgorges' links go to
+ *   http://example.com/members/boonebgorges
+ * on the root blog, each blog will have its own version of the same content, eg
+ *   http://site2.example.com/members/boonebgorges (for subdomains)
+ *   http://example.com/site2/members/boonebgorges (for subdirectories)
+ *
+ * Multiblog mode is disabled by default, meaning that all BuddyPress content
+ * must be viewed on the root blog. It's also recommended not to use the
+ * BP_ENABLE_MULTIBLOG constant beyond 1.7, as BuddyPress can now be activated
+ * on individual sites.
+ *
+ * Why would you want to use this? Originally it was intended to allow
+ * BuddyPress to live in mu-plugins and be visible on mapped domains. This is
+ * a very small use-case with large architectural shortcomings, so do not go
+ * down this road unless you specifically need to.
+ *
+ * @package BuddyPress
+ * @since BuddyPress (1.5)
+ *
+ * @uses apply_filters() Filter 'bp_is_multiblog_mode' to alter
+ * @return bool False when multiblog mode is disabled (default); true when enabled
+ */
+function bp_is_multiblog_mode() {
+
+	// Setup some default values
+	$retval         = false;
+	$is_multisite   = is_multisite();
+	$network_active = bp_is_network_activated();
+	$is_multiblog   = defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG;
+
+	// Multisite, Network Activated, and Specifically Multiblog
+	if ( $is_multisite && $network_active && $is_multiblog ) {
+		$retval = true;
+
+	// Multisite, but not network activated
+	} elseif ( $is_multisite && ! $network_active ) {
+		$retval = true;
+	}
+
+	return apply_filters( 'bp_is_multiblog_mode', $retval );
+}
+
 /**
  * Is BuddyPress active at the network level for this network?
  *
@@ -1230,7 +1212,7 @@ function bp_is_network_activated() {
  *
  * @global BuddyPress $bp The one true BuddyPress instance
  * @param bool $is_directory
- * @param str $component
+ * @param string $component
  */
 function bp_update_is_directory( $is_directory = false, $component = '' ) {
 	global $bp;
@@ -1246,7 +1228,7 @@ function bp_update_is_directory( $is_directory = false, $component = '' ) {
  *
  * @global BuddyPress $bp The one true BuddyPress instance
  * @param bool $is_item_admin
- * @param str $component
+ * @param string $component
  */
 function bp_update_is_item_admin( $is_item_admin = false, $component = '' ) {
 	global $bp;
@@ -1262,7 +1244,7 @@ function bp_update_is_item_admin( $is_item_admin = false, $component = '' ) {
  *
  * @global BuddyPress $bp The one true BuddyPress instance
  * @param bool $is_item_mod
- * @param str $component
+ * @param string $component
  */
 function bp_update_is_item_mod( $is_item_mod = false, $component = '' ) {
 	global $bp;
@@ -1326,3 +1308,105 @@ function bp_verify_nonce_request( $action = '', $query_arg = '_wpnonce' ) {
 
 	return $result;
 }
+
+/** Miscellaneous hooks *******************************************************/
+
+/**
+ * Load the buddypress translation file for current language
+ *
+ * @package BuddyPress Core
+ */
+function bp_core_load_buddypress_textdomain() {
+	// Try to load via load_plugin_textdomain() first, for future
+	// wordpress.org translation downloads
+	if ( load_plugin_textdomain( 'buddypress', false, 'buddypress/bp-languages' ) ) {
+		return true;
+	}
+
+	// Nothing found in bp-languages, so try to load from WP_LANG_DIR
+	$locale = apply_filters( 'buddypress_locale', get_locale() );
+	$mofile = WP_LANG_DIR . '/buddypress-' . $locale . '.mo';
+
+	return load_textdomain( 'buddypress', $mofile );
+}
+add_action ( 'bp_core_loaded', 'bp_core_load_buddypress_textdomain' );
+
+/**
+ * A javascript free implementation of the search functions in BuddyPress
+ *
+ * @package BuddyPress Core
+ * @param string $slug The slug to redirect to for searching.
+ */
+function bp_core_action_search_site( $slug = '' ) {
+
+	if ( !bp_is_current_component( bp_get_search_slug() ) )
+		return;
+
+	if ( empty( $_POST['search-terms'] ) ) {
+		bp_core_redirect( bp_get_root_domain() );
+		return;
+	}
+
+	$search_terms = stripslashes( $_POST['search-terms'] );
+	$search_which = !empty( $_POST['search-which'] ) ? $_POST['search-which'] : '';
+	$query_string = '/?s=';
+
+	if ( empty( $slug ) ) {
+		switch ( $search_which ) {
+			case 'posts':
+				$slug = '';
+				$var  = '/?s=';
+
+				// If posts aren't displayed on the front page, find the post page's slug.
+				if ( 'page' == get_option( 'show_on_front' ) ) {
+					$page = get_post( get_option( 'page_for_posts' ) );
+
+					if ( !is_wp_error( $page ) && !empty( $page->post_name ) ) {
+						$slug = $page->post_name;
+						$var  = '?s=';
+					}
+				}
+				break;
+
+			case 'blogs':
+				$slug = bp_is_active( 'blogs' )  ? bp_get_blogs_root_slug()  : '';
+				break;
+
+			case 'forums':
+				$slug = bp_is_active( 'forums' ) ? bp_get_forums_root_slug() : '';
+				$query_string = '/?fs=';
+				break;
+
+			case 'groups':
+				$slug = bp_is_active( 'groups' ) ? bp_get_groups_root_slug() : '';
+				break;
+
+			case 'members':
+			default:
+				$slug = bp_get_members_root_slug();
+				break;
+		}
+
+		if ( empty( $slug ) && 'posts' != $search_which ) {
+			bp_core_redirect( bp_get_root_domain() );
+			return;
+		}
+	}
+
+	bp_core_redirect( apply_filters( 'bp_core_search_site', home_url( $slug . $query_string . urlencode( $search_terms ) ), $search_terms ) );
+}
+add_action( 'bp_init', 'bp_core_action_search_site', 7 );
+
+/**
+ * Prints the generation time in the footer of the site.
+ *
+ * @package BuddyPress Core
+ */
+function bp_core_print_generation_time() {
+?>
+
+<!-- Generated in <?php timer_stop(1); ?> seconds. (<?php echo get_num_queries(); ?> q) -->
+
+	<?php
+}
+add_action( 'wp_footer', 'bp_core_print_generation_time' );
diff --git a/wp-content/plugins/buddypress/bp-core/bp-core-loader.php b/wp-content/plugins/buddypress/bp-core/bp-core-loader.php
index f7ebe8fe02369364fe0820606885339d0f165860..d12d286fa5d45a7e727e212b39612068733a5941 100644
--- a/wp-content/plugins/buddypress/bp-core/bp-core-loader.php
+++ b/wp-content/plugins/buddypress/bp-core/bp-core-loader.php
@@ -70,14 +70,15 @@ class BP_Core extends BP_Component {
 		} elseif ( $deactivated_components = bp_get_option( 'bp-deactivated-components' ) ) {
 
 			// Trim off namespace and filename
-			foreach ( (array) $deactivated_components as $component => $value )
+			foreach ( array_keys( (array) $deactivated_components ) as $component ) {
 				$trimmed[] = str_replace( '.php', '', str_replace( 'bp-', '', $component ) );
+			}
 
 			// Set globals
 			$bp->deactivated_components = apply_filters( 'bp_deactivated_components', $trimmed );
 
 			// Setup the active components
-			$active_components     = array_fill_keys( array_diff( array_values( array_merge( $optional_components, $required_components ) ), array_values( $deactivated_components ) ), '1' );
+			$active_components     = array_fill_keys( array_diff( array_values( array_merge( $bp->optional_components, $bp->required_components ) ), array_values( $bp->deactivated_components ) ), '1' );
 
 			// Set the active component global
 			$bp->active_components = apply_filters( 'bp_active_components', $bp->active_components );
@@ -109,7 +110,7 @@ class BP_Core extends BP_Component {
 		$bp->required_components[] = 'core';
 	}
 
-	function includes() {
+	public function includes( $includes = array() ) {
 
 		if ( !is_admin() )
 			return;
@@ -129,7 +130,7 @@ class BP_Core extends BP_Component {
 	 *
 	 * @global BuddyPress $bp
 	 */
-	function setup_globals() {
+	public function setup_globals( $args = array() ) {
 		global $bp;
 
 		/** Database **********************************************************/
@@ -193,7 +194,7 @@ class BP_Core extends BP_Component {
 	 *
 	 * @global BuddyPress $bp
 	 */
-	function setup_nav() {
+	public function setup_nav( $main_nav = array(), $sub_nav = array() ) {
 		global $bp;
 
 		 // If xprofile component is disabled, revert to WordPress profile
diff --git a/wp-content/plugins/buddypress/bp-core/bp-core-options.php b/wp-content/plugins/buddypress/bp-core/bp-core-options.php
index 0addde0dadcbfa4ad499757a33a17b23f0552c2d..c015c5b19de797b4e996dbfdcc5d76a612da14c1 100644
--- a/wp-content/plugins/buddypress/bp-core/bp-core-options.php
+++ b/wp-content/plugins/buddypress/bp-core/bp-core-options.php
@@ -197,8 +197,8 @@ function bp_pre_get_option( $value = false ) {
  * @since BuddyPress (1.5)
  *
  * @uses bp_get_root_blog_id()
- * @param str $option_name The option to be retrieved
- * @param str $default Optional. Default value to be returned if the option isn't set
+ * @param string $option_name The option to be retrieved
+ * @param string $default Optional. Default value to be returned if the option isn't set
  * @return mixed The value for the option
  */
 function bp_get_option( $option_name, $default = '' ) {
@@ -217,8 +217,8 @@ function bp_get_option( $option_name, $default = '' ) {
  * @since BuddyPress (1.5)
  *
  * @uses bp_get_root_blog_id()
- * @param str $option_name The option key to be set
- * @param str $value The value to be set
+ * @param string $option_name The option key to be set
+ * @param string $value The value to be set
  */
 function bp_update_option( $option_name, $value ) {
 	update_blog_option( bp_get_root_blog_id(), $option_name, $value );
@@ -234,7 +234,7 @@ function bp_update_option( $option_name, $value ) {
  * @since BuddyPress (1.5)
  *
  * @uses bp_get_root_blog_id()
- * @param str $option_name The option key to be set
+ * @param string $option_name The option key to be set
  */
 function bp_delete_option( $option_name ) {
 	delete_blog_option( bp_get_root_blog_id(), $option_name );
@@ -377,7 +377,7 @@ function bp_core_get_root_options() {
  *
  * @since BuddyPress (1.6)
  *
- * @param $default bool Optional.Default value true
+ * @param bool $default Optional.Default value true
  *
  * @uses bp_get_option() To get the profile sync option
  * @return bool Is profile sync enabled or not
@@ -391,7 +391,7 @@ function bp_disable_profile_sync( $default = true ) {
  *
  * @since BuddyPress (1.6)
  *
- * @param $default bool Optional.Default value true
+ * @param bool $default Optional.Default value true
  *
  * @uses bp_get_option() To get the logged out Toolbar option
  * @return bool Is logged out Toolbar enabled or not
@@ -405,7 +405,7 @@ function bp_hide_loggedout_adminbar( $default = true ) {
  *
  * @since BuddyPress (1.6)
  *
- * @param $default bool Optional. Default value true
+ * @param bool $default Optional. Default value true
  *
  * @uses bp_get_option() To get the avatar uploads option
  * @return bool Are avatar uploads allowed?
@@ -419,7 +419,7 @@ function bp_disable_avatar_uploads( $default = true ) {
  *
  * @since BuddyPress (1.6)
  *
- * @param $default bool Optional. Default value
+ * @param bool $default Optional. Default value
  *
  * @uses bp_get_option() To get the account deletion option
  * @return bool Is account deletion allowed?
@@ -433,7 +433,7 @@ function bp_disable_account_deletion( $default = false ) {
  *
  * @since BuddyPress (1.6)
  *
- * @param $default bool Optional. Default value false
+ * @param bool $default Optional. Default value false
  * @todo split and move into blog and forum components
  * @uses bp_get_option() To get the blog/forum comments option
  * @return bool Is blog/forum comments allowed?
@@ -447,7 +447,7 @@ function bp_disable_blogforum_comments( $default = false ) {
  *
  * @since BuddyPress (1.6)
  *
- * @param $default bool Optional. Default value true
+ * @param bool $default Optional. Default value true
  *
  * @todo Move into groups component
  * @uses bp_get_option() To get the group creation
@@ -462,7 +462,7 @@ function bp_restrict_group_creation( $default = true ) {
  *
  * @since BuddyPress (1.6)
  *
- * @param $default bool Optional. Default value true
+ * @param bool $default Optional. Default value true
  *
  * @todo Move into groups component
  * @uses bp_get_option() To get the WP editor option
@@ -477,7 +477,7 @@ function bp_force_buddybar( $default = true ) {
  *
  * @since BuddyPress (1.6)
  *
- * @param $default bool Optional. Default value
+ * @param bool $default Optional. Default value
  */
 function bp_group_forums_root_id( $default = '0' ) {
 	echo bp_get_group_forums_root_id( $default );
@@ -487,13 +487,13 @@ function bp_group_forums_root_id( $default = '0' ) {
 	 *
 	 * @since BuddyPress (1.6)
 	 *
-	 * @param $default bool Optional. Default value 0
+	 * @param bool $default Optional. Default value 0
 	 *
 	 * @uses bp_get_option() To get the maximum title length
 	 * @return int Is anonymous posting allowed?
 	 */
 	function bp_get_group_forums_root_id( $default = '0' ) {
-		return (int) apply_filters( 'bp_get_group_forums_root_id', (int) bp_get_option( '_bbp_group_forums_root_id', $default ) );
+		return (int) apply_filters( 'bp_get_group_forums_root_id', (int) bp_get_option( '_bp_group_forums_root_id', $default ) );
 	}
 
 /**
@@ -501,13 +501,13 @@ function bp_group_forums_root_id( $default = '0' ) {
  *
  * @since BuddyPress (1.6)
  *
- * @param $default bool Optional. Default value true
+ * @param bool $default Optional. Default value true
  *
  * @uses bp_get_option() To get the group forums option
  * @return bool Is group forums enabled or not
  */
 function bp_is_group_forums_active( $default = true ) {
-	return (bool) apply_filters( 'bp_is_group_forums_active', (bool) bp_get_option( '_bbp_enable_group_forums', $default ) );
+	return (bool) apply_filters( 'bp_is_group_forums_active', (bool) bp_get_option( '_bp_enable_group_forums', $default ) );
 }
 
 /**
@@ -515,7 +515,7 @@ function bp_is_group_forums_active( $default = true ) {
  *
  * @since BuddyPress (1.6)
  *
- * @param $default bool Optional. Default value true
+ * @param bool $default Optional. Default value true
  *
  * @uses bp_get_option() To get the Akismet option
  * @return bool Is Akismet enabled or not
@@ -529,10 +529,10 @@ function bp_is_akismet_active( $default = true ) {
  *
  * @since BuddyPress (1.7)
  *
- * @param $default string Optional. Default value 'default'
+ * @param string $default Optional. Default value 'default'
  * @uses get_option() To get the subtheme option
  * @return string ID of the subtheme
  */
 function bp_get_theme_package_id( $default = 'legacy' ) {
-	return apply_filters( 'bp_get_theme_package_id', get_option( '_bp_theme_package_id', $default ) );
+	return apply_filters( 'bp_get_theme_package_id', bp_get_option( '_bp_theme_package_id', $default ) );
 }
diff --git a/wp-content/plugins/buddypress/bp-core/bp-core-template-loader.php b/wp-content/plugins/buddypress/bp-core/bp-core-template-loader.php
index 334a4498240f51d7c548d60f56b89b5463899a20..7887169a66f271adbcdcd12186476e1655242d46 100644
--- a/wp-content/plugins/buddypress/bp-core/bp-core-template-loader.php
+++ b/wp-content/plugins/buddypress/bp-core/bp-core-template-loader.php
@@ -211,10 +211,7 @@ function bp_buffer_template_part( $slug, $name = null, $echo = true ) {
 	add_filter( 'the_content', 'bp_replace_the_content' );
 
 	// Get the output buffer contents
-	$output = ob_get_contents();
-
-	// Flush the output buffer
-	ob_end_clean();
+	$output = ob_get_clean();
 
 	// Echo or return the output buffer contents
 	if ( true === $echo ) {
@@ -341,19 +338,38 @@ function bp_template_include_theme_supports( $template = '' ) {
 	// Look for root BuddyPress template files in parent/child themes
 	$new_template = apply_filters( 'bp_get_root_template', false, $template );
 
-	// BuddyPress template file exists
+	// A BuddyPress template file was located, so override the WordPress
+	// template and use it to switch off BuddyPress's theme compatibility.
 	if ( !empty( $new_template ) ) {
-
-		// Override the WordPress template with a BuddyPress one
-		$template = $new_template;
-
-		// @see: bp_template_include_theme_compat()
-		buddypress()->theme_compat->found_template = true;
+		$template = bp_set_template_included( $new_template );
 	}
 
 	return apply_filters( 'bp_template_include_theme_supports', $template );
 }
 
+/**
+ * Set the included template
+ *
+ * @since BuddyPress (1.8)
+ * @param mixed $template Default false
+ * @return mixed False if empty. Template name if template included
+ */
+function bp_set_template_included( $template = false ) {
+	buddypress()->theme_compat->found_template = $template;
+
+	return buddypress()->theme_compat->found_template;
+}
+
+/**
+ * Is a BuddyPress template being included?
+ *
+ * @since BuddyPress (1.8)
+ * @return bool True if yes, false if no
+ */
+function bp_is_template_included() {
+	return ! empty( buddypress()->theme_compat->found_template );
+}
+
 /**
  * Attempt to load a custom BuddyPress functions file, similar to each themes
  * functions.php file.
diff --git a/wp-content/plugins/buddypress/bp-core/bp-core-template.php b/wp-content/plugins/buddypress/bp-core/bp-core-template.php
index 4ffa19ca4fac0f83f4c547eddd4ce0ea26c3839b..3c7757fb3bc4f1ede96910279788d5b3dc896704 100644
--- a/wp-content/plugins/buddypress/bp-core/bp-core-template.php
+++ b/wp-content/plugins/buddypress/bp-core/bp-core-template.php
@@ -622,7 +622,7 @@ function bp_action_variables() {
  * @since BuddyPress (1.5)
  *
  * @param int $position The key of the action_variables array that you want
- * @return str $action_variable The value of that position in the array
+ * @return string $action_variable The value of that position in the array
  */
 function bp_action_variable( $position = 0 ) {
 	$action_variables = bp_action_variables();
@@ -709,9 +709,9 @@ function bp_root_slug( $component = '' ) {
 /**
  * Return the component name based on the current root slug
  *
- * @since BuddyPress {r3923}
+ * @since BuddyPress (1.5)
  * @global BuddyPress $bp The one true BuddyPress instance
- * @param str $root_slug Needle to our active component haystack
+ * @param string $root_slug Needle to our active component haystack
  * @return mixed False if none found, component name if found
  */
 function bp_get_name_from_root_slug( $root_slug = '' ) {
@@ -883,7 +883,7 @@ function bp_is_current_component( $component ) {
  * @package BuddyPress
  * @since BuddyPress (1.5)
  *
- * @param str $action The action being tested against
+ * @param string $action The action being tested against
  * @return bool True if the current action matches $action
  */
 function bp_is_current_action( $action = '' ) {
@@ -907,7 +907,7 @@ function bp_is_current_action( $action = '' ) {
  * @package BuddyPress
  * @since BuddyPress (1.5)
  *
- * @param str $action_variable The action_variable being tested against
+ * @param string $action_variable The action_variable being tested against
  * @param int $position The array key you're testing against. If you don't provide a $position,
  *   the function will return true if the $action_variable is found *anywhere* in the action
  *   variables array.
@@ -984,7 +984,7 @@ function bp_is_directory() {
  *   No:  http://domain.com/members/andy/groups/the-group
  *
  * @package BuddyPress Core
- * @return true if root component, else false.
+ * @return bool True if root component, else false.
  */
 function bp_is_root_component( $component_name ) {
 	global $bp;
@@ -1597,7 +1597,7 @@ function bp_is_register_page() {
 function bp_the_body_class() {
 	echo bp_get_the_body_class();
 }
-	function bp_get_the_body_class( $wp_classes, $custom_classes = false ) {
+	function bp_get_the_body_class( $wp_classes = array(), $custom_classes = false ) {
 
 		$bp_classes = array();
 
@@ -1891,19 +1891,30 @@ function bp_get_nav_menu_items() {
  * Displays a navigation menu.
  *
  * @param string|array $args Optional arguments:
- *  before - Text before the link text.
- *  container - Whether to wrap the ul, and what to wrap it with. Defaults to div.
- *  container_class - The class that is applied to the container. Defaults to 'menu-bp-container'.
- *  container_id - The ID that is applied to the container. Defaults to blank.
- *  depth - How many levels of the hierarchy are to be included. 0 means all. Defaults to 0.
- *  echo - Whether to echo the menu or return it. Defaults to echo.
- *  fallback_cb - If the menu doesn't exists, a callback function will fire. Defaults to false (no fallback).
- *  items_wrap - How the list items should be wrapped. Defaults to a ul with an id and class. Uses printf() format with numbered placeholders.
- *  link_after - Text after the link.
- *  link_before - Text before the link.
- *  menu_class - CSS class to use for the ul element which forms the menu. Defaults to 'menu'.
- *  menu_id - The ID that is applied to the ul element which forms the menu. Defaults to 'menu-bp', incremented.
- *  walker - Allows a custom walker to be specified. Defaults to 'BP_Walker_Nav_Menu'.
+ *  - before           Text before the link text.
+ *  - container        Whether to wrap the ul, and what to wrap it with.
+ *                     Defaults to div.
+ *  - container_class  The class that is applied to the container. Defaults to
+ *                     'menu-bp-container'.
+ *  - container_id     The ID that is applied to the container. Defaults to
+ *                     blank.
+ *  - depth            How many levels of the hierarchy are to be included. 0
+ *                     means all. Defaults to 0.
+ *  - echo             Whether to echo the menu or return it. Defaults to echo.
+ *  - fallback_cb      If the menu doesn't exists, a callback function will
+ *                     fire. Defaults to false (no fallback).
+ *  - items_wrap       How the list items should be wrapped. Defaults to a ul
+ *                     with an id and class. Uses printf() format with numbered
+ *                     placeholders.
+ *  - link_after       Text after the link.
+ *  - link_before      Text before the link.
+ *  - menu_class       CSS class to use for the ul element which forms the menu.
+ *                     Defaults to 'menu'.
+ *  - menu_id          The ID that is applied to the ul element which forms the
+ *                     menu. Defaults to 'menu-bp', incremented.
+ *  - walker           Allows a custom walker to be specified. Defaults to
+ *                     'BP_Walker_Nav_Menu'.
+ *
  * @since BuddyPress (1.7)
  */
 function bp_nav_menu( $args = array() ) {
diff --git a/wp-content/plugins/buddypress/bp-core/bp-core-theme-compatibility.php b/wp-content/plugins/buddypress/bp-core/bp-core-theme-compatibility.php
index fd62a43cdbce685e0e3a501db82aa3cae236b6b3..c9c126efbe14a3771bdeb9278b58fe0134ec6acd 100644
--- a/wp-content/plugins/buddypress/bp-core/bp-core-theme-compatibility.php
+++ b/wp-content/plugins/buddypress/bp-core/bp-core-theme-compatibility.php
@@ -315,27 +315,44 @@ function bp_is_theme_compat_original_template( $template = '' ) {
 /**
  * Register a new BuddyPress theme package to the active theme packages array
  *
+ * The $theme parameter is an array, which takes the following values:
+ *
+ *  'id'      - ID for your theme package; should be alphanumeric only
+ *  'name'    - Name of your theme package
+ *  'version' - Version of your theme package
+ *  'dir'     - Directory where your theme package resides
+ *  'url'     - URL where your theme package resides
+ *
+ * For an example of how this function is used, see:
+ * {@link BuddyPress::register_theme_packages()}.
+ *
  * @since BuddyPress (1.7)
- * @param array $theme
+ *
+ * @param array $theme The theme package arguments. See phpDoc for more details.
+ * @param bool $override If true, overrides whatever package is currently set.
  */
 function bp_register_theme_package( $theme = array(), $override = true ) {
 
 	// Create new BP_Theme_Compat object from the $theme array
-	if ( is_array( $theme ) )
+	if ( is_array( $theme ) ) {
 		$theme = new BP_Theme_Compat( $theme );
+	}
 
 	// Bail if $theme isn't a proper object
-	if ( ! is_a( $theme, 'BP_Theme_Compat' ) )
+	if ( ! is_a( $theme, 'BP_Theme_Compat' ) ) {
 		return;
+	}
 
 	// Load up BuddyPress
 	$bp = buddypress();
 
-	// Only override if the flag is set and not previously registered
+	// Only set if the theme package was not previously registered or if the
+	// override flag is set
 	if ( empty( $bp->theme_compat->packages[$theme->id] ) || ( true === $override ) ) {
 		$bp->theme_compat->packages[$theme->id] = $theme;
 	}
 }
+
 /**
  * This fun little function fills up some WordPress globals with dummy data to
  * stop your average page template from complaining about it missing.
@@ -348,43 +365,9 @@ function bp_register_theme_package( $theme = array(), $override = true ) {
 function bp_theme_compat_reset_post( $args = array() ) {
 	global $wp_query, $post;
 
-	// Default arguments
-	$defaults = array(
-		'ID'                    => -9999,
-		'post_status'           => 'publish',
-		'post_author'           => 0,
-		'post_parent'           => 0,
-		'post_type'             => 'page',
-		'post_date'             => 0,
-		'post_date_gmt'         => 0,
-		'post_modified'         => 0,
-		'post_modified_gmt'     => 0,
-		'post_content'          => '',
-		'post_title'            => '',
-		'post_category'         => 0,
-		'post_excerpt'          => '',
-		'post_content_filtered' => '',
-		'post_mime_type'        => '',
-		'post_password'         => '',
-		'post_name'             => '',
-		'guid'                  => '',
-		'menu_order'            => 0,
-		'pinged'                => '',
-		'to_ping'               => '',
-		'ping_status'           => '',
-		'comment_status'        => 'closed',
-		'comment_count'         => 0,
-
-		'is_404'          => false,
-		'is_page'         => false,
-		'is_single'       => false,
-		'is_archive'      => false,
-		'is_tax'          => false,
-	);
-
 	// Switch defaults if post is set
 	if ( isset( $wp_query->post ) ) {
-		$defaults = array(
+		$dummy = wp_parse_args( $args, array(
 			'ID'                    => $wp_query->post->ID,
 			'post_status'           => $wp_query->post->post_status,
 			'post_author'           => $wp_query->post->post_author,
@@ -408,52 +391,60 @@ function bp_theme_compat_reset_post( $args = array() ) {
 			'ping_status'           => $wp_query->post->ping_status,
 			'comment_status'        => $wp_query->post->comment_status,
 			'comment_count'         => $wp_query->post->comment_count,
+			'filter'                => $wp_query->post->filter,
+
+			'is_404'                => false,
+			'is_page'               => false,
+			'is_single'             => false,
+			'is_archive'            => false,
+			'is_tax'                => false,
+		) );
+	} else {
+		$dummy = wp_parse_args( $args, array(
+			'ID'                    => -9999,
+			'post_status'           => 'public',
+			'post_author'           => 0,
+			'post_parent'           => 0,
+			'post_type'             => 'page',
+			'post_date'             => 0,
+			'post_date_gmt'         => 0,
+			'post_modified'         => 0,
+			'post_modified_gmt'     => 0,
+			'post_content'          => '',
+			'post_title'            => '',
+			'post_excerpt'          => '',
+			'post_content_filtered' => '',
+			'post_mime_type'        => '',
+			'post_password'         => '',
+			'post_name'             => '',
+			'guid'                  => '',
+			'menu_order'            => 0,
+			'pinged'                => '',
+			'to_ping'               => '',
+			'ping_status'           => '',
+			'comment_status'        => 'closed',
+			'comment_count'         => 0,
+			'filter'                => 'raw',
+
+			'is_404'                => false,
+			'is_page'               => false,
+			'is_single'             => false,
+			'is_archive'            => false,
+			'is_tax'                => false,
+		) );
+	}
 
-			'is_404'          => false,
-			'is_page'         => false,
-			'is_single'       => false,
-			'is_archive'      => false,
-			'is_tax'          => false,
-		);
+	// Bail if dummy post is empty
+	if ( empty( $dummy ) ) {
+		return;
 	}
-	$dummy = wp_parse_args( $args, $defaults ); //, 'theme_compat_reset_post' );
-
-	// Clear out the post related globals
-	unset( $wp_query->posts );
-	unset( $wp_query->post  );
-	unset( $post            );
-
-	// Setup the dummy post object
-	$wp_query->post                        = new stdClass;
-	$wp_query->post->ID                    = $dummy['ID'];
-	$wp_query->post->post_status           = $dummy['post_status'];
-	$wp_query->post->post_author           = $dummy['post_author'];
-	$wp_query->post->post_parent           = $dummy['post_parent'];
-	$wp_query->post->post_type             = $dummy['post_type'];
-	$wp_query->post->post_date             = $dummy['post_date'];
-	$wp_query->post->post_date_gmt         = $dummy['post_date_gmt'];
-	$wp_query->post->post_modified         = $dummy['post_modified'];
-	$wp_query->post->post_modified_gmt     = $dummy['post_modified_gmt'];
-	$wp_query->post->post_content          = $dummy['post_content'];
-	$wp_query->post->post_title            = $dummy['post_title'];
-	$wp_query->post->post_excerpt          = $dummy['post_excerpt'];
-	$wp_query->post->post_content_filtered = $dummy['post_content_filtered'];
-	$wp_query->post->post_mime_type        = $dummy['post_mime_type'];
-	$wp_query->post->post_password         = $dummy['post_password'];
-	$wp_query->post->post_name             = $dummy['post_name'];
-	$wp_query->post->guid                  = $dummy['guid'];
-	$wp_query->post->menu_order            = $dummy['menu_order'];
-	$wp_query->post->pinged                = $dummy['pinged'];
-	$wp_query->post->to_ping               = $dummy['to_ping'];
-	$wp_query->post->ping_status           = $dummy['ping_status'];
-	$wp_query->post->comment_status        = $dummy['comment_status'];
-	$wp_query->post->comment_count         = $dummy['comment_count'];
 
 	// Set the $post global
-	$post = $wp_query->post;
+	$post = new WP_Post( (object) $dummy );
 
-	// Setup the dummy post loop
-	$wp_query->posts[0] = $wp_query->post;
+	// Copy the new post global into the main $wp_query
+	$wp_query->post       = $post;
+	$wp_query->posts      = array( $post );
 
 	// Prevent comments form from appearing
 	$wp_query->post_count = 1;
@@ -463,8 +454,20 @@ function bp_theme_compat_reset_post( $args = array() ) {
 	$wp_query->is_archive = $dummy['is_archive'];
 	$wp_query->is_tax     = $dummy['is_tax'];
 
+	// Clean up the dummy post
+	unset( $dummy );
+
+	/**
+	 * Force the header back to 200 status if not a deliberate 404
+	 *
+	 * @see http://bbpress.trac.wordpress.org/ticket/1973
+	 */
+	if ( ! $wp_query->is_404() ) {
+		status_header( 200 );
+	}
+
 	// If we are resetting a post, we are in theme compat
-	bp_set_theme_compat_active();
+	bp_set_theme_compat_active( true );
 }
 
 /**
@@ -518,24 +521,19 @@ function bp_template_include_theme_compat( $template = '' ) {
 	 * Uses bp_get_theme_compat_templates() to provide fall-backs that
 	 * should be coded without superfluous mark-up and logic (prev/next
 	 * navigation, comments, date/time, etc...)
+	 *
+	 * Hook into 'bp_get_buddypress_template' to override the array of
+	 * possible templates, or 'bp_buddypress_template' to override the result.
 	 */
 	if ( bp_is_theme_compat_active() ) {
+		$template = bp_get_theme_compat_templates();
 
-		// Remove all filters from the_content
-		bp_remove_all_filters( 'the_content' );
-
-		// Add a filter on the_content late, which we will later remove
-		if ( ! has_filter( 'the_content', 'bp_replace_the_content' ) ) {
-			add_filter( 'the_content', 'bp_replace_the_content' );
-		}
+		add_filter( 'the_content', 'bp_replace_the_content' );
 
 		// Add BuddyPress's head action to wp_head
 		if ( ! has_action( 'wp_head', 'bp_head' ) ) {
 			add_action( 'wp_head', 'bp_head' );
 		}
-
-		// Find the appropriate template file
-		$template = bp_get_theme_compat_templates();
 	}
 
 	return apply_filters( 'bp_template_include_theme_compat', $template );
@@ -548,17 +546,23 @@ function bp_template_include_theme_compat( $template = '' ) {
  *
  * @since BuddyPress (1.7)
  * @param string $content
- * @return type
+ * @return string
  */
 function bp_replace_the_content( $content = '' ) {
 
-	if ( ! in_the_loop() )
+	// Bail if not the main loop where theme compat is happening
+	if ( ! bp_do_theme_compat() )
 		return $content;
 
+	// Set theme compat to false early, to avoid recursion from nested calls to
+	// the_content() that execute before theme compat has unhooked itself.
+	bp_set_theme_compat_active( false );
+
+	// Do we have new content to replace the old content?
 	$new_content = apply_filters( 'bp_replace_the_content', $content );
 
 	// Juggle the content around and try to prevent unsightly comments
-	if ( !empty( $new_content ) && ( $new_content != $content ) ) {
+	if ( !empty( $new_content ) && ( $new_content !== $content ) ) {
 
 		// Set the content to be the new content
 		$content = $new_content;
@@ -574,6 +578,16 @@ function bp_replace_the_content( $content = '' ) {
 	return $content;
 }
 
+/**
+ * Are we replacing the_content
+ *
+ * @since BuddyPress (1.8)
+ * @return bool
+ */
+function bp_do_theme_compat() {
+	return (bool) ( ! bp_is_template_included() && in_the_loop() && bp_is_theme_compat_active() );
+}
+
 /** Filters *******************************************************************/
 
 /**
diff --git a/wp-content/plugins/buddypress/bp-core/bp-core-update.php b/wp-content/plugins/buddypress/bp-core/bp-core-update.php
index 1db5dd5a8b5d9d01773015c9414d12e07e70e9fa..08c6024c9007768ef94ef18f5ac0049a0e4b8738 100644
--- a/wp-content/plugins/buddypress/bp-core/bp-core-update.php
+++ b/wp-content/plugins/buddypress/bp-core/bp-core-update.php
@@ -167,7 +167,7 @@ function bp_setup_updater() {
  * This is most-often used when the data schema changes, but should also be used
  * to correct issues with BuddyPress metadata silently on software update.
  *
- * @since BuddyPress (r4104)
+ * @since BuddyPress (1.7)
  */
 function bp_version_updater() {
 
@@ -253,8 +253,6 @@ function bp_update_to_1_6() {
  * @internal Used internally to redirect BuddyPress to the about page on activation
  *
  * @uses set_transient() To drop the activation transient for 30 seconds
- *
- * @return If bulk activation
  */
 function bp_add_activation_redirect() {
 
diff --git a/wp-content/plugins/buddypress/bp-core/bp-core-widgets.php b/wp-content/plugins/buddypress/bp-core/bp-core-widgets.php
index 69c95281c4e9f52fbd8274a4cf59ba436757c404..76f303db5fad0c0ff8c3c0cb89a9a458de01ab76 100644
--- a/wp-content/plugins/buddypress/bp-core/bp-core-widgets.php
+++ b/wp-content/plugins/buddypress/bp-core/bp-core-widgets.php
@@ -17,7 +17,7 @@ class BP_Core_Members_Widget extends WP_Widget {
 	function __construct() {
 		$widget_ops = array(
 			'description' => __( 'A dynamic list of recently active, popular, and newest members', 'buddypress' ),
-			'classname' => 'widget_bp_core_members_widget buddypress',
+			'classname' => 'widget_bp_core_members_widget buddypress widget',
 		);
 		parent::__construct( false, $name = _x( '(BuddyPress) Members', 'widget name', 'buddypress' ), $widget_ops );
 
@@ -34,9 +34,11 @@ class BP_Core_Members_Widget extends WP_Widget {
 		if ( !$instance['member_default'] )
 			$instance['member_default'] = 'active';
 
+		$title = apply_filters( 'widget_title', $instance['title'] );
+
 		echo $before_widget;
 
-		$title = $instance['link_title'] ? '<a href="' . trailingslashit( bp_get_root_domain() . '/' . bp_get_members_root_slug() ) . '">' . $instance['title'] . '</a>' : $instance['title'];
+		$title = $instance['link_title'] ? '<a href="' . trailingslashit( bp_get_root_domain() . '/' . bp_get_members_root_slug() ) . '">' . $title . '</a>' : $title;
 
 		echo $before_title
 		   . $title
@@ -44,12 +46,12 @@ class BP_Core_Members_Widget extends WP_Widget {
 
 		<?php if ( bp_has_members( 'user_id=0&type=' . $instance['member_default'] . '&max=' . $instance['max_members'] . '&populate_extras=1' ) ) : ?>
 			<div class="item-options" id="members-list-options">
-				<a href="<?php echo site_url( bp_get_members_root_slug() ); ?>" id="newest-members" <?php if ( $instance['member_default'] == 'newest' ) : ?>class="selected"<?php endif; ?>><?php _e( 'Newest', 'buddypress' ) ?></a>
-				|  <a href="<?php echo site_url( bp_get_members_root_slug() ); ?>" id="recently-active-members" <?php if ( $instance['member_default'] == 'active' ) : ?>class="selected"<?php endif; ?>><?php _e( 'Active', 'buddypress' ) ?></a>
+				<a href="<?php bp_members_directory_permalink(); ?>" id="newest-members" <?php if ( $instance['member_default'] == 'newest' ) : ?>class="selected"<?php endif; ?>><?php _e( 'Newest', 'buddypress' ) ?></a>
+				|  <a href="<?php bp_members_directory_permalink(); ?>" id="recently-active-members" <?php if ( $instance['member_default'] == 'active' ) : ?>class="selected"<?php endif; ?>><?php _e( 'Active', 'buddypress' ) ?></a>
 
 				<?php if ( bp_is_active( 'friends' ) ) : ?>
 
-					| <a href="<?php echo site_url( bp_get_members_root_slug() ); ?>" id="popular-members" <?php if ( $instance['member_default'] == 'popular' ) : ?>class="selected"<?php endif; ?>><?php _e( 'Popular', 'buddypress' ) ?></a>
+					| <a href="<?php bp_members_directory_permalink(); ?>" id="popular-members" <?php if ( $instance['member_default'] == 'popular' ) : ?>class="selected"<?php endif; ?>><?php _e( 'Popular', 'buddypress' ) ?></a>
 
 				<?php endif; ?>
 			</div>
@@ -148,18 +150,20 @@ class BP_Core_Whos_Online_Widget extends WP_Widget {
 	function __construct() {
 		$widget_ops = array(
 			'description' => __( 'Avatars of users who are currently online', 'buddypress' ),
-			'classname' => 'widget_bp_core_whos_online_widget buddypress',
+			'classname' => 'widget_bp_core_whos_online_widget buddypress widget',
 		);
 		parent::__construct( false, $name = _x( "(BuddyPress) Who's Online", 'widget name', 'buddypress' ), $widget_ops );
 	}
 
 	function widget($args, $instance) {
 
-	    extract( $args );
+		extract( $args );
+
+		$title = apply_filters( 'widget_title', $instance['title'] );
 
 		echo $before_widget;
 		echo $before_title
-		   . $instance['title']
+		   . $title
 		   . $after_title; ?>
 
 		<?php if ( bp_has_members( 'user_id=0&type=online&per_page=' . $instance['max_members'] . '&max=' . $instance['max_members'] . '&populate_extras=1' ) ) : ?>
@@ -215,7 +219,7 @@ class BP_Core_Recently_Active_Widget extends WP_Widget {
 	function __construct() {
 		$widget_ops = array(
 			'description' => __( 'Avatars of recently active members', 'buddypress' ),
-			'classname' => 'widget_bp_core_recently_active_widget buddypress',
+			'classname' => 'widget_bp_core_recently_active_widget buddypress widget',
 		);
 		parent::__construct( false, $name = _x( '(BuddyPress) Recently Active Members', 'widget name', 'buddypress' ), $widget_ops );
 	}
@@ -224,9 +228,11 @@ class BP_Core_Recently_Active_Widget extends WP_Widget {
 
 		extract( $args );
 
+		$title = apply_filters( 'widget_title', $instance['title'] );
+
 		echo $before_widget;
 		echo $before_title
-		   . $instance['title']
+		   . $title
 		   . $after_title; ?>
 
 		<?php if ( bp_has_members( 'user_id=0&type=active&per_page=' . $instance['max_members'] . '&max=' . $instance['max_members'] . '&populate_extras=1' ) ) : ?>
diff --git a/wp-content/plugins/buddypress/bp-core/bp-core-wpabstraction.php b/wp-content/plugins/buddypress/bp-core/bp-core-wpabstraction.php
index 2d41b293ddca880090be65e3d392d1866f9ac20d..c749e6b16c8444b9884a6f24faf7d290cd65643b 100644
--- a/wp-content/plugins/buddypress/bp-core/bp-core-wpabstraction.php
+++ b/wp-content/plugins/buddypress/bp-core/bp-core-wpabstraction.php
@@ -127,10 +127,10 @@ if ( !function_exists( 'mb_strlen' ) ) {
 if ( !function_exists( 'mb_strpos' ) ) {
 	/**
 	 * Fallback implementation of mb_strpos, hardcoded to UTF-8.
-	 * @param $haystack String
-	 * @param $needle String
-	 * @param $offset String: optional start position
-	 * @param $encoding String: optional encoding; ignored
+	 * @param string $haystack
+	 * @param string $needle
+	 * @param int $offset optional; start position.
+	 * @param string $encoding optional; not used.
 	 * @return int
 	 */
 	function mb_strpos( $haystack, $needle, $offset = 0, $encoding = '' ) {
@@ -150,10 +150,10 @@ if ( !function_exists( 'mb_strpos' ) ) {
 if ( !function_exists( 'mb_strrpos' ) ) {
 	/**
 	 * Fallback implementation of mb_strrpos, hardcoded to UTF-8.
-	 * @param $haystack String
-	 * @param $needle String
-	 * @param $offset String: optional start position
-	 * @param $encoding String: optional encoding; ignored
+	 * @param string $haystack
+	 * @param string $needle
+	 * @param int $offset optional; start position.
+	 * @param string $encoding optional; not used.
 	 * @return int
 	 */
 	function mb_strrpos( $haystack, $needle, $offset = 0, $encoding = '' ) {
diff --git a/wp-content/plugins/buddypress/bp-core/deprecated/1.2.php b/wp-content/plugins/buddypress/bp-core/deprecated/1.2.php
new file mode 100644
index 0000000000000000000000000000000000000000..fc121bfe087836ce256085b55fd830101a641826
--- /dev/null
+++ b/wp-content/plugins/buddypress/bp-core/deprecated/1.2.php
@@ -0,0 +1,48 @@
+<?php
+
+/**
+ * Retrieve sitewide activity
+ *
+ * You should use bp_activity_get() instead
+ *
+ * @since BuddyPress (1.0)
+ * @deprecated BuddyPress (1.2)
+ *
+ * @param array $args
+ *
+ * @uses BP_Activity_Activity::get() {@link BP_Activity_Activity}
+ *
+ * @return object $activity The activity/activities object
+ */
+function bp_activity_get_sitewide( $args = '' ) {
+	_deprecated_function( __FUNCTION__, '1.2', 'bp_activity_get()' );
+
+	$defaults = array(
+		'max' => false, // Maximum number of results to return
+		'page' => 1, // page 1 without a per_page will result in no pagination.
+		'per_page' => false, // results per page
+		'sort' => 'DESC', // sort ASC or DESC
+		'display_comments' => false, // false for no comments. 'stream' for within stream display, 'threaded' for below each activity item
+
+		'search_terms' => false, // Pass search terms as a string
+		'show_hidden' => false, // Show activity items that are hidden site-wide?
+
+		/**
+		 * Pass filters as an array:
+		 * array(
+		 * 	'user_id' => false, // user_id to filter on
+		 *	'object' => false, // object to filter on e.g. groups, profile, status, friends
+		 *	'action' => false, // action to filter on e.g. new_wire_post, new_forum_post, profile_updated
+		 *	'primary_id' => false, // object ID to filter on e.g. a group_id or forum_id or blog_id etc.
+		 *	'secondary_id' => false, // secondary object ID to filter on e.g. a post_id
+		 * );
+		 */
+		'filter' => array()
+	);
+
+	$args = wp_parse_args( $args, $defaults );
+
+	return apply_filters( 'bp_activity_get_sitewide', BP_Activity_Activity::get( $args ), $r );
+}
+
+
diff --git a/wp-content/plugins/buddypress/bp-core/deprecated/1.5.php b/wp-content/plugins/buddypress/bp-core/deprecated/1.5.php
index 62a9ba94a1d9cdc2f50e411187d0698f81bd4285..92a43a5f44964613dd81e2478e07b7399e053a2f 100644
--- a/wp-content/plugins/buddypress/bp-core/deprecated/1.5.php
+++ b/wp-content/plugins/buddypress/bp-core/deprecated/1.5.php
@@ -250,7 +250,7 @@ function bp_is_member() {
  * @deprecated use bp_loggedin_user_link()
  */
 function bp_loggedinuser_link() {
-	_deprecated_function( __FUNCTION__, '1.5', 'bp_logged_in_user_link' );
+	_deprecated_function( __FUNCTION__, '1.5', 'bp_loggedin_user_link' );
 	bp_loggedin_user_link();
 }
 
@@ -454,7 +454,7 @@ function bp_is_friend_requests() {
  *
  * @deprecated BuddyPress (1.5)
  * @deprecated bp_is_root_component()
- * @return true if root component, else false.
+ * @return bool True if root component, else false.
  */
 function bp_core_is_root_component( $component_name ) {
 	_deprecated_function( __FUNCTION__, '1.5', 'bp_is_root_component()' );
@@ -497,8 +497,8 @@ function bp_dtheme_deprecated() {
 	 *
 	 * @deprecated BuddyPress (1.5)
 	 * @deprecated No longer required.
-	 * @param $string $oldvalue Previous value of get_option( 'page_on_front' )
-	 * @param $string $oldvalue New value of get_option( 'page_on_front' )
+	 * @param string $oldvalue Previous value of get_option( 'page_on_front' )
+	 * @param string $oldvalue New value of get_option( 'page_on_front' )
 	 * @return string
 	 * @since BuddyPress (1.2)
 	 */
diff --git a/wp-content/plugins/buddypress/bp-core/deprecated/1.6.php b/wp-content/plugins/buddypress/bp-core/deprecated/1.6.php
index e84fb638264a7f3253dd82d8a5e960e0e970ad9d..4330b090c9db3dc3b99e0038603595a2a10181c1 100644
--- a/wp-content/plugins/buddypress/bp-core/deprecated/1.6.php
+++ b/wp-content/plugins/buddypress/bp-core/deprecated/1.6.php
@@ -193,7 +193,7 @@ function updates_register_activity_actions() {
  * Sets the "From" address in emails sent
  *
  * @deprecated BuddyPress (1.6)
- * @return noreply@sitedomain email address
+ * @return string email address
  */
 function bp_core_email_from_address_filter() {
 	_deprecated_function( __FUNCTION__, '1.6' );
diff --git a/wp-content/plugins/buddypress/bp-forums/bp-forums-bbpress-sa.php b/wp-content/plugins/buddypress/bp-forums/bp-forums-bbpress-sa.php
index b6e0c8c4c92ddca04be090246e5b9e5cbc7d226c..42e3ae62ff0be9a681b2683c4dcee749480eaa88 100644
--- a/wp-content/plugins/buddypress/bp-forums/bp-forums-bbpress-sa.php
+++ b/wp-content/plugins/buddypress/bp-forums/bp-forums-bbpress-sa.php
@@ -221,9 +221,9 @@ function backpress_convert_object( &$object, $output ) {
  * Copied from wp-admin/includes/upgrade.php, this will take care of creating
  * the bbPress stand-alone tables without loading a conflicting WP Admin.
  *
- * @param unknown_type $queries
- * @param unknown_type $execute
- * @return unknown
+ * @param array $queries
+ * @param bool $execute Optional; defaults to true.
+ * @return array
  */
 function bp_bb_dbDelta($queries, $execute = true) {
 	global $wpdb;
diff --git a/wp-content/plugins/buddypress/bp-forums/bp-forums-functions.php b/wp-content/plugins/buddypress/bp-forums/bp-forums-functions.php
index 3f92e0aaf293166e857bfca5816718b7e3f1e418..cb31691cca10ed3d2bcfe9bcf2f5fa31ff6020ec 100644
--- a/wp-content/plugins/buddypress/bp-forums/bp-forums-functions.php
+++ b/wp-content/plugins/buddypress/bp-forums/bp-forums-functions.php
@@ -319,7 +319,7 @@ function bp_forums_total_topic_count() {
  *
  * @since BuddyPress (1.6)
  *
- * @param str $text The text of the comment
+ * @param string $text The text of the comment
  * @param int $topic_id The topic id
  * @param int $user_id The user id
  */
@@ -370,7 +370,7 @@ function bp_forums_reply_exists( $text = '', $topic_id = 0, $user_id = 0 ) {
  * @package BuddyPress
  *
  * @param int $user_id ID of the user being queried. Falls back on displayed user, then loggedin
- * @param str $type The current filter/sort type. 'active', 'popular', 'unreplied'
+ * @param string $type The current filter/sort type. 'active', 'popular', 'unreplied'
  * @return int $count The topic count
  */
 function bp_forums_total_topic_count_for_user( $user_id = 0, $type = 'active' ) {
@@ -456,7 +456,7 @@ function bp_forums_get_topic_extras( $topics ) {
 
 	// Get the topic ids
 	foreach ( (array) $topics as $topic ) $topic_ids[] = $topic->topic_id;
-	$topic_ids = $wpdb->escape( join( ',', (array) $topic_ids ) );
+	$topic_ids = implode( ',', wp_parse_id_list( $topic_ids ) );
 
 	// Fetch the topic's last poster details
 	$poster_details = $wpdb->get_results( "SELECT t.topic_id, t.topic_last_poster, u.user_login, u.user_nicename, u.user_email, u.display_name FROM {$wpdb->users} u, {$bbdb->topics} t WHERE u.ID = t.topic_last_poster AND t.topic_id IN ( {$topic_ids} )" );
@@ -590,7 +590,7 @@ function bp_forums_get_post_extras( $posts ) {
 
 	// Get the user ids
 	foreach ( (array) $posts as $post ) $user_ids[] = $post->poster_id;
-	$user_ids = $wpdb->escape( join( ',', (array) $user_ids ) );
+	$user_ids = implode( ',', wp_parse_id_list( $user_ids ) );
 
 	// Fetch the poster's user_email, user_nicename and user_login
 	$poster_details = $wpdb->get_results( "SELECT u.ID as user_id, u.user_login, u.user_nicename, u.user_email, u.display_name FROM {$wpdb->users} u WHERE u.ID IN ( {$user_ids} )" );
diff --git a/wp-content/plugins/buddypress/bp-forums/bp-forums-loader.php b/wp-content/plugins/buddypress/bp-forums/bp-forums-loader.php
index 0d01eaa13962bb5c53f1278211f246192bdf306c..1c55b702904f66c1aacf1637eecb428b747aa344 100644
--- a/wp-content/plugins/buddypress/bp-forums/bp-forums-loader.php
+++ b/wp-content/plugins/buddypress/bp-forums/bp-forums-loader.php
@@ -35,7 +35,7 @@ class BP_Forums_Component extends BP_Component {
 	 *
 	 * @since BuddyPress (1.5)
 	 */
-	function setup_globals() {
+	public function setup_globals( $args = array() ) {
 		$bp = buddypress();
 
 		// Define the parent forum ID
@@ -66,7 +66,7 @@ class BP_Forums_Component extends BP_Component {
 	/**
 	 * Include files
 	 */
-	function includes() {
+	public function includes( $includes = array() ) {
 
 		// Files to include
 		$includes = array(
@@ -82,13 +82,19 @@ class BP_Forums_Component extends BP_Component {
 		if ( !defined( 'BB_PATH' ) )
 			$includes[] = 'bbpress-sa';
 
+		// Admin-specific code
+		if ( is_admin() ) {
+			$includes[] = 'deprecated/1.6';
+			$includes[] = 'deprecated/1.7';
+		}
+
 		parent::includes( $includes );
 	}
 
 	/**
 	 * Setup BuddyBar navigation
 	 */
-	function setup_nav() {
+	public function setup_nav( $main_nav = array(), $sub_nav = array() ) {
 
 		// Stop if forums haven't been set up yet
 		if ( !bp_forums_is_installed_correctly() )
@@ -148,7 +154,7 @@ class BP_Forums_Component extends BP_Component {
 	/**
 	 * Set up the Toolbar
 	 */
-	function setup_admin_bar() {
+	public function setup_admin_bar( $wp_admin_nav = array() ) {
 
 		// Prevent debug notices
 		$wp_admin_nav = array();
diff --git a/wp-content/plugins/buddypress/bp-forums/bp-forums-template.php b/wp-content/plugins/buddypress/bp-forums/bp-forums-template.php
index 88923bc1bc8df5eb3fcafd4babedf3c5bcc4443f..3d9efdc67895a7a192db1057add941164b63e970 100644
--- a/wp-content/plugins/buddypress/bp-forums/bp-forums-template.php
+++ b/wp-content/plugins/buddypress/bp-forums/bp-forums-template.php
@@ -893,7 +893,7 @@ function bp_forum_topic_new_reply_link() {
 	 * @since BuddyPress (1.5)
 	 *
 	 * @uses apply_filters() Filter bp_get_forum_topic_new_reply_link to modify
-	 * @return str The URL for the New Reply link
+	 * @return string The URL for the New Reply link
 	 */
 	function bp_get_forum_topic_new_reply_link() {
 		global $topic_template;
@@ -1395,7 +1395,7 @@ function bp_forum_topic_tag_list() {
 	 * @package BuddyPress
 	 * @since BuddyPress (1.5)
 	 *
-	 * @param str $format 'string' returns comma-separated string; otherwise returns array
+	 * @param string $format 'string' returns comma-separated string; otherwise returns array
 	 * @return mixed $tags
 	 */
 	function bp_get_forum_topic_tag_list( $format = 'string' ) {
diff --git a/wp-content/plugins/buddypress/bp-forums/deprecated/1.6.php b/wp-content/plugins/buddypress/bp-forums/deprecated/1.6.php
index a8a808399f938a045eac2ee6c78f7f0a42e5a1c1..78379cc869bcb764fafecd09b728cf4a082fa609 100644
--- a/wp-content/plugins/buddypress/bp-forums/deprecated/1.6.php
+++ b/wp-content/plugins/buddypress/bp-forums/deprecated/1.6.php
@@ -14,8 +14,26 @@
 // Exit if accessed directly
 if ( !defined( 'ABSPATH' ) ) exit;
 
+/**
+ * Outputs the markup for the bb-forums-admin panel
+ */
 function bp_forums_bbpress_admin() {
 
+	// The text and URL of the Site Wide Forums button differs depending on whether bbPress
+	// is running
+	if ( is_plugin_active( 'bbpress/bbpress.php' ) ) {
+		// The bbPress admin page will always be on the root blog. switch_to_blog() will
+		// pass through if we're already there.
+		switch_to_blog( bp_get_root_blog_id() );
+		$button_url = admin_url( add_query_arg( array( 'page' => 'bbpress' ), 'options-general.php' ) );
+		restore_current_blog();
+
+		$button_text = __( 'Configure bbPress', 'buddypress' );
+	} else {
+		$button_url = bp_get_admin_url( add_query_arg( array( 'tab' => 'plugin-information', 'plugin' => 'bbpress', 'TB_iframe' => 'true', 'width' => '640', 'height' => '500' ), 'plugin-install.php' ) );
+		$button_text = __( 'Install bbPress', 'buddypress' );
+	}
+
 	$action = bp_get_admin_url( 'admin.php?page=bb-forums-setup&reinstall=1' ); ?>
 
 	<div class="wrap">
@@ -37,15 +55,21 @@ function bp_forums_bbpress_admin() {
 
 			// Delete the bb-config.php location option
 			bp_delete_option( 'bb-config-location' );
+
+			// Now delete the bb-config.php file
+			@unlink( ABSPATH . 'bb-config.php' );
+
+			// show the updated wizard
 			bp_forums_bbpress_install_wizard();
 
 		else : ?>
 
-			<div>
-				<h3><?php _e( 'Forums for Groups', 'buddypress' ) ?></h3>
+			<div style="width: 45%; float: left; margin-top: 20px;">
+				<h3><?php _e( '(Installed)', 'buddypress' ); ?> <?php _e( 'Forums for Groups', 'buddypress' ) ?></h3>
 
 				<p><?php _e( 'Give each individual group its own discussion forum. Choose this if you\'d like to keep your members\' conversations separated into distinct areas.' , 'buddypress' ); ?></p>
-				<p class="description"><?php _e( 'You may use an existing bbPress installation if you have one.', 'buddypress' ); ?></p>
+
+				<p><?php _e( 'Note: This component is retired and will not be receiving any updates in the future.  Only use this component if your current site relies on it.' , 'buddypress' ); ?></p>
 
 				<h4 style="margin-bottom: 10px;"><?php _e( 'Features', 'buddypress' ); ?></h4>
 				<ul class="description" style="list-style: square; margin-left: 30px;">
@@ -56,7 +80,30 @@ function bp_forums_bbpress_admin() {
 				</ul>
 
 				<div>
-					<a class="button button-primary" href="<?php echo $action ?>"><?php _e( 'Reinstall Group Forums', 'buddypress' ) ?></a> &nbsp;
+					<a class="button button-primary confirm" href="<?php echo $action ?>"><?php _e( 'Uninstall Group Forums', 'buddypress' ) ?></a> &nbsp;
+				</div>
+			</div>
+
+			<div style="width: 45%; float: left; margin: 20px 0 20px 20px; padding: 0 20px 20px 20px; border: 1px solid #ddd; background-color: #fff;">
+				<h3><?php _e( 'New! bbPress', 'buddypress' ) ?></h3>
+				<p><?php _e( 'bbPress is a brand-new forum plugin from one of the lead developers of BuddyPress.', 'buddypress' ) ?></p>
+
+				<p><?php _e( 'It boasts a bunch of cool features that the BP Legacy Discussion Forums does not have including:', 'buddypress' ) ?></p>
+
+				<ul class="description" style="list-style: square; margin-left: 30px;">
+					<li><?php _e( 'Non-group specific forum creation', 'buddypress' ); ?></p></li>
+					<li><?php _e( 'Moderation via the WP admin dashboard', 'buddypress' ); ?></p></li>
+					<li><?php _e( 'Topic splitting', 'buddypress' ); ?></p></li>
+					<li><?php _e( 'Revisions', 'buddypress' ); ?></p></li>
+					<li><?php _e( 'Spam management', 'buddypress' ); ?></p></li>
+					<li><?php _e( 'Subscriptions', 'buddypress' ); ?></p></li>
+					<li><?php _e( 'And more!', 'buddypress' ); ?></p></li>
+				</ul>
+
+				<p><?php printf( __( 'If you decide to use bbPress, you will need to deactivate the legacy group forum component.  For more info, <a href="%s">read this codex article</a>.', 'buddypress' ), 'http://codex.buddypress.org/user/setting-up-a-new-installation/installing-group-and-sitewide-forums/using-bbpress-2-2-with-buddypress/' ) ?></p>
+
+				<div>
+					<a class="button thickbox button-primary" href="<?php echo esc_attr( $button_url ) ?>"><?php echo esc_html( $button_text ) ?></a> &nbsp;
 				</div>
 			</div>
 
@@ -67,10 +114,28 @@ function bp_forums_bbpress_admin() {
 }
 
 function bp_forums_bbpress_install_wizard() {
-	$post_url = bp_get_admin_url( 'admin.php?page=bb-forums-setup' );
+	$post_url                 = bp_get_admin_url( 'admin.php?page=bb-forums-setup' );
+	$bbpress_plugin_is_active = false;
 
 	$step = isset( $_REQUEST['step'] ) ? $_REQUEST['step'] : '';
 
+	// The text and URL of the Site Wide Forums button differs depending on whether bbPress
+	// is running
+	if ( is_plugin_active( 'bbpress/bbpress.php' ) ) {
+		$bbpress_plugin_is_active = true;
+
+		// The bbPress admin page will always be on the root blog. switch_to_blog() will
+		// pass through if we're already there.
+		switch_to_blog( bp_get_root_blog_id() );
+		$button_url = admin_url( add_query_arg( array( 'page' => 'bbpress' ), 'options-general.php' ) );
+		restore_current_blog();
+
+		$button_text = __( 'Configure bbPress', 'buddypress' );
+	} else {
+		$button_url = bp_get_admin_url( add_query_arg( array( 'tab' => 'plugin-information', 'plugin' => 'bbpress', 'TB_iframe' => 'true', 'width' => '640', 'height' => '500' ), 'plugin-install.php' ) );
+		$button_text = __( 'Install bbPress', 'buddypress' );
+	}
+
 	switch( $step ) {
 		case 'existing':
 			if ( isset( $_REQUEST['doinstall'] ) && ( 1 == (int) $_REQUEST['doinstall'] ) ) {
@@ -98,7 +163,7 @@ function bp_forums_bbpress_install_wizard() {
 		break;
 
 		case 'new':
-			if ( isset( $_REQUEST['doinstall'] ) && 1 == (int) $_REQUEST['doinstall'] ) {
+			if ( isset( $_REQUEST['doinstall'] ) && 1 == (int)$_REQUEST['doinstall'] ) {
 				$result = bp_forums_bbpress_install();
 
 				switch ( $result ) {
@@ -141,11 +206,12 @@ function bp_forums_bbpress_install_wizard() {
 				wp_admin_css( 'plugin-install' );
 			?>
 
-				<div>
+				<div style="width: 45%; float: left;  margin-top: 20px;">
 					<h3><?php _e( 'Forums for Groups', 'buddypress' ) ?></h3>
 
 					<p><?php _e( 'Give each individual group its own discussion forum. Choose this if you\'d like to keep your members\' conversations separated into distinct areas.' , 'buddypress' ); ?></p>
-					<p class="description"><?php _e( 'You may use an existing bbPress installation if you have one.', 'buddypress' ); ?></p>
+
+					<p><?php _e( 'Note: This component is retired and will not be receiving any updates in the future.  Only use this component if your current site relies on it.' , 'buddypress' ); ?></p>
 
 					<h4 style="margin-bottom: 10px;"><?php _e( 'Features', 'buddypress' ); ?></h4>
 					<ul class="description" style="list-style: square; margin-left: 30px;">
@@ -161,6 +227,28 @@ function bp_forums_bbpress_install_wizard() {
 					</div>
 				</div>
 
+				<div style="width: 45%; float: left; margin: 20px 0 20px 20px; padding: 0 20px 20px 20px; border: 1px solid #ddd; background-color: #fff;">
+					<h3><?php _e( 'New! bbPress', 'buddypress' ) ?></h3>
+					<p><?php _e( 'bbPress is a brand-new forum plugin from one of the lead developers of BuddyPress.', 'buddypress' ) ?></p>
+
+					<p><?php _e( 'It boasts a bunch of cool features that the BP Legacy Discussion Forums does not have including:', 'buddypress' ) ?></p>
+
+					<ul class="description" style="list-style: square; margin-left: 30px;">
+						<li><?php _e( 'Non-group specific forum creation', 'buddypress' ); ?></p></li>
+						<li><?php _e( 'Moderation via the WP admin dashboard', 'buddypress' ); ?></p></li>
+						<li><?php _e( 'Topic splitting', 'buddypress' ); ?></p></li>
+						<li><?php _e( 'Revisions', 'buddypress' ); ?></p></li>
+						<li><?php _e( 'Spam management', 'buddypress' ); ?></p></li>
+						<li><?php _e( 'Subscriptions', 'buddypress' ); ?></p></li>
+						<li><?php _e( 'And more!', 'buddypress' ); ?></p></li>
+					</ul>
+
+					<p><?php printf( __( 'If you decide to use bbPress, you will need to deactivate the legacy group forum component.  For more info, <a href="%s">read this codex article</a>.', 'buddypress' ), 'http://codex.buddypress.org/user/setting-up-a-new-installation/installing-group-and-sitewide-forums/using-bbpress-2-2-with-buddypress/' ) ?></p>
+					<div>
+						<a class="button button-primary <?php if ( ! $bbpress_plugin_is_active ) { echo esc_attr( 'thickbox' ); }?>" href="<?php echo esc_attr( $button_url ) ?>"><?php echo esc_html( $button_text ) ?></a> &nbsp;
+					</div>
+				</div>
+
 			<?php }
 		break;
 	}
diff --git a/wp-content/plugins/buddypress/bp-forums/deprecated/1.7.php b/wp-content/plugins/buddypress/bp-forums/deprecated/1.7.php
index 52cdcbb38649f3e365fa3465795a9a99cd87e0cb..8117f63e47e43303423cca44604a6f2540f38f03 100644
--- a/wp-content/plugins/buddypress/bp-forums/deprecated/1.7.php
+++ b/wp-content/plugins/buddypress/bp-forums/deprecated/1.7.php
@@ -29,235 +29,6 @@ function bp_forums_add_admin_menu() {
 }
 add_action( bp_core_admin_hook(), 'bp_forums_add_admin_menu' );
 
-/**
- * Outputs the markup for the bb-forums-admin panel
- */
-function bp_forums_bbpress_admin() {
-
-	// The text and URL of the Site Wide Forums button differs depending on whether bbPress
-	// is running
-	if ( is_plugin_active( 'bbpress/bbpress.php' ) ) {
-		// The bbPress admin page will always be on the root blog. switch_to_blog() will
-		// pass through if we're already there.
-		switch_to_blog( bp_get_root_blog_id() );
-		$button_url = admin_url( add_query_arg( array( 'page' => 'bbpress' ), 'options-general.php' ) );
-		restore_current_blog();
-
-		$button_text = __( 'Configure Site Wide Forums', 'buddypress' );
-	} else {
-		$button_url = bp_get_admin_url( add_query_arg( array( 'tab' => 'plugin-information', 'plugin' => 'bbpress', 'TB_iframe' => 'true', 'width' => '640', 'height' => '500' ), 'plugin-install.php' ) );
-		$button_text = __( 'Install Site Wide Forums', 'buddypress' );
-	}
-
-	$action = bp_get_admin_url( 'admin.php?page=bb-forums-setup&reinstall=1' ); ?>
-
-	<div class="wrap">
-		<?php screen_icon( 'buddypress' ); ?>
-
-		<h2 class="nav-tab-wrapper"><?php bp_core_admin_tabs( __( 'Forums', 'buddypress' ) ); ?></h2>
-
-		<?php if ( isset( $_POST['submit'] ) ) : ?>
-
-			<div id="message" class="updated fade">
-				<p><?php _e( 'Settings Saved.', 'buddypress' ) ?></p>
-			</div>
-
-		<?php endif; ?>
-
-		<?php
-
-		if ( isset( $_REQUEST['reinstall'] ) || !bp_forums_is_installed_correctly() ) :
-
-			// Delete the bb-config.php location option
-			bp_delete_option( 'bb-config-location' );
-
-			// Now delete the bb-config.php file
-			@unlink( ABSPATH . 'bb-config.php' );
-
-			// show the updated wizard
-			bp_forums_bbpress_install_wizard();
-
-		else : ?>
-
-			<div style="width: 45%; float: left; margin-top: 20px;">
-				<h3><?php _e( '(Installed)', 'buddypress' ); ?> <?php _e( 'Forums for Groups', 'buddypress' ) ?></h3>
-
-				<p><?php _e( 'Give each individual group its own discussion forum. Choose this if you\'d like to keep your members\' conversations separated into distinct areas.' , 'buddypress' ); ?></p>
-				<p class="description"><?php _e( 'You may use an existing bbPress installation if you have one.', 'buddypress' ); ?></p>
-
-				<h4 style="margin-bottom: 10px;"><?php _e( 'Features', 'buddypress' ); ?></h4>
-				<ul class="description" style="list-style: square; margin-left: 30px;">
-					<li><?php _e( 'Group Integration',           'buddypress' ); ?></p></li>
-					<li><?php _e( 'Member Profile Integration',  'buddypress' ); ?></p></li>
-					<li><?php _e( 'Activity Stream Integration', 'buddypress' ); ?></p></li>
-					<li><?php _e( '@ Mention Integration',       'buddypress' ); ?></p></li>
-				</ul>
-
-				<div>
-					<a class="button button-primary confirm" href="<?php echo $action ?>"><?php _e( 'Uninstall Group Forums', 'buddypress' ) ?></a> &nbsp;
-				</div>
-			</div>
-
-			<div style="width: 45%; float: left; margin: 20px 0 20px 20px; padding: 0 20px 20px 20px; border: 1px solid #ddd; background-color: #fff;">
-				<h3><?php _e( 'New! Site Wide Forums', 'buddypress' ) ?></h3>
-				<p><?php _e( 'Your site will have central forums that are not isolated to any specific group. Choose this if you\'d like to have a central forum area for your members.', 'buddypress' ) ?></p>
-				<p class="description"><?php _e( 'You may activate both Group and Site Wide forums, but this may create a poor experience for your members.', 'buddypress' ) ?></p>
-
-				<h4 style="margin-bottom: 10px;"><?php _e( 'Features', 'buddypress' ); ?></h4>
-				<ul class="description" style="list-style: square; margin-left: 30px;">
-					<li><?php _e( 'Central Discussion Area',     'buddypress' ); ?></p></li>
-					<li><?php _e( 'Forum Plugins Available',     'buddypress' ); ?></p></li>
-					<li><?php _e( 'Activity Stream Integration', 'buddypress' ); ?></p></li>
-					<li><?php _e( '@ Mention Integration',       'buddypress' ); ?></p></li>
-				</ul>
-
-				<div>
-					<a class="button thickbox button-primary" href="<?php echo esc_attr( $button_url ) ?>"><?php echo esc_html( $button_text ) ?></a> &nbsp;
-				</div>
-			</div>
-
-		<?php endif; ?>
-
-		<p class="clear description"><?php printf( __( 'Need help deciding between Group Forums and Site Wide Forums? Visit <a href="%s">the BuddyPress codex</a> for more information.', 'buddypress' ), 'http://codex.buddypress.org/getting-started/installing-group-and-sitewide-forums/' ) ?></p>
-	</div>
-<?php
-}
-
-function bp_forums_bbpress_install_wizard() {
-	$post_url                 = bp_get_admin_url( 'admin.php?page=bb-forums-setup' );
-	$bbpress_plugin_is_active = false;
-
-	$step = isset( $_REQUEST['step'] ) ? $_REQUEST['step'] : '';
-
-	// The text and URL of the Site Wide Forums button differs depending on whether bbPress
-	// is running
-	if ( is_plugin_active( 'bbpress/bbpress.php' ) ) {
-		$bbpress_plugin_is_active = true;
-
-		// The bbPress admin page will always be on the root blog. switch_to_blog() will
-		// pass through if we're already there.
-		switch_to_blog( bp_get_root_blog_id() );
-		$button_url = admin_url( add_query_arg( array( 'page' => 'bbpress' ), 'options-general.php' ) );
-		restore_current_blog();
-
-		$button_text = __( 'Configure Site Wide Forums', 'buddypress' );
-	} else {
-		$button_url = bp_get_admin_url( add_query_arg( array( 'tab' => 'plugin-information', 'plugin' => 'bbpress', 'TB_iframe' => 'true', 'width' => '640', 'height' => '500' ), 'plugin-install.php' ) );
-		$button_text = __( 'Install Site Wide Forums', 'buddypress' );
-	}
-
-	switch( $step ) {
-		case 'existing':
-			if ( isset( $_REQUEST['doinstall'] ) && ( 1 == (int) $_REQUEST['doinstall'] ) ) {
-				if ( !bp_forums_configure_existing_install() ) {
-					_e( 'The bb-config.php file was not found at that location, please try again.', 'buddypress' );
-				} else {
-					?>
-					<h3><?php _e( 'Forums were set up correctly using your existing bbPress install!', 'buddypress' ) ?></h3>
-					<p><?php _e( 'BuddyPress will now use its internal copy of bbPress to run the forums on your site. If you wish, you can remove your old bbPress installation files, as long as you keep the bb-config.php file in the same location.', 'buddypress' ) ?></p><?php
-				}
-			} else { ?>
-
-					<form action="" method="post">
-						<h3><?php _e( 'Existing bbPress Installation', 'buddypress' ) ?></h3>
-						<p><?php _e( "BuddyPress can make use of your existing bbPress install. Just provide the location of your <code>bb-config.php</code> file, and BuddyPress will do the rest.", 'buddypress' ) ?></p>
-						<p><label><code>bb-config.php</code> file location:</label><br /><input style="width: 50%" type="text" name="bbconfigloc" id="bbconfigloc" value="<?php echo str_replace( 'buddypress', '', $_SERVER['DOCUMENT_ROOT'] ) ?>" /></p>
-						<p><input type="submit" class="button-primary" value="<?php _e( 'Complete Installation', 'buddypress' ) ?>" /></p>
-						<input type="hidden" name="step" value="existing" />
-						<input type="hidden" name="doinstall" value="1" />
-						<?php wp_nonce_field( 'bp_forums_existing_install_init' ) ?>
-					</form>
-
-				<?php
-			}
-		break;
-
-		case 'new':
-			if ( isset( $_REQUEST['doinstall'] ) && 1 == (int)$_REQUEST['doinstall'] ) {
-				$result = bp_forums_bbpress_install();
-
-				switch ( $result ) {
-					case 1:
-						_e( '<p>All done! Configuration settings have been saved to the file <code>bb-config.php</code> in the root of your WordPress install.</p>', 'buddypress' );
-						break;
-					default:
-						// Just write the contents to screen
-						_e( '<p>A configuration file could not be created. No problem, but you will need to save the text shown below into a file named <code>bb-config.php</code> in the root directory of your WordPress installation before you can start using the forum functionality.</p>', 'buddypress' ); ?>
-
-						<textarea style="display:block; margin-top: 30px; width: 80%;" rows="50"><?php echo htmlspecialchars( $result ); ?></textarea>
-
-					<?php
-						break;
-				}
-			} else { ?>
-
-				<h3><?php _e( 'New bbPress Installation', 'buddypress' ) ?></h3>
-				<p><?php _e( "You've decided to set up a new installation of bbPress for forum management in BuddyPress. This is very simple and is usually just a one click
-				process. When you're ready, hit the link below.", 'buddypress' ) ?></p>
-				<p><a class="button-primary" href="<?php echo wp_nonce_url( $post_url . '&step=new&doinstall=1', 'bp_forums_new_install_init' ) ?>"><?php _e( 'Complete Installation', 'buddypress' ) ?></a></p>
-
-				<?php
-			}
-		break;
-
-		default:
-			if ( !file_exists( BP_PLUGIN_DIR . '/bp-forums/bbpress/' ) ) { ?>
-
-				<div id="message" class="error">
-					<p><?php printf( __( 'bbPress files were not found. To install the forums component you must download a copy of bbPress and make sure it is in the folder: "%s"', 'buddypress' ), 'wp-content/plugins/buddypress/bp-forums/bbpress/' ) ?></p>
-				</div>
-
-			<?php } else {
-
-				// Include the plugin install
-
-				add_thickbox();
-				wp_enqueue_script( 'plugin-install' );
-				wp_admin_css( 'plugin-install' );
-			?>
-
-				<div style="width: 45%; float: left;  margin-top: 20px;">
-					<h3><?php _e( 'Forums for Groups', 'buddypress' ) ?></h3>
-
-					<p><?php _e( 'Give each individual group its own discussion forum. Choose this if you\'d like to keep your members\' conversations separated into distinct areas.' , 'buddypress' ); ?></p>
-					<p class="description"><?php _e( 'You may use an existing bbPress installation if you have one.', 'buddypress' ); ?></p>
-
-					<h4 style="margin-bottom: 10px;"><?php _e( 'Features', 'buddypress' ); ?></h4>
-					<ul class="description" style="list-style: square; margin-left: 30px;">
-						<li><?php _e( 'Group Integration',           'buddypress' ); ?></p></li>
-						<li><?php _e( 'Member Profile Integration',  'buddypress' ); ?></p></li>
-						<li><?php _e( 'Activity Stream Integration', 'buddypress' ); ?></p></li>
-						<li><?php _e( '@ Mention Integration',       'buddypress' ); ?></p></li>
-					</ul>
-
-					<div>
-						<a class="button button-primary" href="<?php echo $post_url . '&step=new' ?>"><?php _e( 'Install Group Forums', 'buddypress' ) ?></a> &nbsp;
-						<a class="button" href="<?php echo $post_url . '&step=existing' ?>"><?php _e( 'Use Existing Installation', 'buddypress' ) ?></a>
-					</div>
-				</div>
-
-				<div style="width: 45%; float: left; margin: 20px 0 20px 20px; padding: 0 20px 20px 20px; border: 1px solid #ddd; background-color: #fff;">
-					<h3><?php _e( 'New! Site Wide Forums', 'buddypress' ) ?></h3>
-					<p><?php _e( 'Your site will have central forums that are not isolated to any specific group. Choose this if you\'d like to have a central forum area for your members.', 'buddypress' ) ?></p>
-					<p class="description"><?php _e( 'You may activate both Group and Site Wide forums, but this may create a poor experience for your members.', 'buddypress' ) ?></p>
-
-					<h4 style="margin-bottom: 10px;"><?php _e( 'Features', 'buddypress' ); ?></h4>
-					<ul class="description" style="list-style: square; margin-left: 30px;">
-						<li><?php _e( 'Central Discussion Area',     'buddypress' ); ?></p></li>
-						<li><?php _e( 'Forum Plugins Available',     'buddypress' ); ?></p></li>
-						<li><?php _e( 'Activity Stream Integration', 'buddypress' ); ?></p></li>
-						<li><?php _e( '@ Mention Integration',       'buddypress' ); ?></p></li>
-					</ul>
-					<div>
-						<a class="button button-primary <?php if ( ! $bbpress_plugin_is_active ) { echo esc_attr( 'thickbox' ); }?>" href="<?php echo esc_attr( $button_url ) ?>"><?php echo esc_html( $button_text ) ?></a> &nbsp;
-					</div>
-				</div>
-
-			<?php }
-		break;
-	}
-}
-
 function bp_forums_configure_existing_install() {
 	global $wpdb, $bbdb;
 
diff --git a/wp-content/plugins/buddypress/bp-friends/bp-friends-activity.php b/wp-content/plugins/buddypress/bp-friends/bp-friends-activity.php
index 7d75a1f1b40cbdd645d89d7424d424db6479c316..d3a5345e4ba981193256048da5140e02cdb8d84d 100644
--- a/wp-content/plugins/buddypress/bp-friends/bp-friends-activity.php
+++ b/wp-content/plugins/buddypress/bp-friends/bp-friends-activity.php
@@ -69,11 +69,11 @@ add_action( 'bp_register_activity_actions', 'friends_register_activity_actions'
  *
  * @package BuddyPress
  *
- * @param str $action The kind of notification being rendered
+ * @param string $action The kind of notification being rendered
  * @param int $item_id The primary item id
  * @param int $secondary_item_id The secondary item id
  * @param int $total_items The total number of messaging-related notifications waiting for the user
- * @param str $format 'string' for BuddyBar-compatible notifications; 'array' for WP Toolbar
+ * @param string $format 'string' for BuddyBar-compatible notifications; 'array' for WP Toolbar
  */
 function friends_format_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) {
 
diff --git a/wp-content/plugins/buddypress/bp-friends/bp-friends-functions.php b/wp-content/plugins/buddypress/bp-friends/bp-friends-functions.php
index b03925949a541afd8b019e1ad2b73125e24ff83c..eb84bdd02679fc973d86dfe267762f290423243c 100644
--- a/wp-content/plugins/buddypress/bp-friends/bp-friends-functions.php
+++ b/wp-content/plugins/buddypress/bp-friends/bp-friends-functions.php
@@ -65,11 +65,15 @@ function friends_remove_friend( $initiator_userid, $friend_userid ) {
 	// Remove the activity stream item for the user who canceled the friendship
 	friends_delete_activity( array( 'item_id' => $friendship_id, 'type' => 'friendship_accepted', 'user_id' => bp_displayed_user_id() ) );
 
+	// This hook is misleadingly named - the friendship is not yet deleted.
+	// This is your last chance to do something while the friendship exists
 	do_action( 'friends_friendship_deleted', $friendship_id, $initiator_userid, $friend_userid );
 
 	if ( $friendship->delete() ) {
 		friends_update_friend_totals( $initiator_userid, $friend_userid, 'remove' );
 
+		do_action( 'friends_friendship_post_delete', $initiator_userid, $friend_userid );
+
 		return true;
 	}
 
diff --git a/wp-content/plugins/buddypress/bp-friends/bp-friends-loader.php b/wp-content/plugins/buddypress/bp-friends/bp-friends-loader.php
index 566eb37bcb9fe234755a1d048dfea6d6d6b599ec..3ff1e0b4cecf9238ad3efb612a5eba05e4857e8f 100644
--- a/wp-content/plugins/buddypress/bp-friends/bp-friends-loader.php
+++ b/wp-content/plugins/buddypress/bp-friends/bp-friends-loader.php
@@ -29,7 +29,7 @@ class BP_Friends_Component extends BP_Component {
 	/**
 	 * Include files
 	 */
-	function includes() {
+	public function includes( $includes = array() ) {
 		// Files to include
 		$includes = array(
 			'actions',
@@ -54,7 +54,7 @@ class BP_Friends_Component extends BP_Component {
 	 * @since BuddyPress (1.5)
 	 * @global BuddyPress $bp The one true BuddyPress instance
 	 */
-	function setup_globals() {
+	public function setup_globals( $args = array() ) {
 		global $bp;
 
 		define ( 'BP_FRIENDS_DB_VERSION', '1800' );
@@ -87,7 +87,7 @@ class BP_Friends_Component extends BP_Component {
 	 *
 	 * @global BuddyPress $bp The one true BuddyPress instance
 	 */
-	function setup_nav() {
+	public function setup_nav( $main_nav = array(), $sub_nav = array() ) {
 		global $bp;
 
 		$sub_nav = array();
@@ -142,7 +142,7 @@ class BP_Friends_Component extends BP_Component {
 	 *
 	 * @global BuddyPress $bp The one true BuddyPress instance
 	 */
-	function setup_admin_bar() {
+	public function setup_admin_bar( $wp_admin_nav = array() ) {
 		global $bp;
 
 		// Prevent debug notices
diff --git a/wp-content/plugins/buddypress/bp-friends/bp-friends-template.php b/wp-content/plugins/buddypress/bp-friends/bp-friends-template.php
index 8106e6d357392660d3432e0c9dd02f5c92b6b013..921c12160185900d21a03617b76dd9e4681cb67c 100644
--- a/wp-content/plugins/buddypress/bp-friends/bp-friends-template.php
+++ b/wp-content/plugins/buddypress/bp-friends/bp-friends-template.php
@@ -212,7 +212,7 @@ function bp_member_total_friend_count() {
  * Outputs the ID of the potential friend
  *
  * @uses bp_get_potential_friend_id()
- * @param <type> $user_id
+ * @param int $user_id Optional
  */
 function bp_potential_friend_id( $user_id = 0 ) {
 	echo bp_get_potential_friend_id( $user_id );
diff --git a/wp-content/plugins/buddypress/bp-groups/admin/css/admin.css b/wp-content/plugins/buddypress/bp-groups/admin/css/admin.css
index 253eee306f85464f1b36c9ac94288379c4267b2b..5a122ccd346acaefff6f2a273b9c75c02c5d3fa2 100644
--- a/wp-content/plugins/buddypress/bp-groups/admin/css/admin.css
+++ b/wp-content/plugins/buddypress/bp-groups/admin/css/admin.css
@@ -1,3 +1,12 @@
+body.toplevel_page_bp-groups table.groups th#status,
+body.toplevel_page_bp-groups table.groups th#members {
+	width: 10%;
+}
+
+body.toplevel_page_bp-groups table.groups th#last_active {
+	width: 15%;
+}
+
 #bp-groups-edit-form input {
 	outline: medium none;
 	padding: 3px 8px;
@@ -14,7 +23,35 @@
 .bp-groups-settings-section {
 	margin-bottom: 15px;
 }
+.bp-groups-member-type {
+	position: relative;
+	padding-bottom: 1.7em;
+}
+.bp-groups-member-type > h4 {
+	margin-bottom: .5em;
+}
 ul.bp-group-delete-list {
 	list-style-type: disc;
 	margin: 4px 26px;
 }
+.bp-group-admin-pagination {
+	position: absolute;
+	text-align: right;
+	width: 100%;
+}
+.bp-group-admin-pagination.table-top {
+	top: 0;
+}
+.bp-group-admin-pagination.table-bottom {
+	bottom: 0;
+}
+.bp-group-admin-pagination-viewing {
+	font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
+	color: #777;
+	font-size: 12px;
+	font-style: italic;
+}
+.bp-group-admin-pagination-links {
+	white-space: nowrap;
+	padding-left: 15px;
+}
diff --git a/wp-content/plugins/buddypress/bp-groups/admin/css/admin.min.css b/wp-content/plugins/buddypress/bp-groups/admin/css/admin.min.css
index 8c91e580cc26516066eafcd31845519f0f740d8b..7983663f392124e63864add65ce35b93ddb14a58 100644
--- a/wp-content/plugins/buddypress/bp-groups/admin/css/admin.min.css
+++ b/wp-content/plugins/buddypress/bp-groups/admin/css/admin.min.css
@@ -1 +1 @@
-#bp-groups-edit-form input{outline:medium none;padding:3px 8px}#bp-groups-edit-form input#bp-groups-name{font-size:1.7em;width:100%}#bp-groups-edit-form input#bp-groups-new-members{width:100%;max-width:90%;border:0}.bp-groups-settings-section{margin-bottom:15px}ul.bp-group-delete-list{list-style-type:disc;margin:4px 26px}
\ No newline at end of file
+body.toplevel_page_bp-groups table.groups th#status,body.toplevel_page_bp-groups table.groups th#members{width:10%}body.toplevel_page_bp-groups table.groups th#last_active{width:15%}#bp-groups-edit-form input{outline:medium none;padding:3px 8px}#bp-groups-edit-form input#bp-groups-name{font-size:1.7em;width:100%}#bp-groups-edit-form input#bp-groups-new-members{width:100%;max-width:90%;border:0}.bp-groups-settings-section{margin-bottom:15px}.bp-groups-member-type{position:relative;padding-bottom:1.7em}.bp-groups-member-type>h4{margin-bottom:.5em}ul.bp-group-delete-list{list-style-type:disc;margin:4px 26px}.bp-group-admin-pagination{position:absolute;text-align:right;width:100%}.bp-group-admin-pagination.table-top{top:0}.bp-group-admin-pagination.table-bottom{bottom:0}.bp-group-admin-pagination-viewing{font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;color:#777;font-size:12px;font-style:italic}.bp-group-admin-pagination-links{white-space:nowrap;padding-left:15px}
\ No newline at end of file
diff --git a/wp-content/plugins/buddypress/bp-groups/admin/js/admin.js b/wp-content/plugins/buddypress/bp-groups/admin/js/admin.js
index 58575d2d22462a84fae594a46055b446d161f525..bceacdef639f09916fa89e6653b7f7c69e855953 100644
--- a/wp-content/plugins/buddypress/bp-groups/admin/js/admin.js
+++ b/wp-content/plugins/buddypress/bp-groups/admin/js/admin.js
@@ -11,8 +11,10 @@
 		$(e.target).closest('li').remove();
 	}
 
-	var id = 'undefined' !== typeof group_members ? '&group_members=' + group_members : '';
+	var id = 'undefined' !== typeof group_id ? '&group_id=' + group_id : '';
 	$(document).ready( function() {
+		window.warn_on_leave = false;
+
 		/* Initialize autocomplete */
 		$( '.bp-suggest-user' ).autocomplete({
 			source:    ajaxurl + '?action=bp_group_admin_member_autocomplete' + id,
@@ -27,5 +29,19 @@
 		/* Replace noscript placeholder */
 		$( '#bp-groups-new-members' ).attr( 'placeholder', BP_Group_Admin.add_member_placeholder );
 
+		/* Warn before leaving unsaved changes */
+		$(document).on( 'change', 'input#bp-groups-name, input#bp-groups-description, select.bp-groups-role, #bp-groups-settings-section-status input[type="radio"]', function() {
+			window.warn_on_leave = true;
+		});
+
+		$( 'input#save' ).on( 'click', function() {
+			window.warn_on_leave = false;
+		});
+
+		window.onbeforeunload = function(e) {
+			if ( window.warn_on_leave ) {
+				return BP_Group_Admin.warn_on_leave;
+			}
+		};
 	});
 })(jQuery);
diff --git a/wp-content/plugins/buddypress/bp-groups/admin/js/admin.min.js b/wp-content/plugins/buddypress/bp-groups/admin/js/admin.min.js
index 65b5150b53a8c4b62859dd6176fd404237daa7c8..85ff297d4897c63a832e0772077c128dbd12ff8c 100644
--- a/wp-content/plugins/buddypress/bp-groups/admin/js/admin.min.js
+++ b/wp-content/plugins/buddypress/bp-groups/admin/js/admin.min.js
@@ -1 +1 @@
-(function(c){function b(h,f){var g="bp-groups-remove-new-member-"+f.item.value;c("#bp-groups-new-members-list").append('<li><a href="#" class="bp-groups-remove-new-member" id="'+g+'">x</a> '+f.item.label+"</li>");c("#"+g).bind("click",function(i){a(i);return false});c("#bp-groups-new-members-list").after('<input name="new_members[]" type="hidden" value="'+f.item.value+'" />')}function a(f){c(f.target).closest("li").remove()}var d="undefined"!==typeof group_members?"&group_members="+group_members:"";c(document).ready(function(){c(".bp-suggest-user").autocomplete({source:ajaxurl+"?action=bp_group_admin_member_autocomplete"+d,delay:500,minLength:2,position:("undefined"!==typeof isRtl&&isRtl)?{my:"right top",at:"right bottom",offset:"0, -1"}:{offset:"0, -1"},open:function(){c(this).addClass("open")},close:function(){c(this).removeClass("open");c(this).val("")},select:function(e,f){b(e,f)}});c("#bp-groups-new-members").attr("placeholder",BP_Group_Admin.add_member_placeholder)})})(jQuery);
\ No newline at end of file
+(function(c){function b(h,f){var g="bp-groups-remove-new-member-"+f.item.value;c("#bp-groups-new-members-list").append('<li><a href="#" class="bp-groups-remove-new-member" id="'+g+'">x</a> '+f.item.label+"</li>");c("#"+g).bind("click",function(i){a(i);return false});c("#bp-groups-new-members-list").after('<input name="new_members[]" type="hidden" value="'+f.item.value+'" />')}function a(f){c(f.target).closest("li").remove()}var d="undefined"!==typeof group_id?"&group_id="+group_id:"";c(document).ready(function(){window.warn_on_leave=false;c(".bp-suggest-user").autocomplete({source:ajaxurl+"?action=bp_group_admin_member_autocomplete"+d,delay:500,minLength:2,position:("undefined"!==typeof isRtl&&isRtl)?{my:"right top",at:"right bottom",offset:"0, -1"}:{offset:"0, -1"},open:function(){c(this).addClass("open")},close:function(){c(this).removeClass("open");c(this).val("")},select:function(e,f){b(e,f)}});c("#bp-groups-new-members").attr("placeholder",BP_Group_Admin.add_member_placeholder);c(document).on("change",'input#bp-groups-name, input#bp-groups-description, select.bp-groups-role, #bp-groups-settings-section-status input[type="radio"]',function(){window.warn_on_leave=true});c("input#save").on("click",function(){window.warn_on_leave=false});window.onbeforeunload=function(f){if(window.warn_on_leave){return BP_Group_Admin.warn_on_leave}}})})(jQuery);
\ No newline at end of file
diff --git a/wp-content/plugins/buddypress/bp-groups/bp-groups-actions.php b/wp-content/plugins/buddypress/bp-groups/bp-groups-actions.php
index f8193767953c0d4bc8ebbb093a500af1f3c6adf4..ed4d3add6ad8fc4b73eab49ee5f8681251571627 100644
--- a/wp-content/plugins/buddypress/bp-groups/bp-groups-actions.php
+++ b/wp-content/plugins/buddypress/bp-groups/bp-groups-actions.php
@@ -79,9 +79,6 @@ function groups_action_create_group() {
 				bp_core_add_message( __( 'There was an error saving group details, please try again.', 'buddypress' ), 'error' );
 				bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . bp_get_groups_current_create_step() . '/' );
 			}
-
-			groups_update_groupmeta( $bp->groups->new_group_id, 'total_member_count', 1 );
-			groups_update_groupmeta( $bp->groups->new_group_id, 'last_activity', bp_core_current_time() );
 		}
 
 		if ( 'group-settings' == bp_get_groups_current_create_step() ) {
@@ -307,21 +304,39 @@ function groups_action_redirect_to_random_group() {
 }
 add_action( 'bp_actions', 'groups_action_redirect_to_random_group' );
 
+/**
+ * Load the activity feed for the specific group.
+ *
+ * @since BuddyPress (v1.2)
+ */
 function groups_action_group_feed() {
-	global $bp, $wp_query;
 
-	if ( !bp_is_active( 'activity' ) || !bp_is_groups_component() || !isset( $bp->groups->current_group ) || !bp_is_current_action( 'feed' ) )
-		return false;
+	// get current group
+	$group = groups_get_current_group();
 
-	$wp_query->is_404 = false;
-	status_header( 200 );
+	if ( ! bp_is_active( 'activity' ) || ! bp_is_groups_component() || ! $group || ! bp_is_current_action( 'feed' ) )
+		return false;
 
-	if ( 'public' != $bp->groups->current_group->status ) {
-		if ( !groups_is_user_member( bp_loggedin_user_id(), $bp->groups->current_group->id ) )
-			return false;
+	// if group isn't public or if logged-in user is not a member of the group, do
+	// not output the group activity feed
+	if ( ! bp_group_is_visible( $group ) ) {
+		return false;
 	}
 
-	include_once( BP_PLUGIN_DIR . '/bp-activity/feeds/bp-activity-group-feed.php' );
-	die;
+	// setup the feed
+	buddypress()->activity->feed = new BP_Activity_Feed( array(
+		'id'            => 'group',
+
+		/* translators: Group activity RSS title - "[Site Name] | [Group Name] | Activity" */
+		'title'         => sprintf( __( '%1$s | %2$s | Activity', 'buddypress' ), bp_get_site_name(), bp_get_current_group_name() ),
+
+		'link'          => bp_get_group_permalink( $group ),
+		'description'   => sprintf( __( "Activity feed for the group, %s.", 'buddypress' ), bp_get_current_group_name() ),
+		'activity_args' => array(
+			'object'           => buddypress()->groups->id,
+			'primary_id'       => bp_get_current_group_id(),
+			'display_comments' => 'threaded'
+		)
+	) );
 }
 add_action( 'bp_actions', 'groups_action_group_feed' );
diff --git a/wp-content/plugins/buddypress/bp-groups/bp-groups-admin.php b/wp-content/plugins/buddypress/bp-groups/bp-groups-admin.php
index 68cd3d0cfde7a28c93a65021348f280a7d85a078..294e0838f4ed4c892fe6ffa0a0ee425dfc72af5e 100644
--- a/wp-content/plugins/buddypress/bp-groups/bp-groups-admin.php
+++ b/wp-content/plugins/buddypress/bp-groups/bp-groups-admin.php
@@ -166,7 +166,8 @@ function bp_groups_admin_load() {
 	wp_enqueue_style( 'bp_groups_admin_css', BP_PLUGIN_URL . "bp-groups/admin/css/admin.{$min}css", array(), bp_get_version() );
 
 	wp_localize_script( 'bp_groups_admin_js', 'BP_Group_Admin', array(
-		'add_member_placeholder' => __( 'Start typing a username to add a new member.', 'buddypress' )
+		'add_member_placeholder' => __( 'Start typing a username to add a new member.', 'buddypress' ),
+		'warn_on_leave'          => __( 'If you leave this page, you will lose any unsaved changes you have made to the group.', 'buddypress' ),
 	) );
 
 	if ( $doaction && 'save' == $doaction ) {
@@ -503,7 +504,7 @@ function bp_groups_admin_edit() {
 
 					<div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
 						<div id="post-body-content">
-							<div id="postdiv" class="postarea">
+							<div id="postdiv">
 								<div id="bp_groups_name" class="postbox">
 									<h3><?php _e( 'Name and Description', 'buddypress' ); ?></h3>
 									<div class="inside">
@@ -621,6 +622,10 @@ function bp_groups_admin_index() {
 		<h2>
 			<?php _e( 'Groups', 'buddypress' ); ?>
 
+			<?php if ( is_user_logged_in() && bp_user_can_create_groups() ) : ?>
+				<a class="add-new-h2" href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create' ); ?>"><?php _e( 'Add New', 'buddypress' ); ?></a>
+			<?php endif; ?>
+
 			<?php if ( !empty( $_REQUEST['s'] ) ) : ?>
 				<span class="subtitle"><?php printf( __( 'Search results for &#8220;%s&#8221;', 'buddypress' ), wp_html_excerpt( esc_html( stripslashes( $_REQUEST['s'] ) ), 50 ) ); ?></span>
 			<?php endif; ?>
@@ -699,6 +704,8 @@ function bp_groups_admin_edit_metabox_add_new_members( $item ) {
 /**
  * Members metabox
  *
+ * @param BP_Groups_Group $item The BP_Groups_Group object
+ *
  * @since BuddyPress (1.7)
  */
 function bp_groups_admin_edit_metabox_members( $item ) {
@@ -707,50 +714,38 @@ function bp_groups_admin_edit_metabox_members( $item ) {
 	// Pull up a list of group members, so we can separate out the types
 	// We'll also keep track of group members here to place them into a
 	// javascript variable, which will help with group member autocomplete
-	$member_ids = array();
-	$members    = array(
+	$members = array(
 		'admin'  => array(),
 		'mod'    => array(),
 		'member' => array(),
-		'banned' => array()
+		'banned' => array(),
 	);
 
-	if ( bp_group_has_members( array(
-		'group_id' => $item->id,
-		'exclude_admins_mods' => false,
-		'exclude_banned' => false
-	) ) ) {
-		// Get a list of admins and mods, to reduce lookups
-		// We'll rekey them by user_id for convenience
-		$admins = $mods = array();
-
-		foreach ( (array) groups_get_group_admins( $item->id ) as $admin_obj ) {
-			$admins[ $admin_obj->user_id ] = $admin_obj;
-		}
+	$pagination = array(
+		'admin'  => array(),
+		'mod'    => array(),
+		'member' => array(),
+		'banned' => array(),
+	);
 
-		foreach ( (array) groups_get_group_mods( $item->id ) as $admin_obj ) {
-			$mods[ $admin_obj->user_id ] = $admin_obj;
-		}
+	foreach ( $members as $type => &$member_type_users ) {
+		$page_qs_key = $type . '_page';
+		$current_type_page = isset( $_GET[ $page_qs_key ] ) ? absint( $_GET[ $page_qs_key ] ) : 1;
+		$member_type_query = new BP_Group_Member_Query( array(
+			'group_id'   => $item->id,
+			'group_role' => array( $type ),
+			'type'       => 'alphabetical',
+			'per_page'   => 10,
+			'page'       => $current_type_page,
+		) );
 
-		while ( bp_group_members() ) {
-			bp_group_the_member();
-			if ( bp_get_group_member_is_banned() ) {
-				$members['banned'][] = $members_template->member;
-			} else if ( isset( $admins[ bp_get_group_member_id() ] ) ) {
-				$members['admin'][]  = $members_template->member;
-			} else if ( isset( $mods[ bp_get_group_member_id() ] ) ) {
-				$members['mod'][]    = $members_template->member;
-			} else {
-				$members['member'][] = $members_template->member;
-			}
+		$member_type_users = $member_type_query->results;
 
-			$member_ids[] = bp_get_group_member_id();
-		}
+		$pagination[ $type ] = bp_groups_admin_create_pagination_links( $member_type_query, $type );
 	}
 
 	// Echo out the javascript variable
-	$member_ids = ! empty( $member_ids ) ? implode( ',', $member_ids ) : '';
-	echo '<script type="text/javascript">var group_members = "' . $member_ids . '";</script>';
+	echo '<script type="text/javascript">var group_id = "' . $item->id . '";</script>';
 
 	// Loop through each member type
 	foreach ( $members as $member_type => $type_users ) : ?>
@@ -766,6 +761,10 @@ function bp_groups_admin_edit_metabox_members( $item ) {
 				endswitch; ?>
 			</h4>
 
+			<div class="bp-group-admin-pagination table-top">
+				<?php echo $pagination[ $member_type ] ?>
+			</div>
+
 		<?php if ( !empty( $type_users ) ) : ?>
 
 			<table class="widefat bp-group-members">
@@ -780,22 +779,21 @@ function bp_groups_admin_edit_metabox_members( $item ) {
 				<tbody>
 
 				<?php foreach ( $type_users as $type_user ) : ?>
-
 					<tr>
-						<th scope="row" class="uid-column"><?php echo esc_html( $type_user->user_id ); ?></th>
+						<th scope="row" class="uid-column"><?php echo esc_html( $type_user->ID ); ?></th>
 
 						<td class="uname-column">
-							<a style="float: left;" href="<?php echo bp_core_get_user_domain( $type_user->user_id ); ?>"><?php echo bp_core_fetch_avatar( array(
-								'item_id' => $type_user->user_id,
+							<a style="float: left;" href="<?php echo bp_core_get_user_domain( $type_user->ID ); ?>"><?php echo bp_core_fetch_avatar( array(
+								'item_id' => $type_user->ID,
 								'width'   => '32',
 								'height'  => '32'
 							) ); ?></a>
 
-							<span style="margin: 8px; float: left;"><?php echo bp_core_get_userlink( $type_user->user_id ) ?></span>
+							<span style="margin: 8px; float: left;"><?php echo bp_core_get_userlink( $type_user->ID ) ?></span>
 						</td>
 
 						<td class="urole-column">
-							<select class="bp-groups-role" id="bp-groups-role-<?php echo esc_attr( $type_user->user_id ); ?>" name="bp-groups-role[<?php echo esc_attr( $type_user->user_id ); ?>]">
+							<select class="bp-groups-role" id="bp-groups-role-<?php echo esc_attr( $type_user->ID ); ?>" name="bp-groups-role[<?php echo esc_attr( $type_user->ID ); ?>]">
 								<option value="admin" <?php selected( 'admin', $member_type ) ?>><?php _e( 'Administrator', 'buddypress' ) ?></option>
 								<option value="mod" <?php selected( 'mod', $member_type ) ?>><?php _e( 'Moderator', 'buddypress' ) ?></option>
 								<option value="member" <?php selected( 'member', $member_type ) ?>><?php _e( 'Member', 'buddypress' ) ?></option>
@@ -810,15 +808,27 @@ function bp_groups_admin_edit_metabox_members( $item ) {
 							 *
 							 * @todo remove this, and do database detection on save
 							 */ ?>
-							<input type="hidden" name="bp-groups-existing-role[<?php echo esc_attr( $type_user->user_id ); ?>]" value="<?php echo esc_attr( $member_type ); ?>" />
+							<input type="hidden" name="bp-groups-existing-role[<?php echo esc_attr( $type_user->ID ); ?>]" value="<?php echo esc_attr( $member_type ); ?>" />
 						</td>
 					</tr>
 
+					<?php if ( has_filter( 'bp_groups_admin_manage_member_row' ) ) : ?>
+						<tr>
+							<td colspan="3">
+								<?php do_action( 'bp_groups_admin_manage_member_row', $type_user->ID, $item ); ?>
+							</td>
+						</tr>
+					<?php endif; ?>
+
 				<?php endforeach; ?>
 
 				</tbody>
 			</table>
 
+			<div class="bp-group-admin-pagination table-bottom">
+				<?php echo $pagination[ $member_type ] ?>
+			</div>
+
 		<?php else : ?>
 
 			<p class="bp-groups-no-members description"><?php _e( 'No members of this type', 'buddypress' ) ?></p>
@@ -859,6 +869,63 @@ function bp_groups_admin_edit_metabox_status( $item ) {
 <?php
 }
 
+/**
+ * Create pagination links out of a BP_Group_Member_Query
+ *
+ * This function is intended to create pagination links for use under the
+ * Manage Members section of the Groups Admin Dashboard pages. It is a stopgap
+ * measure until a more general pagination solution is in place for BuddyPress.
+ * Plugin authors should not use this function, as it is likely to be
+ * deprecated soon.
+ *
+ * @since BuddyPress (1.8)
+ * @param object $query A BP_Group_Member_Query object
+ * @param string $member_type member|mod|admin|banned
+ */
+function bp_groups_admin_create_pagination_links( BP_Group_Member_Query $query, $member_type ) {
+	$pagination = '';
+
+	if ( ! in_array( $member_type, array( 'admin', 'mod', 'member', 'banned' ) ) ) {
+		return $pagination;
+	}
+
+	// The key used to paginate this member type in the $_GET global
+	$qs_key = $member_type . '_page';
+	$url_base = remove_query_arg( array( $qs_key, 'updated', 'success_modified' ), $_SERVER['REQUEST_URI'] );
+
+	$page     = isset( $_GET[ $qs_key ] ) ? absint( $_GET[ $qs_key ] ) : 1;
+	$per_page = 10; // @todo Make this customizable?
+
+	// Don't show anything if there's no pagination
+	if ( 1 === $page && $query->total_users <= $per_page ) {
+		return $pagination;
+	}
+
+	$current_page_start = ( ( $page - 1 ) * $per_page ) + 1;
+	$current_page_end   = $page * $per_page > intval( $query->total_users ) ? $query->total_users : $page * $per_page;
+
+	$pag_links = paginate_links( array(
+		'base'      => add_query_arg( $qs_key, '%#%', $url_base ),
+		'format'    => '',
+		'prev_text' => __( '&laquo;' ),
+		'next_text' => __( '&raquo;' ),
+		'total'     => ceil( $query->total_users / $per_page ),
+		'current'   => $page,
+	) );
+
+	$viewing_text = sprintf(
+		__( 'Viewing %1$s - %2$s of %3$s', 'buddypress' ),
+		number_format_i18n( $current_page_start ),
+		number_format_i18n( $current_page_end ),
+		sprintf( _n( '%s member', '%s members', $query->total_users, 'buddypress' ), $query->total_users )
+	);
+
+	$pagination .= '<span class="bp-group-admin-pagination-viewing">' . $viewing_text . '</span>';
+	$pagination .= '<span class="bp-group-admin-pagination-links">' . $pag_links . '</span>';
+
+	return $pagination;
+}
+
 /**
  * Match a set of user ids up to a set of usernames
  *
@@ -890,9 +957,19 @@ function bp_groups_admin_autocomplete_handler() {
 	$return = array();
 
 	// Exclude current group members
-	$group_members = isset( $_REQUEST['group_members'] ) ? wp_parse_id_list( $_REQUEST['group_members'] ) : array();
-	$terms         = isset( $_REQUEST['term']          ) ? $_REQUEST['term'] : '';
-	$users         = get_users( array(
+	$group_id = isset( $_GET['group_id'] ) ? wp_parse_id_list( $_GET['group_id'] ) : array();
+	$group_member_query = new BP_Group_Member_Query( array(
+		'group_id'        => $group_id,
+		'per_page'        => 0, // show all
+		'group_role'      => array( 'member', 'mod', 'admin', ),
+		'populate_extras' => false,
+		'count_total'     => false,
+	) );
+
+	$group_members = ! empty( $group_member_query->results ) ? wp_list_pluck( $group_member_query->results, 'ID' ) : array();
+
+	$terms = isset( $_GET['term'] ) ? $_GET['term'] : '';
+	$users = get_users( array(
 		'blog_id'        => false,
 		'search'         => '*' . $terms . '*',
 		'exclude'        => $group_members,
@@ -968,24 +1045,27 @@ class BP_Groups_List_Table extends WP_List_Table {
 		// Set per page from the screen options
 		$per_page = $this->get_items_per_page( str_replace( '-', '_', "{$screen->id}_per_page" ) );
 
-		// Sort order. Note: not supported in bp_has_groups()
-		$order = 'ASC';
+		// Sort order.
+		$order = 'DESC';
 		if ( !empty( $_REQUEST['order'] ) ) {
 			$order = ( 'desc' == strtolower( $_REQUEST['order'] ) ) ? 'DESC' : 'ASC';
 		}
 
 		// Order by - default to newest
-		$type = 'newest';
-		if ( !empty( $_REQUEST['orderby'] ) ) {
+		$orderby = 'last_activity';
+		if ( ! empty( $_REQUEST['orderby'] ) ) {
 			switch ( $_REQUEST['orderby'] ) {
 				case 'name' :
-					$type = 'alphabetical';
+					$orderby = 'name';
 					break;
 				case 'id' :
-					$type = 'newest';
+					$orderby = 'date_created';
 					break;
 				case 'members' :
-					$type = 'popular';
+					$orderby = 'total_member_count';
+					break;
+				case 'last_active' :
+					$orderby = 'last_activity';
 					break;
 			}
 		}
@@ -1026,7 +1106,7 @@ class BP_Groups_List_Table extends WP_List_Table {
 				'include'  => $include,
 				'per_page' => $per_page,
 				'page'     => $page,
-				'type'     => $type,
+				'orderby'  => $orderby,
 				'order'    => $order
 			);
 
@@ -1133,7 +1213,8 @@ class BP_Groups_List_Table extends WP_List_Table {
 	 * @since BuddyPress (1.7)
 	 */
 	function get_views() {
-		$url_base = remove_query_arg( array( 'orderby', 'order', 'group_status' ), $_SERVER['REQUEST_URI'] ); ?>
+		$url_base = bp_get_admin_url( 'admin.php?page=bp-groups' ); ?>
+
 		<ul class="subsubsub">
 			<li class="all"><a href="<?php echo esc_attr( esc_url( $url_base ) ); ?>" class="<?php if ( 'all' == $this->view ) echo 'current'; ?>"><?php _e( 'All', 'buddypress' ); ?></a> |</li>
 			<li class="public"><a href="<?php echo esc_attr( esc_url( add_query_arg( 'group_status', 'public', $url_base ) ) ); ?>" class="<?php if ( 'public' == $this->view ) echo 'current'; ?>"><?php printf( __( 'Public <span class="count">(%s)</span>', 'buddypress' ), number_format_i18n( $this->group_counts['public'] ) ); ?></a> |</li>
@@ -1178,15 +1259,24 @@ class BP_Groups_List_Table extends WP_List_Table {
 	/**
 	 * Get the column names for sortable columns
 	 *
+	 * Note: It's not documented in WP, but the second item in the
+	 * nested arrays below is $desc_first. Normally, we would set
+	 * last_active to be desc_first (since you're generally interested in
+	 * the *most* recently active group, not the *least*). But because
+	 * the default sort for the Groups admin screen is DESC by last_active,
+	 * we want the first click on the Last Active column header to switch
+	 * the sort order - ie, to make it ASC. Thus last_active is set to
+	 * $desc_first = false.
+	 *
 	 * @return array
 	 * @since BuddyPress (1.7)
 	 */
 	function get_sortable_columns() {
 		return array(
-			'gid'         => array( 'gid',         false ),
-			'comment'     => array( 'name',        false ),
-			'members'     => array( 'members',     false ),
-			'last_active' => array( 'last_active', false )
+			'gid'         => array( 'gid', false ),
+			'comment'     => array( 'name', false ),
+			'members'     => array( 'members', false ),
+			'last_active' => array( 'last_active', false ),
 		);
 	}
 
@@ -1198,7 +1288,7 @@ class BP_Groups_List_Table extends WP_List_Table {
 	 * @since BuddyPress (1.7)
 	 */
 	function column_cb( $item = array() ) {
-		printf( '<input type="checkbox" name="gid[]" value="%d" />', (int) $item['id'] );
+		printf( '<label class="screen-reader-text" for="aid-%1$d">' . __( 'Select group %1$d', 'buddypress' ) . '</label><input type="checkbox" name="aid[]" value="%1$d" id="aid-%1$d" />', $item['id'] );
 	}
 
 	/**
diff --git a/wp-content/plugins/buddypress/bp-groups/bp-groups-buddybar.php b/wp-content/plugins/buddypress/bp-groups/bp-groups-buddybar.php
index adf69f05913d7963b9c6bed5389699fb7858b8b2..db88d28371213d848b10e53a06241ead80fdbf3d 100644
--- a/wp-content/plugins/buddypress/bp-groups/bp-groups-buddybar.php
+++ b/wp-content/plugins/buddypress/bp-groups/bp-groups-buddybar.php
@@ -15,7 +15,6 @@ if ( !defined( 'ABSPATH' ) ) exit;
  *
  * @since BuddyPress (1.0)
  * @global BuddyPress $bp
- * @return False if no menu
  */
 function bp_groups_adminbar_admin_menu() {
 	global $bp;
diff --git a/wp-content/plugins/buddypress/bp-groups/bp-groups-cache.php b/wp-content/plugins/buddypress/bp-groups/bp-groups-cache.php
index afb9e99f1a9f8cb48a343626eebe5d1e8ef791f9..9a86688dae2d456a5074dfa7afa8b72a2c8a3261 100644
--- a/wp-content/plugins/buddypress/bp-groups/bp-groups-cache.php
+++ b/wp-content/plugins/buddypress/bp-groups/bp-groups-cache.php
@@ -94,10 +94,12 @@ add_action( 'bp_groups_delete_group', 'bp_groups_clear_group_members_caches', 10
 function groups_clear_group_user_object_cache( $group_id, $user_id ) {
 	wp_cache_delete( 'bp_total_groups_for_user_' . $user_id, 'bp' );
 }
-add_action( 'groups_join_group',   'groups_clear_group_user_object_cache', 10, 2 );
-add_action( 'groups_leave_group',  'groups_clear_group_user_object_cache', 10, 2 );
-add_action( 'groups_ban_member',   'groups_clear_group_user_object_cache', 10, 2 );
-add_action( 'groups_unban_member', 'groups_clear_group_user_object_cache', 10, 2 );
+add_action( 'groups_join_group',    'groups_clear_group_user_object_cache', 10, 2 );
+add_action( 'groups_leave_group',   'groups_clear_group_user_object_cache', 10, 2 );
+add_action( 'groups_ban_member',    'groups_clear_group_user_object_cache', 10, 2 );
+add_action( 'groups_unban_member',  'groups_clear_group_user_object_cache', 10, 2 );
+add_action( 'groups_uninvite_user', 'groups_clear_group_user_object_cache', 10, 2 );
+add_action( 'groups_remove_member', 'groups_clear_group_user_object_cache', 10, 2 );
 
 /* List actions to clear super cached pages on, if super cache is installed */
 add_action( 'groups_join_group',                 'bp_core_clear_cache' );
diff --git a/wp-content/plugins/buddypress/bp-groups/bp-groups-classes.php b/wp-content/plugins/buddypress/bp-groups/bp-groups-classes.php
index 2f5b1c9f1445f1c1d8cd3bf03d65026aa3b60882..b329829c1b7bd36f9a4643a2f3721cd4026ed4e6 100644
--- a/wp-content/plugins/buddypress/bp-groups/bp-groups-classes.php
+++ b/wp-content/plugins/buddypress/bp-groups/bp-groups-classes.php
@@ -91,6 +91,8 @@ class BP_Groups_Group {
 				else
 					$this->mods[] = $user;
 			}
+		} else {
+			$this->id = 0;
 		}
 	}
 
@@ -332,79 +334,111 @@ class BP_Groups_Group {
 		}
 
 		$defaults = array(
-			'type'            => 'newest',
+			'type'            => null,
+			'orderby'         => 'date_created',
+			'order'           => 'DESC',
 			'per_page'        => null,
 			'page'            => null,
 			'user_id'         => 0,
 			'search_terms'    => false,
+			'meta_query'      => false,
 			'include'         => false,
 			'populate_extras' => true,
 			'exclude'         => false,
-			'show_hidden'     => false
+			'show_hidden'     => false,
 		);
 
 		$r = wp_parse_args( $args, $defaults );
-		extract( $r );
 
 		$sql       = array();
 		$total_sql = array();
 
-		$sql['select'] = "SELECT g.*, gm1.meta_value AS total_member_count, gm2.meta_value AS last_activity";
+		$sql['select'] = "SELECT DISTINCT g.id, g.*, gm1.meta_value AS total_member_count, gm2.meta_value AS last_activity";
 		$sql['from']   = " FROM {$bp->groups->table_name_groupmeta} gm1, {$bp->groups->table_name_groupmeta} gm2,";
 
-		if ( !empty( $user_id ) )
+		if ( ! empty( $r['user_id'] ) ) {
 			$sql['members_from'] = " {$bp->groups->table_name_members} m,";
+		}
 
 		$sql['group_from'] = " {$bp->groups->table_name} g WHERE";
 
-		if ( !empty( $user_id ) )
+		if ( ! empty( $r['user_id'] ) ) {
 			$sql['user_where'] = " g.id = m.group_id AND";
+		}
 
 		$sql['where'] = " g.id = gm1.group_id AND g.id = gm2.group_id AND gm2.meta_key = 'last_activity' AND gm1.meta_key = 'total_member_count'";
 
-		if ( empty( $show_hidden ) )
+		if ( empty( $r['show_hidden'] ) ) {
 			$sql['hidden'] = " AND g.status != 'hidden'";
+		}
 
-		if ( !empty( $search_terms ) ) {
-			$search_terms = esc_sql( like_escape( $search_terms ) );
+		if ( ! empty( $r['search_terms'] ) ) {
+			$search_terms = esc_sql( like_escape( $r['search_terms'] ) );
 			$sql['search'] = " AND ( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )";
 		}
 
-		if ( !empty( $user_id ) )
-			$sql['user'] = $wpdb->prepare( " AND m.user_id = %d AND m.is_confirmed = 1 AND m.is_banned = 0", $user_id );
+		$meta_query_sql = self::get_meta_query_sql( $r['meta_query'] );
+
+		if ( ! empty( $meta_query_sql['join'] ) ) {
+			$sql['from'] .= $meta_query_sql['join'];
+		}
+
+		if ( ! empty( $meta_query_sql['where'] ) ) {
+			$sql['meta'] = $meta_query_sql['where'];
+		}
+
+		if ( ! empty( $r['user_id'] ) ) {
+			$sql['user'] = $wpdb->prepare( " AND m.user_id = %d AND m.is_confirmed = 1 AND m.is_banned = 0", $r['user_id'] );
+		}
 
-		if ( !empty( $include ) ) {
-			$include        = wp_parse_id_list( $r['include'] );
-			$include        = $wpdb->escape( implode( ',', $include ) );
+		if ( ! empty( $r['include'] ) ) {
+			$include        = implode( ',', wp_parse_id_list( $r['include'] ) );
 			$sql['include'] = " AND g.id IN ({$include})";
 		}
 
-		if ( !empty( $exclude ) ) {
-			$exclude        = wp_parse_id_list( $r['exclude'] );
-			$exclude        = $wpdb->escape( implode( ',', $exclude ) );
+		if ( ! empty( $r['exclude'] ) ) {
+			$exclude        = implode( ',', wp_parse_id_list( $r['exclude'] ) );
 			$sql['exclude'] = " AND g.id NOT IN ({$exclude})";
 		}
 
-		switch ( $type ) {
-			case 'newest': default:
-				$sql['order'] = " ORDER BY g.date_created DESC";
-				break;
-			case 'active':
-				$sql[] = "ORDER BY last_activity DESC";
-				break;
-			case 'popular':
-				$sql[] = "ORDER BY CONVERT(gm1.meta_value, SIGNED) DESC";
-				break;
-			case 'alphabetical':
-				$sql[] = "ORDER BY g.name ASC";
-				break;
-			case 'random':
-				$sql[] = "ORDER BY rand()";
-				break;
+		/** Order/orderby ********************************************/
+
+		$order   = $r['order'];
+		$orderby = $r['orderby'];
+
+		// If a 'type' parameter was passed, parse it and overwrite
+		// 'order' and 'orderby' params passed to the function
+		if (  ! empty( $r['type'] ) ) {
+			$order_orderby = self::convert_type_to_order_orderby( $r['type'] );
+
+			// If an invalid type is passed, $order_orderby will be
+			// an array with empty values. In this case, we stick
+			// with the default values of $order and $orderby
+			if ( ! empty( $order_orderby['order'] ) ) {
+				$order = $order_orderby['order'];
+			}
+
+			if ( ! empty( $order_orderby['orderby'] ) ) {
+				$orderby = $order_orderby['orderby'];
+			}
+		}
+
+		// Sanitize 'order'
+		$order = bp_esc_sql_order( $order );
+
+		// Convert 'orderby' into the proper ORDER BY term
+		$orderby = self::convert_orderby_to_order_by_term( $orderby );
+
+		// Random order is a special case
+		if ( 'rand()' === $orderby ) {
+			$sql[] = "ORDER BY rand()";
+		} else {
+			$sql[] = "ORDER BY {$orderby} {$order}";
 		}
 
-		if ( !empty( $per_page ) && !empty( $page ) )
-			$sql['pagination'] = $wpdb->prepare( "LIMIT %d, %d", intval( ( $page - 1 ) * $per_page), intval( $per_page ) );
+		if ( ! empty( $r['per_page'] ) && ! empty( $r['page'] ) ) {
+			$sql['pagination'] = $wpdb->prepare( "LIMIT %d, %d", intval( ( $r['page'] - 1 ) * $r['per_page']), intval( $r['per_page'] ) );
+		}
 
 		// Get paginated results
 		$paged_groups_sql = apply_filters( 'bp_groups_get_paged_groups_sql', join( ' ', (array) $sql ), $sql );
@@ -412,25 +446,42 @@ class BP_Groups_Group {
 
 		$total_sql['select'] = "SELECT COUNT(DISTINCT g.id) FROM {$bp->groups->table_name} g, {$bp->groups->table_name_members} gm1, {$bp->groups->table_name_groupmeta} gm2";
 
-		if ( !empty( $user_id ) )
+		if ( ! empty( $r['user_id'] ) ) {
 			$total_sql['select'] .= ", {$bp->groups->table_name_members} m";
+		}
 
-		if ( !empty( $sql['hidden'] ) )
+		if ( ! empty( $sql['hidden'] ) ) {
 			$total_sql['where'][] = "g.status != 'hidden'";
+		}
 
-		if ( !empty( $sql['search'] ) )
+		if ( ! empty( $sql['search'] ) ) {
 			$total_sql['where'][] = "( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )";
+		}
+
+		if ( ! empty( $r['user_id'] ) ) {
+			$total_sql['where'][] = $wpdb->prepare( "m.group_id = g.id AND m.user_id = %d AND m.is_confirmed = 1 AND m.is_banned = 0", $r['user_id'] );
+		}
 
-		if ( !empty( $user_id ) )
-			$total_sql['where'][] = "m.group_id = g.id AND m.user_id = {$user_id} AND m.is_confirmed = 1 AND m.is_banned = 0";
+		// Temporary implementation of meta_query for total count
+		// See #5099
+		if ( ! empty( $meta_query_sql['where'] ) ) {
+			// Join the groupmeta table
+			$total_sql['select'] .= ", ". substr( $meta_query_sql['join'], 0, -2 );
+
+			// Modify the meta_query clause from paged_sql for our syntax
+			$meta_query_clause = preg_replace( '/^\s*AND/', '', $meta_query_sql['where'] );
+			$total_sql['where'][] = $meta_query_clause;
+		}
 
 		// Already escaped in the paginated results block
-		if ( ! empty( $include ) )
+		if ( ! empty( $include ) ) {
 			$total_sql['where'][] = "g.id IN ({$include})";
+		}
 
 		// Already escaped in the paginated results block
-		if ( ! empty( $exclude ) )
+		if ( ! empty( $exclude ) ) {
 			$total_sql['where'][] = "g.id NOT IN ({$exclude})";
+		}
 
 		$total_sql['where'][] = "g.id = gm1.group_id";
 		$total_sql['where'][] = "g.id = gm2.group_id";
@@ -438,8 +489,9 @@ class BP_Groups_Group {
 
 		$t_sql = $total_sql['select'];
 
-		if ( !empty( $total_sql['where'] ) )
+		if ( ! empty( $total_sql['where'] ) ) {
 			$t_sql .= " WHERE " . join( ' AND ', (array) $total_sql['where'] );
+		}
 
 		// Get total group results
 		$total_groups_sql = apply_filters( 'bp_groups_get_total_groups_sql', $t_sql, $total_sql );
@@ -451,9 +503,9 @@ class BP_Groups_Group {
 		}
 
 		// Populate some extra information instead of querying each time in the loop
-		if ( !empty( $populate_extras ) ) {
-			$group_ids = $wpdb->escape( join( ',', (array) $group_ids ) );
-			$paged_groups = BP_Groups_Group::get_group_extras( $paged_groups, $group_ids, $type );
+		if ( !empty( $r['populate_extras'] ) ) {
+			$group_ids = implode( ',', wp_parse_id_list( $group_ids ) );
+			$paged_groups = BP_Groups_Group::get_group_extras( $paged_groups, $group_ids, $r['type'] );
 		}
 
 		// Grab all groupmeta
@@ -464,6 +516,144 @@ class BP_Groups_Group {
 		return array( 'groups' => $paged_groups, 'total' => $total_groups );
 	}
 
+	/**
+	 * Get the SQL for the 'meta_query' param in BP_Activity_Activity::get()
+	 *
+	 * We use WP_Meta_Query to do the heavy lifting of parsing the
+	 * meta_query array and creating the necessary SQL clauses. However,
+	 * since BP_Activity_Activity::get() builds its SQL differently than
+	 * WP_Query, we have to alter the return value (stripping the leading
+	 * AND keyword from the 'where' clause).
+	 *
+	 * @since BuddyPress (1.8)
+	 * @access protected
+	 *
+	 * @param array $meta_query An array of meta_query filters. See the
+	 *   documentation for WP_Meta_Query for details.
+	 * @return array $sql_array 'join' and 'where' clauses
+	 */
+	protected static function get_meta_query_sql( $meta_query = array() ) {
+		global $wpdb;
+
+		$sql_array = array(
+			'join'  => '',
+			'where' => '',
+		);
+
+		if ( ! empty( $meta_query ) ) {
+			$groups_meta_query = new WP_Meta_Query( $meta_query );
+
+			// WP_Meta_Query expects the table name at
+			// $wpdb->group
+			$wpdb->groupmeta = buddypress()->groups->table_name_groupmeta;
+
+			$meta_sql = $groups_meta_query->get_sql( 'group', 'g', 'id' );
+
+			// BP_Groups_Group::get uses the comma syntax for table
+			// joins, which means that we have to do some regex to
+			// convert the INNER JOIN and move the ON clause to a
+			// WHERE condition
+			//
+			// @todo It may be better in the long run to refactor
+			// the more general query syntax to accord better with
+			// BP/WP convention
+			preg_match_all( '/INNER JOIN (.*) ON/', $meta_sql['join'], $matches_a );
+			preg_match_all( '/ON \((.*)\)/', $meta_sql['join'], $matches_b );
+
+			if ( ! empty( $matches_a[1] ) && ! empty( $matches_b[1] ) ) {
+				$sql_array['join']  = implode( ',', $matches_a[1] ). ', ';
+
+				$sql_array['where'] = '';
+
+				$meta_query_where_clauses = explode( "\n", $meta_sql['where'] );
+				foreach( $matches_b[1] as $key => $group_id_clause ) {
+					$sql_array['where'] .= ' ' . preg_replace( '/^(AND\s+[\(\s]+)/', '$1' . $group_id_clause . ' AND ', ltrim( $meta_query_where_clauses[ $key ] ) );
+				}
+
+			}
+		}
+
+		return $sql_array;
+	}
+
+	/**
+	 * Convert the 'type' parameter to 'order' and 'orderby'
+	 *
+	 * @since BuddyPress (1.8)
+	 * @access protected
+	 * @param string $type The 'type' shorthand param
+	 * @return array 'order' and 'orderby'
+	 */
+	protected function convert_type_to_order_orderby( $type = '' ) {
+		$order = $orderby = '';
+
+		switch ( $type ) {
+			case 'newest' :
+				$order   = 'DESC';
+				$orderby = 'date_created';
+				break;
+
+			case 'active' :
+				$order   = 'DESC';
+				$orderby = 'last_activity';
+				break;
+
+			case 'popular' :
+				$order   = 'DESC';
+				$orderby = 'total_member_count';
+				break;
+
+			case 'alphabetical' :
+				$order   = 'ASC';
+				$orderby = 'name';
+				break;
+
+			case 'random' :
+				$order   = '';
+				$orderby = 'random';
+				break;
+		}
+
+		return array( 'order' => $order, 'orderby' => $orderby );
+	}
+
+	/**
+	 * Convert the 'orderby' param into a proper SQL term/column
+	 *
+	 * @since BuddyPress (1.8)
+	 * @access protected
+	 * @param string $orderby
+	 * @return string $order_by_term
+	 */
+	protected function convert_orderby_to_order_by_term( $orderby ) {
+		$order_by_term = '';
+
+		switch ( $orderby ) {
+			case 'date_created' :
+			default :
+				$order_by_term = 'g.date_created';
+				break;
+
+			case 'last_activity' :
+				$order_by_term = 'last_activity';
+				break;
+
+			case 'total_member_count' :
+				$order_by_term = 'CONVERT(gm1.meta_value, SIGNED)';
+				break;
+
+			case 'name' :
+				$order_by_term = 'g.name';
+				break;
+
+			case 'random' :
+				$order_by_term = 'rand()';
+				break;
+		}
+
+		return $order_by_term;
+	}
+
 	function get_by_most_forum_topics( $limit = null, $page = null, $user_id = 0, $search_terms = false, $populate_extras = true, $exclude = false ) {
 		global $wpdb, $bp, $bbdb;
 
@@ -483,13 +673,12 @@ class BP_Groups_Group {
 		}
 
 		if ( !empty( $exclude ) ) {
-			$exclude     = wp_parse_id_list( $exclude );
-			$exclude     = $wpdb->escape( implode( ',', $exclude ) );
+			$exclude     = implode( ',', wp_parse_id_list( $exclude ) );
 			$exclude_sql = " AND g.id NOT IN ({$exclude})";
 		}
 
 		if ( !empty( $user_id ) ) {
-			$user_id      = absint( $wpdb->escape( $user_id ) );
+			$user_id      = absint( esc_sql( $user_id ) );
 			$paged_groups = $wpdb->get_results( "SELECT DISTINCT g.*, gm1.meta_value as total_member_count, gm2.meta_value as last_activity FROM {$bp->groups->table_name_groupmeta} gm1, {$bp->groups->table_name_groupmeta} gm2, {$bp->groups->table_name_groupmeta} gm3, {$bp->groups->table_name_members} m, {$bbdb->forums} f, {$bp->groups->table_name} g WHERE g.id = m.group_id AND g.id = gm1.group_id AND g.id = gm2.group_id AND g.id = gm3.group_id AND gm2.meta_key = 'last_activity' AND gm1.meta_key = 'total_member_count' AND (gm3.meta_key = 'forum_id' AND gm3.meta_value = f.forum_id) AND f.topics > 0 {$hidden_sql} {$search_sql} AND m.user_id = {$user_id} AND m.is_confirmed = 1 AND m.is_banned = 0 {$exclude_sql} ORDER BY f.topics DESC {$pag_sql}" );
 			$total_groups = $wpdb->get_var( "SELECT COUNT(DISTINCT g.id) FROM {$bp->groups->table_name_groupmeta} gm1, {$bp->groups->table_name_groupmeta} gm2, {$bp->groups->table_name_groupmeta} gm3, {$bbdb->forums} f, {$bp->groups->table_name} g WHERE g.id = gm1.group_id AND g.id = gm2.group_id AND g.id = gm3.group_id AND gm2.meta_key = 'last_activity' AND gm1.meta_key = 'total_member_count' AND (gm3.meta_key = 'forum_id' AND gm3.meta_value = f.forum_id) AND f.topics > 0 {$hidden_sql} {$search_sql} AND m.user_id = {$user_id} AND m.is_confirmed = 1 AND m.is_banned = 0 {$exclude_sql}" );
 		} else {
@@ -499,7 +688,7 @@ class BP_Groups_Group {
 
 		if ( !empty( $populate_extras ) ) {
 			foreach ( (array) $paged_groups as $group ) $group_ids[] = $group->id;
-			$group_ids = $wpdb->escape( join( ',', (array) $group_ids ) );
+			$group_ids = implode( ',', wp_parse_id_list( $group_ids ) );
 			$paged_groups = BP_Groups_Group::get_group_extras( $paged_groups, $group_ids, 'newest' );
 		}
 
@@ -525,13 +714,12 @@ class BP_Groups_Group {
 		}
 
 		if ( !empty( $exclude ) ) {
-			$exclude     = wp_parse_id_list( $exclude );
-			$exclude     = $wpdb->escape( implode( ',', $exclude ) );
+			$exclude     = implode( ',', wp_parse_id_list( $exclude ) );
 			$exclude_sql = " AND g.id NOT IN ({$exclude})";
 		}
 
 		if ( !empty( $user_id ) ) {
-			$user_id = $wpdb->escape( $user_id );
+			$user_id = esc_sql( $user_id );
 			$paged_groups = $wpdb->get_results( "SELECT DISTINCT g.*, gm1.meta_value as total_member_count, gm2.meta_value as last_activity FROM {$bp->groups->table_name_groupmeta} gm1, {$bp->groups->table_name_groupmeta} gm2, {$bp->groups->table_name_groupmeta} gm3, {$bp->groups->table_name_members} m, {$bbdb->forums} f, {$bp->groups->table_name} g WHERE g.id = m.group_id AND g.id = gm1.group_id AND g.id = gm2.group_id AND g.id = gm3.group_id AND gm2.meta_key = 'last_activity' AND gm1.meta_key = 'total_member_count' AND (gm3.meta_key = 'forum_id' AND gm3.meta_value = f.forum_id) {$hidden_sql} {$search_sql} AND m.user_id = {$user_id} AND m.is_confirmed = 1 AND m.is_banned = 0 {$exclude_sql} ORDER BY f.posts ASC {$pag_sql}" );
 			$total_groups = $wpdb->get_results( "SELECT COUNT(DISTINCT g.id) FROM {$bp->groups->table_name_groupmeta} gm1, {$bp->groups->table_name_groupmeta} gm2, {$bp->groups->table_name_groupmeta} gm3, {$bp->groups->table_name_members} m, {$bbdb->forums} f, {$bp->groups->table_name} g WHERE g.id = m.group_id AND g.id = gm1.group_id AND g.id = gm2.group_id AND g.id = gm3.group_id AND gm2.meta_key = 'last_activity' AND gm1.meta_key = 'total_member_count' AND (gm3.meta_key = 'forum_id' AND gm3.meta_value = f.forum_id) AND f.posts > 0 {$hidden_sql} {$search_sql} AND m.user_id = {$user_id} AND m.is_confirmed = 1 AND m.is_banned = 0 {$exclude_sql} " );
 		} else {
@@ -541,7 +729,7 @@ class BP_Groups_Group {
 
 		if ( !empty( $populate_extras ) ) {
 			foreach ( (array) $paged_groups as $group ) $group_ids[] = $group->id;
-			$group_ids = $wpdb->escape( join( ',', (array) $group_ids ) );
+			$group_ids = implode( ',', wp_parse_id_list( $group_ids ) );
 			$paged_groups = BP_Groups_Group::get_group_extras( $paged_groups, $group_ids, 'newest' );
 		}
 
@@ -563,8 +751,7 @@ class BP_Groups_Group {
 		}
 
 		if ( !empty( $exclude ) ) {
-			$exclude     = wp_parse_id_list( $exclude );
-			$exclude     = $wpdb->escape( implode( ',', $exclude ) );
+			$exclude     = implode( ',', wp_parse_id_list( $exclude ) );
 			$exclude_sql = " AND g.id NOT IN ({$exclude})";
 		}
 
@@ -584,7 +771,7 @@ class BP_Groups_Group {
 			foreach ( (array) $paged_groups as $group ) {
 				$group_ids[] = $group->id;
 			}
-			$group_ids    = $wpdb->escape( join( ',', (array) $group_ids ) );
+			$group_ids    = implode( ',', wp_parse_id_list( $group_ids ) );
 			$paged_groups = BP_Groups_Group::get_group_extras( $paged_groups, $group_ids, 'newest' );
 		}
 
@@ -609,12 +796,12 @@ class BP_Groups_Group {
 
 		if ( !empty( $exclude ) ) {
 			$exclude     = wp_parse_id_list( $exclude );
-			$exclude     = $wpdb->escape( implode( ',', $exclude ) );
+			$exclude     = esc_sql( implode( ',', $exclude ) );
 			$exclude_sql = " AND g.id NOT IN ({$exclude})";
 		}
 
 		if ( !empty( $user_id ) ) {
-			$user_id = $wpdb->escape( $user_id );
+			$user_id = esc_sql( $user_id );
 			$paged_groups = $wpdb->get_results( "SELECT g.*, gm1.meta_value as total_member_count, gm2.meta_value as last_activity FROM {$bp->groups->table_name_groupmeta} gm1, {$bp->groups->table_name_groupmeta} gm2, {$bp->groups->table_name_members} m, {$bp->groups->table_name} g WHERE g.id = m.group_id AND g.id = gm1.group_id AND g.id = gm2.group_id AND gm2.meta_key = 'last_activity' AND gm1.meta_key = 'total_member_count' {$hidden_sql} {$search_sql} AND m.user_id = {$user_id} AND m.is_confirmed = 1 AND m.is_banned = 0 {$exclude_sql} ORDER BY rand() {$pag_sql}" );
 			$total_groups = $wpdb->get_var( "SELECT COUNT(DISTINCT m.group_id) FROM {$bp->groups->table_name_members} m LEFT JOIN {$bp->groups->table_name_groupmeta} gm ON m.group_id = gm.group_id INNER JOIN {$bp->groups->table_name} g ON m.group_id = g.id WHERE gm.meta_key = 'last_activity'{$hidden_sql} {$search_sql} AND m.user_id = {$user_id} AND m.is_confirmed = 1 AND m.is_banned = 0 {$exclude_sql}" );
 		} else {
@@ -624,7 +811,7 @@ class BP_Groups_Group {
 
 		if ( !empty( $populate_extras ) ) {
 			foreach ( (array) $paged_groups as $group ) $group_ids[] = $group->id;
-			$group_ids = $wpdb->escape( join( ',', (array) $group_ids ) );
+			$group_ids = implode( ',', wp_parse_id_list( $group_ids ) );
 			$paged_groups = BP_Groups_Group::get_group_extras( $paged_groups, $group_ids, 'newest' );
 		}
 
@@ -710,7 +897,7 @@ class BP_Groups_Group {
 	 * @package BuddyPress
 	 * @since BuddyPress (1.5)
 	 *
-	 * @param str $status 'public', 'private', 'hidden', 'all' Which group types to count
+	 * @param string $status 'public', 'private', 'hidden', 'all' Which group types to count
 	 * @return int The topic count
 	 */
 	function get_global_topic_count( $status = 'public', $search_terms = false ) {
@@ -773,6 +960,227 @@ class BP_Groups_Group {
 	}
 }
 
+/**
+ * Query for the members of a group
+ *
+ * @since BuddyPress (1.8)
+ */
+class BP_Group_Member_Query extends BP_User_Query {
+	/**
+	 * Array of group member ids, cached to prevent redundant lookups
+	 *
+	 * @var null|array Null if not yet defined, otherwise an array of ints
+	 * @since BuddyPress (1.8.1)
+	 */
+	protected $group_member_ids;
+
+	/**
+	 * Set up action hooks
+	 *
+	 * @since BuddyPress (1.8)
+	 */
+	public function setup_hooks() {
+		// Take this early opportunity to set the default 'type' param
+		// to 'last_modified', which will ensure that BP_User_Query
+		// trusts our order and does not try to apply its own
+		if ( empty( $this->query_vars_raw['type'] ) ) {
+			$this->query_vars_raw['type'] = 'last_modified';
+		}
+
+		// Set the sort order
+		add_action( 'bp_pre_user_query', array( $this, 'set_orderby' ) );
+
+		// Set up our populate_extras method
+		add_action( 'bp_user_query_populate_extras', array( $this, 'populate_group_member_extras' ), 10, 2 );
+	}
+
+	/**
+	 * Get a list of user_ids to include in the IN clause of the main query
+	 *
+	 * Overrides BP_User_Query::get_include_ids(), adding our additional
+	 * group-member logic.
+	 *
+	 * @since BuddyPress (1.8)
+	 * @param array
+	 * @return array
+	 */
+	public function get_include_ids( $include ) {
+		// The following args are specific to group member queries, and
+		// are not present in the query_vars of a normal BP_User_Query.
+		// We loop through to make sure that defaults are set (though
+		// values passed to the constructor will, as usual, override
+		// these defaults).
+		$this->query_vars = wp_parse_args( $this->query_vars, array(
+			'group_id'     => 0,
+			'group_role'   => array( 'member' ),
+			'is_confirmed' => true,
+		) );
+
+		$group_member_ids = $this->get_group_member_ids();
+
+		// If the group member query returned no users, bail with an
+		// array that will guarantee no matches for BP_User_Query
+		if ( empty( $group_member_ids ) ) {
+			return array( 0 );
+		}
+
+		if ( ! empty( $include ) ) {
+			$group_member_ids = array_intersect( $include, $group_member_ids );
+		}
+
+		return $group_member_ids;
+	}
+
+	/**
+	 * Get the members of the queried group
+	 *
+	 * @since BuddyPress (1.8)
+	 * @return array $ids User IDs of relevant group member ids
+	 */
+	protected function get_group_member_ids() {
+		global $wpdb;
+
+		if ( is_array( $this->group_member_ids ) ) {
+			return $this->group_member_ids;
+		}
+
+		$bp  = buddypress();
+		$sql = array(
+			'select'  => "SELECT user_id FROM {$bp->groups->table_name_members}",
+			'where'   => array(),
+			'orderby' => '',
+			'order'   => '',
+			'limit'   => '',
+		);
+
+		/** WHERE clauses *****************************************************/
+
+		// Group id
+		$sql['where'][] = $wpdb->prepare( "group_id = %d", $this->query_vars['group_id'] );
+
+		// is_confirmed
+		$is_confirmed = ! empty( $this->query_vars['is_confirmed'] ) ? 1 : 0;
+		$sql['where'][] = $wpdb->prepare( "is_confirmed = %d", $is_confirmed );
+
+		// Role information is stored as follows: admins have
+		// is_admin = 1, mods have is_mod = 1, banned have is_banned =
+		// 1, and members have all three set to 0.
+		$roles = !empty( $this->query_vars['group_role'] ) ? $this->query_vars['group_role'] : array();
+		if ( is_string( $roles ) ) {
+			$roles = explode( ',', $roles );
+		}
+
+		// Sanitize: Only 'admin', 'mod', 'member', and 'banned' are valid
+		$allowed_roles = array( 'admin', 'mod', 'member', 'banned' );
+		foreach ( $roles as $role_key => $role_value ) {
+			if ( ! in_array( $role_value, $allowed_roles ) ) {
+				unset( $roles[ $role_key ] );
+			}
+		}
+
+		$roles = array_unique( $roles );
+
+		// When querying for a set of roles containing 'member' (for
+		// which there is no dedicated is_ column), figure out a list
+		// of columns *not* to match
+		$roles_sql = '';
+		if ( in_array( 'member', $roles ) ) {
+			$role_columns = array();
+			foreach ( array_diff( $allowed_roles, $roles ) as $excluded_role ) {
+				$role_columns[] = 'is_' . $excluded_role . ' = 0';
+			}
+
+			if ( ! empty( $role_columns ) ) {
+				$roles_sql = '(' . implode( ' AND ', $role_columns ) . ')';
+			}
+
+		// When querying for a set of roles *not* containing 'member',
+		// simply construct a list of is_* = 1 clauses
+		} else {
+			$role_columns = array();
+			foreach ( $roles as $role ) {
+				$role_columns[] = 'is_' . $role . ' = 1';
+			}
+
+			if ( ! empty( $role_columns ) ) {
+				$roles_sql = '(' . implode( ' OR ', $role_columns ) . ')';
+			}
+		}
+
+		if ( ! empty( $roles_sql ) ) {
+			$sql['where'][] = $roles_sql;
+		}
+
+		$sql['where'] = ! empty( $sql['where'] ) ? 'WHERE ' . implode( ' AND ', $sql['where'] ) : '';
+
+		/** ORDER BY clause ***************************************************/
+
+		// @todo For now, mimicking legacy behavior of
+		// bp_group_has_members(), which has us order by date_modified
+		// only. Should abstract it in the future
+		$sql['orderby'] = "ORDER BY date_modified";
+		$sql['order']   = "DESC";
+
+		/** LIMIT clause ******************************************************/
+		$this->group_member_ids = $wpdb->get_col( "{$sql['select']} {$sql['where']} {$sql['orderby']} {$sql['order']} {$sql['limit']}" );
+
+		return $this->group_member_ids;
+	}
+
+	/**
+	 * Tell BP_User_Query to order by the order of our query results
+	 *
+	 * This implementation assumes the 'last_modified' sort order
+	 * hardcoded in BP_Group_Member_Query::get_group_member_ids().
+	 *
+	 * @param object $query BP_User_Query object
+	 */
+	public function set_orderby( $query ) {
+		$gm_ids = $this->get_group_member_ids();
+		if ( empty( $gm_ids ) ) {
+			$gm_ids = array( 0 );
+		}
+
+		// The first param in the FIELD() clause is the sort column id
+		$gm_ids = array_merge( array( 'u.id' ), wp_parse_id_list( $gm_ids ) );
+		$gm_ids_sql = implode( ',', $gm_ids );
+
+		$query->uid_clauses['orderby'] = "ORDER BY FIELD(" . $gm_ids_sql . ")";
+
+		// Prevent this filter from running on future BP_User_Query
+		// instances on the same page
+		remove_action( 'bp_pre_user_query', array( $this, 'set_orderby' ) );
+	}
+
+	/**
+	 * Fetch additional data required in bp_group_has_members() loops
+	 *
+	 * @since BuddyPress (1.8)
+	 * @param object $query BP_User_Query object. Because we're filtering
+	 *   the current object, we use $this inside of the method instead
+	 * @param string $user_ids_sql Sanitized, comma-separated string of
+	 *   the user ids returned by the main query
+	 */
+	public function populate_group_member_extras( $query, $user_ids_sql ) {
+		global $wpdb;
+
+		$bp     = buddypress();
+		$extras = $wpdb->get_results( $wpdb->prepare( "SELECT user_id, date_modified, is_banned FROM {$bp->groups->table_name_members} WHERE user_id IN ({$user_ids_sql}) AND group_id = %d", $this->query_vars['group_id'] ) );
+
+		foreach ( (array) $extras as $extra ) {
+			if ( isset( $this->results[ $extra->user_id ] ) ) {
+				// user_id is provided for backward compatibility
+				$this->results[ $extra->user_id ]->user_id       = (int) $extra->user_id;
+				$this->results[ $extra->user_id ]->is_banned     = (int) $extra->is_banned;
+				$this->results[ $extra->user_id ]->date_modified = $extra->date_modified;
+			}
+		}
+
+		// Don't filter other BP_User_Query objects on the same page
+		remove_action( 'bp_user_query_populate_extras', array( $this, 'populate_group_member_extras' ), 10, 2 );
+	}
+}
+
 class BP_Groups_Member {
 	var $id;
 	var $group_id;
@@ -872,6 +1280,12 @@ class BP_Groups_Member {
 
 		$this->id = $wpdb->insert_id;
 
+		// Update the user's group count
+		self::refresh_total_group_count_for_user( $this->user_id );
+
+		// Update the group's member count
+		self::refresh_total_member_count_for_group( $this->group_id );
+
 		do_action_ref_array( 'groups_member_after_save', array( &$this ) );
 
 		return true;
@@ -902,50 +1316,33 @@ class BP_Groups_Member {
 	}
 
 	function ban() {
-
 		if ( !empty( $this->is_admin ) )
 			return false;
 
 		$this->is_mod = 0;
 		$this->is_banned = 1;
 
-		groups_update_groupmeta( $this->group_id, 'total_member_count', ( (int) groups_get_groupmeta( $this->group_id, 'total_member_count' ) - 1 ) );
-
-		$group_count = bp_get_user_meta( $this->user_id, 'total_group_count', true );
-		if ( !empty( $group_count ) )
-			bp_update_user_meta( $this->user_id, 'total_group_count', (int) $group_count - 1 );
-
 		return $this->save();
 	}
 
 	function unban() {
-
 		if ( !empty( $this->is_admin ) )
 			return false;
 
 		$this->is_banned = 0;
 
-		groups_update_groupmeta( $this->group_id, 'total_member_count', ( (int) groups_get_groupmeta( $this->group_id, 'total_member_count' ) + 1 ) );
-		bp_update_user_meta( $this->user_id, 'total_group_count', (int) bp_get_user_meta( $this->user_id, 'total_group_count', true ) + 1 );
-
 		return $this->save();
 	}
 
 	function accept_invite() {
-
 		$this->inviter_id    = 0;
 		$this->is_confirmed  = 1;
 		$this->date_modified = bp_core_current_time();
-
-		bp_update_user_meta( $this->user_id, 'total_group_count', (int) bp_get_user_meta( $this->user_id, 'total_group_count', true ) + 1 );
 	}
 
 	function accept_request() {
-
 		$this->is_confirmed = 1;
 		$this->date_modified = bp_core_current_time();
-
-		bp_update_user_meta( $this->user_id, 'total_group_count', (int) bp_get_user_meta( $this->user_id, 'total_group_count', true ) + 1 );
 	}
 
 	function remove() {
@@ -956,21 +1353,51 @@ class BP_Groups_Member {
 		if ( !$result = $wpdb->query( $sql ) )
 			return false;
 
-		groups_update_groupmeta( $this->group_id, 'total_member_count', ( (int) groups_get_groupmeta( $this->group_id, 'total_member_count' ) - 1 ) );
+		// Update the user's group count
+		self::refresh_total_group_count_for_user( $this->user_id );
 
-		$group_count = bp_get_user_meta( $this->user_id, 'total_group_count', true );
-		if ( !empty( $group_count ) )
-			bp_update_user_meta( $this->user_id, 'total_group_count', (int) $group_count - 1 );
+		// Update the group's member count
+		self::refresh_total_member_count_for_group( $this->group_id );
 
 		return $result;
 	}
 
 	/** Static Methods ********************************************************/
 
+	/**
+	 * Refresh the total_group_count for a user
+	 *
+	 * @since BuddyPress (1.8)
+	 * @param int $user_id
+	 * @return bool True on success
+	 */
+	public static function refresh_total_group_count_for_user( $user_id ) {
+		return bp_update_user_meta( $user_id, 'total_group_count', (int) self::total_group_count( $user_id ) );
+	}
+
+	/**
+	 * Refresh the total_member_count for a group
+	 *
+	 * @since BuddyPress (1.8)
+	 * @param int $group_id
+	 * @return bool True on success
+	 */
+	public static function refresh_total_member_count_for_group( $group_id ) {
+		return groups_update_groupmeta( $group_id, 'total_member_count', (int) BP_Groups_Group::get_total_member_count( $group_id ) );
+	}
+
 	function delete( $user_id, $group_id ) {
 		global $wpdb, $bp;
 
-		return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d", $user_id, $group_id ) );
+		$remove = $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d", $user_id, $group_id ) );
+
+		// Update the user's group count
+		self::refresh_total_group_count_for_user( $user_id );
+
+		// Update the group's member count
+		self::refresh_total_member_count_for_group( $group_id );
+
+		return $remove;
 	}
 
 	function get_group_ids( $user_id, $limit = false, $page = false ) {
@@ -1079,8 +1506,7 @@ class BP_Groups_Member {
 		$pag_sql = ( !empty( $limit ) && !empty( $page ) ) ? $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ) : '';
 
 		if ( !empty( $exclude ) ) {
-			$exclude     = wp_parse_id_list( $exclude );
-			$exclude     = $wpdb->escape( implode( ',', $exclude ) );
+			$exclude     = implode( ',', wp_parse_id_list( $exclude ) );
 			$exclude_sql = " AND g.id NOT IN ({$exclude})";
 		} else {
 			$exclude_sql = '';
@@ -1225,6 +1651,8 @@ class BP_Groups_Member {
 	function get_all_for_group( $group_id, $limit = false, $page = false, $exclude_admins_mods = true, $exclude_banned = true, $exclude = false ) {
 		global $bp, $wpdb;
 
+		_deprecated_function( __METHOD__, '1.8', 'BP_Group_Member_Query' );
+
 		$pag_sql = '';
 		if ( !empty( $limit ) && !empty( $page ) )
 			$pag_sql = $wpdb->prepare( "LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
@@ -1239,8 +1667,7 @@ class BP_Groups_Member {
 
 		$exclude_sql = '';
 		if ( !empty( $exclude ) ) {
-			$exclude     = wp_parse_id_list( $exclude );
-			$exclude     = $wpdb->escape( implode( ',', $exclude ) );
+			$exclude     = implode( ',', wp_parse_id_list( $exclude ) );
 			$exclude_sql = " AND m.user_id NOT IN ({$exclude})";
 		}
 
@@ -1316,191 +1743,1216 @@ class BP_Groups_Member {
  * API for creating group extensions without having to hardcode the content into
  * the theme.
  *
- * This class must be extended for each group extension and the following methods overridden:
+ * To implement, extend this class. In your constructor, pass an optional array
+ * of arguments to parent::init() to configure your widget. The config array
+ * supports the following values:
+ *   - 'slug' A unique identifier for your extension. This value will be used
+ *     to build URLs, so make it URL-safe
+ *   - 'name' A translatable name for your extension. This value is used to
+       populate the navigation tab, as well as the default titles for admin/
+       edit/create tabs.
+ *   - 'visibility' Set to 'public' (default) for your extension (the main tab
+ *     as well as the widget) to be available to anyone who can access the
+ *     group, 'private' otherwise.
+ *   - 'nav_item_position' An integer explaining where the nav item should
+ *     appear in the tab list
+ *   - 'enable_nav_item' Set to true for your extension's main tab to be
+ *     available to anyone who can access the group.
+ *   - 'nav_item_name' The translatable text you want to appear in the nav tab.
+ *     Defaults to the value of 'name'.
+ *   - 'display_hook' The WordPress action that the widget_display() method is
+ *     hooked to
+ *   - 'template_file' The template file that will be used to load the content
+ *     of your main extension tab. Defaults to 'groups/single/plugins.php'.
+ *   - 'screens' A multi-dimensional array, described below
+ *
+ * BP_Group_Extension uses the concept of "settings screens". There are three
+ * contexts for settings screens:
+ *   - 'create', which inserts a new step into the group creation process
+ *   - 'edit', which adds a tab for your extension into the Admin section of
+ *     a group
+ *   - 'admin', which adds a metabox to the Groups administration panel in the
+ *     WordPress Dashboard
+ * Each of these settings screens is populated by a pair of methods: one that
+ * creates the markup for the screen, and one that processes form data
+ * submitted from the screen. If your plugin needs screens in all three
+ * contexts, and if the markup and form processing logic will be the same in
+ * each case, you can define two methods to handle all of the screens:
+ *   function settings_screen() {}
+ *   function settings_screen_save() {}
+ * If one or more of your settings screen needs separate logic, you may define
+ * context-specific methods, for example:
+ *   function edit_screen() {}
+ *   function edit_screen_save() {}
+ * BP_Group_Extension will use the more specific methods if they are available.
  *
- * BP_Group_Extension::widget_display(), BP_Group_Extension::display(),
- * BP_Group_Extension::edit_screen_save(), BP_Group_Extension::edit_screen(),
- * BP_Group_Extension::create_screen_save(), BP_Group_Extension::create_screen()
+ * You can further customize the settings screens (tab names, etc) by passing
+ * an optional 'screens' parameter to the init array. The format is as follows:
+ *   'screens' => array(
+ *       'create' => array(
+ *	     'slug' => 'foo',
+ *	     'name' => 'Foo',
+ *	     'position' => 55,
+ *	     'screen_callback' => 'my_create_screen_callback',
+ *	     'screen_save_callback' => 'my_create_screen_save_callback',
+ *	 ),
+ *	 'edit' => array( // ...
+ *   ),
+ * Only provide those arguments that you actually want to change from the
+ * default configuration. BP_Group_Extension will do the rest.
+ *
+ * Note that the 'edit' screen accepts an additional parameter: 'submit_text',
+ * which defines the text of the Submit button automatically added to the Edit
+ * screen of the extension (defaults to 'Save Changes'). Also, the 'admin'
+ * screen accepts two additional parameters: 'metabox_priority' and
+ * 'metabox_context'. See the docs for add_meta_box() for more details on these
+ * arguments.
+ *
+ * Prior to BuddyPress 1.7, group extension configurations were set slightly
+ * differently. The legacy method is still supported, though deprecated.
  *
  * @package BuddyPress
  * @subpackage Groups
  * @since BuddyPress (1.1)
  */
 class BP_Group_Extension {
-	var $name = false;
-	var $slug = false;
 
-	// The name/slug of the Group Admin tab for this extension
-	var $admin_name = '';
-	var $admin_slug = '';
+	/** Public ****************************************************************/
 
-	// The name/slug of the Group Creation tab for this extension
-	var $create_name = '';
-	var $create_slug = '';
-
-	// Will this extension be visible to non-members of a group? Options: public/private
-	var $visibility = 'public';
+	/**
+	 * @var array Information about this extension's screens
+	 * @since BuddyPress (1.8)
+	 */
+	public $screens = array();
 
-	var $create_step_position = 81;
-	var $nav_item_position = 81;
+	/**
+	 * @var string The name of the extending class
+	 * @since BuddyPress (1.8)
+	 */
+	public $class_name = '';
 
 	/**
-	 * @var string Context for the optional admin metabox
-	 * @see https://codex.wordpress.org/Function_Reference/add_meta_box for
-	 *      possible values
-	 * @since BuddyPress (1.7)
+	 * @var object A ReflectionClass object of the current extension
+	 * @since BuddyPress (1.8)
 	 */
-	var $admin_metabox_context = 'normal';
+	public $class_reflection = null;
 
 	/**
-	 * @var string Priority for the optional admin menabox
-	 * @see https://codex.wordpress.org/Function_Reference/add_meta_box for
-	 *      possible values
-	 * @since BuddyPress (1.7)
+	 * @var array Parsed configuration paramaters for the extension
+	 * @since BuddyPress (1.8)
 	 */
-	var $admin_metabox_priority = 'core';
+	public $params = array();
 
-	var $enable_create_step = true;
-	var $enable_nav_item = true;
-	var $enable_edit_item = true;
-	var $enable_admin_item = true;
+	/**
+	 * @var int The id of the current group
+	 * @since BuddyPress (1.8)
+	 */
+	public $group_id = 0;
 
-	var $nav_item_name = false;
+	/**
+	 * @var string The slug of the current extension
+	 */
+	public $slug = '';
 
-	var $display_hook = 'groups_custom_group_boxes';
-	var $template_file = 'groups/single/plugins';
+	/**
+	 * @var string The translatable name of the current extension
+	 */
+	public $name = '';
 
-	// Methods you should override
+	/**
+	 * @var string Whether the extension tab is visible. 'public'
+	 *   or 'private'
+	 */
+	public $visibility = 'public';
 
-	function display() {}
+	/**
+	 * @var int The numeric position of the main nav item
+	 */
+	public $nav_item_position = 81;
 
-	function widget_display() {}
+	/**
+	 * @var bool Whether to show the nav item
+	 */
+	public $enable_nav_item = true;
 
-	function edit_screen() {}
+	/**
+	 * @var string The text of the nav item. Defaults to self::name
+	 */
+	public $nav_item_name = '';
 
-	function edit_screen_save() {}
+	/**
+	 * @var string The WP action that self::widget_display() is attached to.
+	 *   Defaults to 'groups_custom_group_boxes'
+	 */
+	public $display_hook = 'groups_custom_group_boxes';
 
-	function create_screen() {}
+	/**
+	 * @var string The template file used to load the plugin content.
+	 *   Defaults to 'groups/single/plugins'
+	 */
+	public $template_file = 'groups/single/plugins';
 
-	function create_screen_save() {}
+	/** Protected *************************************************************/
 
-	// Private Methods
+	/**
+	 * @var bool Has the extension been initialized?
+	 * @since BuddyPress (1.8)
+	 */
+	protected $initialized = false;
 
-	function _register() {
-		global $bp;
+	/**
+	 * @var array Extension properties as set by legacy extensions
+	 * @since BuddyPress (1.8)
+	 */
+	protected $legacy_properties = array();
 
-		// If admin/create names and slugs are not provided, they fall back on the main
-		// name and slug for the extension
-		if ( !$this->admin_name ) {
-			$this->admin_name = $this->name;
-		}
+	/**
+	 * @var array Extension properties as set by legacy extensions, but
+	 *   converted to match the new format for params
+	 * @since BuddyPress (1.8)
+	 */
+	protected $legacy_properties_converted = array();
 
-		if ( !$this->admin_slug ) {
-			$this->admin_slug = $this->slug;
-		}
+	/**
+	 * @var array Miscellaneous data as set by the __set() magic method
+	 * @since BuddyPress (1.8)
+	 */
+	protected $data = array();
 
-		if ( !$this->create_name ) {
-			$this->create_name = $this->name;
-		}
+	/** Screen Overrides ******************************************************/
 
-		if ( !$this->create_slug ) {
-			$this->create_slug = $this->slug;
-		}
+	/**
+	 * Screen override methods are how your extension will display content
+	 * and handle form submits. Your extension should only override those
+	 * methods that it needs for its purposes.
+	 */
 
-		if ( !empty( $this->enable_create_step ) ) {
-			// Insert the group creation step for the new group extension
-			$bp->groups->group_creation_steps[$this->create_slug] = array( 'name' => $this->create_name, 'slug' => $this->create_slug, 'position' => $this->create_step_position );
+	// The content of the group tab
+	public function display() {}
 
-			// Attach the group creation step display content action
-			add_action( 'groups_custom_create_steps', array( &$this, 'create_screen' ) );
+	// Content displayed in a widget sidebar, if applicable
+	public function widget_display() {}
 
-			// Attach the group creation step save content action
-			add_action( 'groups_create_group_step_save_' . $this->create_slug, array( &$this, 'create_screen_save' ) );
-		}
+	// *_screen() displays the settings form for the given context
+	// *_screen_save() processes data submitted via the settings form
+	// The settings_* methods are generic fallbacks, which can optionally
+	// be overridden by the more specific edit_*, create_*, and admin_*
+	// versions.
+	public function settings_screen( $group_id = null ) {}
+	public function settings_screen_save( $group_id = null ) {}
+	public function edit_screen( $group_id = null ) {}
+	public function edit_screen_save( $group_id = null ) {}
+	public function create_screen( $group_id = null ) {}
+	public function create_screen_save( $group_id = null ) {}
+	public function admin_screen( $group_id = null ) {}
+	public function admin_screen_save( $group_id = null ) {}
 
-		// When we are viewing a single group, add the group extension nav item
-		if ( bp_is_group() ) {
-			if ( $this->visibility == 'public' || ( $this->visibility != 'public' && $bp->groups->current_group->user_has_access ) ) {
-				if ( $this->enable_nav_item ) {
-					bp_core_new_subnav_item( array( 'name' => ( !$this->nav_item_name ) ? $this->name : $this->nav_item_name, 'slug' => $this->slug, 'parent_slug' => $bp->groups->current_group->slug, 'parent_url' => bp_get_group_permalink( $bp->groups->current_group ), 'position' => $this->nav_item_position, 'item_css_id' => 'nav-' . $this->slug, 'screen_function' => array( &$this, '_display_hook' ), 'user_has_access' => $this->enable_nav_item ) );
+	/** Setup *************************************************************/
 
-					// When we are viewing the extension display page, set the title and options title
-					if ( bp_is_current_action( $this->slug ) ) {
-						add_action( 'bp_template_content_header', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) );
-						add_action( 'bp_template_title', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) );
-					}
-				}
+	/**
+	 * Initialize the extension, using your config settings
+	 *
+	 * Your plugin should call this method at the very end of its
+	 * constructor, like so:
+	 *
+	 *   public function __construct() {
+	 *       $args = array(
+	 *           'slug' => 'my-group-extension',
+	 *           'name' => 'My Group Extension',
+	 *           // ...
+	 *       );
+	 *
+	 *       parent::init( $args );
+	 *   }
+	 *
+	 * @since BuddyPress (1.8)
+	 * @param array $args See inline definition below for arguments
+	 */
+	public function init( $args = array() ) {
+
+		// Before this init() method was introduced, plugins were
+		// encouraged to set their config directly. For backward
+		// compatibility with these plugins, we detect whether this is
+		// one of those legacy plugins, and parse any legacy arguments
+		// with those passed to init()
+		$this->parse_legacy_properties();
+		$args = $this->parse_args_r( $args, $this->legacy_properties_converted );
+
+		// Parse with defaults
+		$this->params = $this->parse_args_r( $args, array(
+			'slug'              => $this->slug,
+			'name'              => $this->name,
+			'visibility'        => $this->visibility,
+			'nav_item_position' => $this->nav_item_position,
+			'enable_nav_item'   => (bool) $this->enable_nav_item,
+			'nav_item_name'     => $this->nav_item_name,
+			'display_hook'      => $this->display_hook,
+			'template_file'     => $this->template_file,
+			'screens'           => $this->get_default_screens(),
+		) );
+
+		$this->initialized = true;
+	}
 
-				// Hook the group home widget
-				if ( !bp_current_action() && bp_is_current_action( 'home' ) )
-					add_action( $this->display_hook, array( &$this, 'widget_display' ) );
-			}
+	/**
+	 * The main setup routine for the extension
+	 *
+	 * This method contains the primary logic for setting up an extension's
+	 * configuration, setting up backward compatibility for legacy plugins,
+	 * and hooking the extension's screen functions into WP and BP.
+	 *
+	 * Marked 'public' because it must be accessible to add_action().
+	 * However, you should never need to invoke this method yourself - it
+	 * is called automatically at the right point in the load order by
+	 * bp_register_group_extension().
+	 *
+	 * @since BuddyPress (1.1)
+	 */
+	public function _register() {
+
+		// Detect and parse properties set by legacy extensions
+		$this->parse_legacy_properties();
+
+		// Initialize, if necessary. This should only happen for
+		// legacy extensions that don't call parent::init() themselves
+		if ( true !== $this->initialized ) {
+			$this->init();
 		}
 
-		// Construct the admin edit tab for the new group extension
-		if ( !empty( $this->enable_edit_item ) && bp_is_item_admin() ) {
-			add_action( 'groups_admin_tabs', create_function( '$current, $group_slug', '$selected = ""; if ( "' . esc_attr( $this->admin_slug ) . '" == $current ) $selected = " class=\"current\""; echo "<li{$selected}><a href=\"' . trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/{$group_slug}/admin/' . esc_attr( $this->admin_slug ) ) . '\">' . esc_attr( $this->admin_name ) . '</a></li>";' ), 10, 2 );
+		// Set some config values, based on the parsed params
+		$this->group_id          = $this->get_group_id();
+		$this->slug              = $this->params['slug'];
+		$this->name              = $this->params['name'];
+		$this->visibility        = $this->params['visibility'];
+		$this->nav_item_position = $this->params['nav_item_position'];
+		$this->nav_item_name     = $this->params['nav_item_name'];
+		$this->display_hook      = $this->params['display_hook'];
+		$this->template_file     = $this->params['template_file'];
+
+		// Configure 'screens': create, admin, and edit contexts
+		$this->setup_screens();
+
+		// Mirror configuration data so it's accessible to plugins
+		// that look for it in its old locations
+		$this->setup_legacy_properties();
+
+		// Hook the extension into BuddyPress
+		$this->setup_display_hooks();
+		$this->setup_create_hooks();
+		$this->setup_edit_hooks();
+		$this->setup_admin_hooks();
+	}
 
-			// Catch the edit screen and forward it to the plugin template
-			if ( bp_is_groups_component() && bp_is_current_action( 'admin' ) && bp_is_action_variable( $this->admin_slug, 0 ) ) {
-				// Check whether the user is saving changes
-				$this->edit_screen_save();
+	/**
+	 * Set up some basic info about the Extension
+	 *
+	 * Here we collect the name of the extending class, as well as a
+	 * ReflectionClass that is used in get_screen_callback() to determine
+	 * whether your extension overrides certain callback methods.
+	 *
+	 * @since BuddyPress (1.8)
+	 */
+	protected function setup_class_info() {
+		if ( empty( $this->class_name ) ) {
+			$this->class_name = get_class( $this );
+		}
 
-				add_action( 'groups_custom_edit_steps', array( &$this, 'edit_screen' ) );
+		if ( is_null( $this->class_reflection ) ) {
+			$this->class_reflection = new ReflectionClass( $this->class_name );
+		}
+	}
 
-				if ( '' != bp_locate_template( array( 'groups/single/home.php' ), false ) ) {
-					bp_core_load_template( apply_filters( 'groups_template_group_home', 'groups/single/home' ) );
-				} else {
-					add_action( 'bp_template_content_header', create_function( '', 'echo "<ul class=\"content-header-nav\">"; bp_group_admin_tabs(); echo "</ul>";' ) );
-					add_action( 'bp_template_content', array( &$this, 'edit_screen' ) );
-					bp_core_load_template( apply_filters( 'bp_core_template_plugin', '/groups/single/plugins' ) );
-				}
+	/**
+	 * Get the current group id
+	 *
+	 * Check for:
+	 *   - current group
+	 *   - new group
+	 *   - group admin
+	 *
+	 * @since BuddyPress (1.8)
+	 */
+	public static function get_group_id() {
+
+		// Usually this will work
+		$group_id = bp_get_current_group_id();
+
+		// On the admin, get the group id out of the $_GET params
+		if ( empty( $group_id ) && is_admin() && ( isset( $_GET['page'] ) && ( 'bp-groups' === $_GET['page'] ) ) && ! empty( $_GET['gid'] ) ) {
+			$group_id = (int) $_GET['gid'];
+		}
+
+		// This fallback will only be hit when the create step is very
+		// early
+		if ( empty( $group_id ) && bp_get_new_group_id() ) {
+			$group_id = bp_get_new_group_id();
+		}
+
+		// On some setups, the group id has to be fetched out of the
+		// $_POST array
+		// @todo Figure out why this is happening during group creation
+		if ( empty( $group_id ) && isset( $_POST['group_id'] ) ) {
+			$group_id = (int) $_POST['group_id'];
+		}
+
+		return $group_id;
+	}
+
+	/**
+	 * Gather configuration data about your screens
+	 *
+	 * @since BuddyPress (1.8)
+	 */
+	protected function get_default_screens() {
+		$this->setup_class_info();
+
+		$screens = array(
+			'create' => array(
+				'position' => 81,
+			),
+			'edit'   => array(
+				'submit_text' => __( 'Save Changes', 'buddypress' ),
+			),
+			'admin'  => array(
+				'metabox_context'  => 'normal',
+				'metabox_priority' => 'core',
+			),
+		);
+
+		foreach ( $screens as $context => &$screen ) {
+			$screen['enabled']     = true;
+			$screen['name']        = $this->name;
+			$screen['slug']        = $this->slug;
+
+			$screen['screen_callback']      = $this->get_screen_callback( $context, 'screen'      );
+			$screen['screen_save_callback'] = $this->get_screen_callback( $context, 'screen_save' );
+		}
+
+		return $screens;
+	}
+
+	/**
+	 * Set up screens array based on params
+	 *
+	 * @since BuddyPress (1.8)
+	 */
+	protected function setup_screens() {
+		foreach ( (array) $this->params['screens'] as $context => $screen ) {
+			if ( empty( $screen['slug'] ) ) {
+				$screen['slug'] = $this->slug;
 			}
+
+			if ( empty( $screen['name'] ) ) {
+				$screen['name'] = $this->name;
+			}
+
+			$this->screens[ $context ] = $screen;
 		}
+	}
+
+	/** Display ***************************************************************/
+
+	/**
+	 * Hook this extension's group tab into BuddyPress, if necessary
+	 *
+	 * @since BuddyPress (1.8)
+	 */
+	protected function setup_display_hooks() {
 
-		// Construct the admin metabox
-		// Plugin authors: Note that $this->enable_admin_item must be
-		// set to true, and self::admin_screen() must be defined
-		if ( ! empty( $this->enable_admin_item ) && is_admin() && method_exists( get_class( $this ), 'admin_screen' ) ) {
-			// Hook the admin screen markup function to the content hook
-			add_action( 'bp_groups_admin_meta_box_content_' . $this->slug, array( $this, 'admin_screen' ) );
+		// Bail if not a group
+		if ( ! bp_is_group() ) {
+			return;
+		}
 
-			// Initialize the metabox
-			add_action( 'bp_groups_admin_meta_boxes', array( $this, '_meta_box_display_callback' ) );
+		// Bail if the current user doesn't have access
+		if ( ( 'public' !== $this->visibility ) && ! buddypress()->groups->current_group->user_has_access ) {
+			return;
+		}
+
+		if ( true === $this->enable_nav_item ) {
+			bp_core_new_subnav_item( array(
+				'name'            => ! $this->nav_item_name ? $this->name : $this->nav_item_name,
+				'slug'            => $this->slug,
+				'parent_slug'     => bp_get_current_group_slug(),
+				'parent_url'      => bp_get_group_permalink( groups_get_current_group() ),
+				'position'        => $this->nav_item_position,
+				'item_css_id'     => 'nav-' . $this->slug,
+				'screen_function' => array( &$this, '_display_hook' ),
+				'user_has_access' => $this->enable_nav_item
+			) );
+
+			// When we are viewing the extension display page, set the title and options title
+			if ( bp_is_current_action( $this->slug ) ) {
+				add_action( 'bp_template_content_header', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) );
+				add_action( 'bp_template_title',          create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) );
+			}
+		}
 
-			// Catch the metabox save
-			add_action( 'bp_group_admin_edit_after', array( $this, 'admin_screen_save' ), 10 );
+		// Hook the group home widget
+		if ( ! bp_current_action() && bp_is_current_action( 'home' ) ) {
+			add_action( $this->display_hook, array( &$this, 'widget_display' ) );
 		}
 	}
 
-	function _display_hook() {
+	/**
+	 * Hooks the main display method, and loads the template file
+	 */
+	public function _display_hook() {
 		add_action( 'bp_template_content', array( &$this, 'display' ) );
 		bp_core_load_template( apply_filters( 'bp_core_template_plugin', $this->template_file ) );
 	}
 
+	/** Create ****************************************************************/
+
+	/**
+	 * Hook this extension's Create step into BuddyPress, if necessary
+	 *
+	 * @since BuddyPress (1.8)
+	 */
+	protected function setup_create_hooks() {
+		if ( ! $this->is_screen_enabled( 'create' ) ) {
+			return;
+		}
+
+		$screen = $this->screens['create'];
+
+		// Insert the group creation step for the new group extension
+		buddypress()->groups->group_creation_steps[ $screen['slug'] ] = array(
+			'name'     => $screen['name'],
+			'slug'     => $screen['slug'],
+			'position' => $screen['position'],
+		);
+
+		// The maybe_ methods check to see whether the create_*
+		// callbacks should be invoked (ie, are we on the
+		// correct group creation step). Hooked in separate
+		// methods because current creation step info not yet
+		// available at this point
+		add_action( 'groups_custom_create_steps', array( $this, 'maybe_create_screen' ) );
+		add_action( 'groups_create_group_step_save_' . $screen['slug'], array( $this, 'maybe_create_screen_save' ) );
+	}
+
+	/**
+	 * Call the create_screen() method, if we're on the right page
+	 *
+	 * @since BuddyPress (1.8)
+	 */
+	public function maybe_create_screen() {
+		if ( ! bp_is_group_creation_step( $this->screens['create']['slug'] ) ) {
+			return;
+		}
+
+		call_user_func( $this->screens['create']['screen_callback'], $this->group_id );
+		$this->nonce_field( 'create' );
+
+		// The create screen requires an additional nonce field
+		// due to a quirk in the way the templates are built
+		wp_nonce_field( 'groups_create_save_' . bp_get_groups_current_create_step() );
+	}
+
+	/**
+	 * Call the create_screen_save() method, if we're on the right page
+	 *
+	 * @since BuddyPress (1.8)
+	 */
+	public function maybe_create_screen_save() {
+		if ( ! bp_is_group_creation_step( $this->screens['create']['slug'] ) ) {
+			return;
+		}
+
+		$this->check_nonce( 'create' );
+		call_user_func( $this->screens['create']['screen_save_callback'], $this->group_id );
+	}
+
+	/** Edit ******************************************************************/
+
+	/**
+	 * Hook this extension's Edit panel into BuddyPress, if necessary
+	 *
+	 * @since BuddyPress (1.8)
+	 */
+	protected function setup_edit_hooks() {
+
+		// Bail if not an edit screen
+		if ( ! $this->is_screen_enabled( 'edit' ) || ! bp_is_item_admin() ) {
+			return;
+		}
+
+		$screen = $this->screens['edit'];
+
+		$position = isset( $screen['position'] ) ? (int) $screen['position'] : 10;
+
+		// Add the tab
+		// @todo BP should be using bp_core_new_subnav_item()
+		add_action( 'groups_admin_tabs', create_function( '$current, $group_slug',
+			'$selected = "";
+			if ( "' . esc_attr( $screen['slug'] ) . '" == $current )
+				$selected = " class=\"current\"";
+			echo "<li{$selected}><a href=\"' . trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/{$group_slug}/admin/' . esc_attr( $screen['slug'] ) ) . '\">' . esc_attr( $screen['name'] ) . '</a></li>";'
+		), $position, 2 );
+
+		// Catch the edit screen and forward it to the plugin template
+		if ( bp_is_groups_component() && bp_is_current_action( 'admin' ) && bp_is_action_variable( $screen['slug'], 0 ) ) {
+			$this->call_edit_screen_save( $this->group_id );
+
+			add_action( 'groups_custom_edit_steps', array( &$this, 'call_edit_screen' ) );
+
+			// Determine the proper template and save for later
+			// loading
+			if ( '' !== bp_locate_template( array( 'groups/single/home.php' ), false ) ) {
+				$this->edit_screen_template = '/groups/single/home';
+			} else {
+				add_action( 'bp_template_content_header', create_function( '', 'echo "<ul class=\"content-header-nav\">"; bp_group_admin_tabs(); echo "</ul>";' ) );
+				add_action( 'bp_template_content', array( &$this, 'call_edit_screen' ) );
+				$this->edit_screen_template = '/groups/single/plugins';
+			}
+
+			// We load the template at bp_screens, to give all
+			// extensions a chance to load
+			add_action( 'bp_screens', array( $this, 'call_edit_screen_template_loader' ) );
+		}
+	}
+
+	/**
+	 * Call the edit_screen() method
+	 *
+	 * Previous versions of BP_Group_Extension required plugins to provide
+	 * their own Submit button and nonce fields when building markup. In
+	 * BP 1.8, this requirement was lifted - BP_Group_Extension now handles
+	 * all required submit buttons and nonces.
+	 *
+	 * We put the edit screen markup into an output buffer before echoing.
+	 * This is so that we can check for the presence of a hardcoded submit
+	 * button, as would be present in legacy plugins; if one is found, we
+	 * do not auto-add our own button.
+	 *
+	 * @since BuddyPress (1.8)
+	 */
+	public function call_edit_screen() {
+		ob_start();
+		call_user_func( $this->screens['edit']['screen_callback'], $this->group_id );
+		$screen = ob_get_contents();
+		ob_end_clean();
+
+		echo $this->maybe_add_submit_button( $screen );
+
+		$this->nonce_field( 'edit' );
+	}
+
+	/**
+	 * Check the nonce, and call the edit_screen_save() method
+	 *
+	 * @since BuddyPress (1.8)
+	 */
+	public function call_edit_screen_save() {
+		if ( empty( $_POST ) ) {
+			return;
+		}
+
+		// When DOING_AJAX, the POST global will be populated, but we
+		// should assume it's a save
+		if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
+			return;
+		}
+
+		$this->check_nonce( 'edit' );
+		call_user_func( $this->screens['edit']['screen_save_callback'], $this->group_id );
+	}
+
+	/**
+	 * Load the template that houses the Edit screen
+	 *
+	 * Separated out into a callback so that it can run after all other
+	 * Group Extensions have had a chance to register their navigation, to
+	 * avoid missing tabs.
+	 *
+	 * Hooked to 'bp_screens'.
+	 *
+	 * @see BP_Group_Extension::setup_edit_hooks()
+	 * @access public So that do_action() has access. Do not call directly.
+	 * @since BuddyPress (1.8)
+	 */
+	public function call_edit_screen_template_loader() {
+		bp_core_load_template( $this->edit_screen_template );
+	}
+
+	/**
+	 * Add a submit button to the edit form, if it needs one
+	 *
+	 * There's an inconsistency in the way that the group Edit and Create
+	 * screens are rendered: the Create screen has a submit button built
+	 * in, but the Edit screen does not. This function allows plugin
+	 * authors to write markup that does not contain the submit button for
+	 * use on both the Create and Edit screens - BP will provide the button
+	 * if one is not found.
+	 *
+	 * @since BuddyPress (1.8)
+	 * @param string $screen The screen markup, captured in the output buffer
+	 * @param string $screen The same markup, with a submit button added
+	 */
+	protected function maybe_add_submit_button( $screen = '' ) {
+		if ( $this->has_submit_button( $screen ) ) {
+			return $screen;
+		}
+
+		return $screen . sprintf(
+			'<div id="%s"><input type="submit" name="save" value="%s" id="%s"></div>',
+			'bp-group-edit-' . $this->slug . '-submit-wrapper',
+			$this->screens['edit']['submit_text'],
+			'bp-group-edit-' . $this->slug . '-submit'
+		);
+	}
+
+	/**
+	 * Does the given markup have a submit button?
+	 *
+	 * @since BuddyPress (1.8)
+	 * @param string $screen The markup to check
+	 * @return bool
+	 */
+	public static function has_submit_button( $screen = '' ) {
+		$pattern = "/<input[^>]+type=[\'\"]submit[\'\"]/";
+		preg_match( $pattern, $screen, $matches );
+		return ! empty( $matches[0] );
+	}
+
+	/** Admin *****************************************************************/
+
+	/**
+	 * Hook this extension's Admin metabox into BuddyPress, if necessary
+	 *
+	 * @since BuddyPress (1.8)
+	 */
+	protected function setup_admin_hooks() {
+		if ( ! $this->is_screen_enabled( 'admin' ) || ! is_admin() ) {
+			return;
+		}
+
+		// Hook the admin screen markup function to the content hook
+		add_action( 'bp_groups_admin_meta_box_content_' . $this->slug, array( $this, 'call_admin_screen' ) );
+
+		// Initialize the metabox
+		add_action( 'bp_groups_admin_meta_boxes', array( $this, '_meta_box_display_callback' ) );
+
+		// Catch the metabox save
+		add_action( 'bp_group_admin_edit_after', array( $this, 'call_admin_screen_save' ), 10 );
+	}
+
+	/**
+	 * Call the admin_screen() method, and add a nonce field
+	 *
+	 * @since BuddyPress (1.8)
+	 */
+	public function call_admin_screen() {
+		call_user_func( $this->screens['admin']['screen_callback'], $this->group_id );
+		$this->nonce_field( 'admin' );
+	}
+
+	/**
+	 * Check the nonce, and call the admin_screen_save() method
+	 *
+	 * @since BuddyPress (1.8)
+	 */
+	public function call_admin_screen_save() {
+		$this->check_nonce( 'admin' );
+		call_user_func( $this->screens['admin']['screen_save_callback'], $this->group_id );
+	}
+
 	/**
 	 * Create the Dashboard meta box for this extension
 	 *
 	 * @since BuddyPress (1.7)
 	 */
-	function _meta_box_display_callback() {
+	public function _meta_box_display_callback() {
 		$group_id = isset( $_GET['gid'] ) ? (int) $_GET['gid'] : 0;
+		$screen   = $this->screens['admin'];
 
 		add_meta_box(
-			$this->slug,
-			$this->name,
+			$screen['slug'],
+			$screen['name'],
 			create_function( '', 'do_action( "bp_groups_admin_meta_box_content_' . $this->slug . '", ' . $group_id . ' );' ),
 			get_current_screen()->id,
-			$this->admin_metabox_context,
-			$this->admin_metabox_priority
+			$screen['metabox_context'],
+			$screen['metabox_priority']
+		);
+	}
+
+
+	/** Utilities *************************************************************/
+
+	/**
+	 * Generate the nonce fields for a settings form
+	 *
+	 * The nonce field name (the second param passed to wp_nonce_field)
+	 * contains this extension's slug and is thus unique to this extension.
+	 * This is necessary because in some cases (namely, the Dashboard),
+	 * more than one extension may generate nonces on the same page, and we
+	 * must avoid name clashes.
+	 *
+	 * @since BuddyPress (1.8)
+	 * @uses wp_nonce_field()
+	 * @param string $context 'create', 'edit', 'admin'
+	 */
+	public function nonce_field( $context = '' ) {
+		wp_nonce_field( 'bp_group_extension_' . $this->slug . '_' . $context, '_bp_group_' . $context . '_nonce_' . $this->slug );
+	}
+
+	/**
+	 * Check the nonce on a submitted settings form
+	 *
+	 * @since BuddyPress (1.8)
+	 * @uses check_admin_referer()
+	 * @param string $context 'create', 'edit', 'admin'
+	 */
+	public function check_nonce( $context = '' ) {
+		check_admin_referer( 'bp_group_extension_' . $this->slug . '_' . $context, '_bp_group_' . $context . '_nonce_' . $this->slug );
+	}
+
+	/**
+	 * Is the specified screen enabled?
+	 *
+	 * To be enabled, a screen must both have the 'enabled' key set to true
+	 * (legacy: $this->enable_create_step, etc), and its screen_callback
+	 * must also exist and be callable.
+	 *
+	 * @since BuddyPress (1.8)
+	 * @param string $context 'create', 'edit', 'admin'
+	 * @return bool
+	 */
+	public function is_screen_enabled( $context = '' ) {
+		$enabled = false;
+
+		if ( isset( $this->screens[ $context ] ) ) {
+			$enabled = $this->screens[ $context ]['enabled'] && is_callable( $this->screens[ $context ]['screen_callback'] );
+		}
+
+		return (bool) $enabled;
+	}
+
+	/**
+	 * Get the appropriate screen callback for the specified context/type
+	 *
+	 * BP Group Extensions have three special "screen contexts": create,
+	 * admin, and edit. Each of these contexts has a corresponding
+	 * _screen() and _screen_save() method, which allow group extension
+	 * plugins to define different markup and logic for each context.
+	 *
+	 * BP also supports fallback settings_screen() and
+	 * settings_screen_save() methods, which can be used to define markup
+	 * and logic that is shared between context. For each context, you may
+	 * either provide context-specific methods, or you can let BP fall back
+	 * on the shared settings_* callbacks.
+	 *
+	 * For example, consider a BP_Group_Extension implementation that looks
+	 * like this:
+	 *
+	 *   // ...
+	 *   function create_screen( $group_id ) { ... }
+	 *   function create_screen_save( $group_id ) { ... }
+	 *   function settings_screen( $group_id ) { ... }
+	 *   function settings_screen_save( $group_id ) { ... }
+	 *   // ...
+	 *
+	 * BP_Group_Extension will use your create_* methods for the Create
+	 * steps, and will use your generic settings_* methods for the Edit
+	 * and Admin contexts. This schema allows plugin authors maximum
+	 * flexibility without having to repeat themselves.
+	 *
+	 * The get_screen_callback() method uses a ReflectionClass object to
+	 * determine whether your extension has provided a given callback.
+	 *
+	 * @since BuddyPress (1.8)
+	 * @param string $context 'create', 'edit', 'admin'
+	 * @param string $type 'screen', 'screen_save'
+	 * @return mixed A callable function handle
+	 */
+	public function get_screen_callback( $context = '', $type = 'screen' ) {
+		$callback = '';
+
+		// Try the context-specific callback first
+		$method  = $context . '_' . $type;
+		$rmethod = $this->class_reflection->getMethod( $method );
+		if ( isset( $rmethod->class ) && $this->class_name === $rmethod->class ) {
+			$callback = array( $this, $method );
+		}
+
+		if ( empty( $callback ) ) {
+			$fallback_method  = 'settings_' . $type;
+			$rfallback_method = $this->class_reflection->getMethod( $fallback_method );
+			if ( isset( $rfallback_method->class ) && $this->class_name === $rfallback_method->class ) {
+				$callback = array( $this, $fallback_method );
+			}
+		}
+
+		return $callback;
+	}
+
+	/**
+	 * Recursive argument parsing
+	 *
+	 * This acts like a multi-dimensional version of wp_parse_args() (minus
+	 * the querystring parsing - you must pass arrays).
+	 *
+	 * Values from $a override those from $b; keys in $b that don't exist
+	 * in $a are passed through.
+	 *
+	 * This is different from array_merge_recursive(), both because of the
+	 * order of preference ($a overrides $b) and because of the fact that
+	 * array_merge_recursive() combines arrays deep in the tree, rather
+	 * than overwriting the b array with the a array.
+	 *
+	 * The implementation of this function is specific to the needs of
+	 * BP_Group_Extension, where we know that arrays will always be
+	 * associative, and that an argument under a given key in one array
+	 * will be matched by a value of identical depth in the other one. The
+	 * function is NOT designed for general use, and will probably result
+	 * in unexpected results when used with data in the wild. See, eg,
+	 * http://core.trac.wordpress.org/ticket/19888
+	 *
+	 * @since BuddyPress (1.8)
+	 * @arg array $a
+	 * @arg array $b
+	 * @return array
+	 */
+	public static function parse_args_r( &$a, $b ) {
+		$a = (array) $a;
+		$b = (array) $b;
+		$r = $b;
+
+		foreach ( $a as $k => &$v ) {
+			if ( is_array( $v ) && isset( $r[ $k ] ) ) {
+				$r[ $k ] = self::parse_args_r( $v, $r[ $k ] );
+			} else {
+				$r[ $k ] = $v;
+			}
+		}
+
+		return $r;
+	}
+
+	/** Legacy Support ********************************************************/
+
+	/**
+	 * In BuddyPress 1.8, the recommended technique for configuring
+	 * extensions changed from directly setting various object properties
+	 * in the class constructor, to passing a configuration array to
+	 * parent::init(). The following methods ensure that extensions created
+	 * in the old way continue to work, by converting legacy configuration
+	 * data to the new format.
+	 */
+
+	/**
+	 * Provide access to otherwise unavailable object properties
+	 *
+	 * This magic method is here for backward compatibility with plugins
+	 * that refer to config properties that have moved to a different
+	 * location (such as enable_create_step, which is now at
+	 * $this->screens['create']['enabled']
+	 *
+	 * The legacy_properties array is set up in
+	 * self::setup_legacy_properties().
+	 *
+	 * @since BuddyPress (1.8)
+	 * @param string $key
+	 * @return mixed
+	 */
+	public function __get( $key ) {
+		if ( isset( $this->legacy_properties[ $key ] ) ) {
+			return $this->legacy_properties[ $key ];
+		} elseif ( isset( $this->data[ $key ] ) ) {
+			return $this->data[ $key ];
+		} else {
+			return null;
+		}
+	}
+
+	/**
+	 * Provide a fallback for isset( $this->foo ) when foo is unavailable
+	 *
+	 * This magit method is here for backward compatibility with plugins
+	 * that have set their class config options directly in the class
+	 * constructor. The parse_legacy_properties() method of the current
+	 * class needs to check whether any legacy keys have been put into the
+	 * $this->data array.
+	 *
+	 * @since BuddyPress (1.8)
+	 * @param string $key
+	 * @return bool
+	 */
+	public function __isset( $key ) {
+		if ( isset( $this->legacy_properties[ $key ] ) ) {
+			return true;
+		} elseif ( isset( $this->data[ $key ] ) ) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+	/**
+	 * Allow plugins to set otherwise unavailable object properties
+	 *
+	 * This magic method is here for backward compatibility with plugins
+	 * that may attempt to modify the group extension by manually assigning
+	 * a value to an object property that no longer exists, such as
+	 * $this->enable_create_step.
+	 *
+	 * @since BuddyPress (1.8)
+	 * @param string $key
+	 * @param mixed $value
+	 */
+	public function __set( $key, $value ) {
+
+		if ( empty( $this->initialized ) ) {
+			$this->data[ $key ] = $value;
+		}
+
+		switch ( $key ) {
+			case 'enable_create_step' :
+				$this->screens['create']['enabled'] = $value;
+				break;
+
+			case 'enable_edit_item' :
+				$this->screens['edit']['enabled'] = $value;
+				break;
+
+			case 'enable_admin_item' :
+				$this->screens['admin']['enabled'] = $value;
+				break;
+
+			case 'create_step_position' :
+				$this->screens['create']['position'] = $value;
+				break;
+
+			// Note: 'admin' becomes 'edit' to distinguish from Dashboard 'admin'
+			case 'admin_name' :
+				$this->screens['edit']['name'] = $value;
+				break;
+
+			case 'admin_slug' :
+				$this->screens['edit']['slug'] = $value;
+				break;
+
+			case 'create_name' :
+				$this->screens['create']['name'] = $value;
+				break;
+
+			case 'create_slug' :
+				$this->screens['create']['slug'] = $value;
+				break;
+
+			case 'admin_metabox_context' :
+				$this->screens['admin']['metabox_context'] = $value;
+				break;
+
+			case 'admin_metabox_priority' :
+				$this->screens['admin']['metabox_priority'] = $value;
+				break;
+
+			default :
+				$this->data[ $key ] = $value;
+				break;
+		}
+	}
+
+	/**
+	 * Returns a list of legacy properties
+	 *
+	 * The legacy implementation of BP_Group_Extension used all of these
+	 * object properties for configuration. Some have been moved.
+	 *
+	 * @since BuddyPress (1.8)
+	 * @return array
+	 */
+	protected function get_legacy_property_list() {
+		return array(
+			'name',
+			'slug',
+			'admin_name',
+			'admin_slug',
+			'create_name',
+			'create_slug',
+			'visibility',
+			'create_step_position',
+			'nav_item_position',
+			'admin_metabox_context',
+			'admin_metabox_priority',
+			'enable_create_step',
+			'enable_nav_item',
+			'enable_edit_item',
+			'enable_admin_item',
+			'nav_item_name',
+			'display_hook',
+			'template_file',
 		);
 	}
+
+	/**
+	 * Parse legacy properties
+	 *
+	 * The old standard for BP_Group_Extension was for plugins to register
+	 * their settings as properties in their constructor. The new method is
+	 * to pass a config array to the init() method. In order to support
+	 * legacy plugins, we slurp up legacy properties, and later on we'll
+	 * parse them into the new init() array.
+	 *
+	 * @since BuddyPress (1.8)
+	 */
+	protected function parse_legacy_properties() {
+
+		// Only run this one time
+		if ( ! empty( $this->legacy_properties_converted ) ) {
+			return;
+		}
+
+		$properties = $this->get_legacy_property_list();
+
+		// By-reference variable for convenience
+		$lpc =& $this->legacy_properties_converted;
+
+		foreach ( $properties as $property ) {
+
+			// No legacy config exists for this key
+			if ( ! isset( $this->{$property} ) ) {
+				continue;
+			}
+
+			// Grab the value and record it as appropriate
+			$value = $this->{$property};
+
+			switch ( $property ) {
+				case 'enable_create_step' :
+					$lpc['screens']['create']['enabled'] = (bool) $value;
+					break;
+
+				case 'enable_edit_item' :
+					$lpc['screens']['edit']['enabled'] = (bool) $value;
+					break;
+
+				case 'enable_admin_item' :
+					$lpc['screens']['admin']['enabled'] = (bool) $value;
+					break;
+
+				case 'create_step_position' :
+					$lpc['screens']['create']['position'] = $value;
+					break;
+
+				// Note: 'admin' becomes 'edit' to distinguish from Dashboard 'admin'
+				case 'admin_name' :
+					$lpc['screens']['edit']['name'] = $value;
+					break;
+
+				case 'admin_slug' :
+					$lpc['screens']['edit']['slug'] = $value;
+					break;
+
+				case 'create_name' :
+					$lpc['screens']['create']['name'] = $value;
+					break;
+
+				case 'create_slug' :
+					$lpc['screens']['create']['slug'] = $value;
+					break;
+
+				case 'admin_metabox_context' :
+					$lpc['screens']['admin']['metabox_context'] = $value;
+					break;
+
+				case 'admin_metabox_priority' :
+					$lpc['screens']['admin']['metabox_priority'] = $value;
+					break;
+
+				default :
+					$lpc[ $property ] = $value;
+					break;
+			}
+		}
+	}
+
+	/**
+	 * Set up legacy properties
+	 *
+	 * This method is responsible for ensuring that all legacy config
+	 * properties are stored in an array $this->legacy_properties, so that
+	 * they remain available to plugins that reference the variables at
+	 * their old locations.
+	 *
+	 * @see self::__get()
+	 *
+	 * @since BuddyPress (1.8)
+	 */
+	protected function setup_legacy_properties() {
+
+		// Only run this one time
+		if ( ! empty( $this->legacy_properties ) ) {
+			return;
+		}
+
+		$properties = $this->get_legacy_property_list();
+		$params     = $this->params;
+		$lp         =& $this->legacy_properties;
+
+		foreach ( $properties as $property ) {
+			switch ( $property ) {
+				case 'enable_create_step' :
+					$lp['enable_create_step'] = $params['screens']['create']['enabled'];
+					break;
+
+				case 'enable_edit_item' :
+					$lp['enable_edit_item'] = $params['screens']['edit']['enabled'];
+					break;
+
+				case 'enable_admin_item' :
+					$lp['enable_admin_item'] = $params['screens']['admin']['enabled'];
+					break;
+
+				case 'create_step_position' :
+					$lp['create_step_position'] = $params['screens']['create']['position'];
+					break;
+
+				// Note: 'admin' becomes 'edit' to distinguish from Dashboard 'admin'
+				case 'admin_name' :
+					$lp['admin_name'] = $params['screens']['edit']['name'];
+					break;
+
+				case 'admin_slug' :
+					$lp['admin_slug'] = $params['screens']['edit']['slug'];
+					break;
+
+				case 'create_name' :
+					$lp['create_name'] = $params['screens']['create']['name'];
+					break;
+
+				case 'create_slug' :
+					$lp['create_slug'] = $params['screens']['create']['slug'];
+					break;
+
+				case 'admin_metabox_context' :
+					$lp['admin_metabox_context'] = $params['screens']['admin']['metabox_context'];
+					break;
+
+				case 'admin_metabox_priority' :
+					$lp['admin_metabox_priority'] = $params['screens']['admin']['metabox_priority'];
+					break;
+
+				default :
+					// All other items get moved over
+					$lp[ $property ] = $params[ $property ];
+
+					// Also reapply to the object, for backpat
+					$this->{$property} = $params[ $property ];
+
+					break;
+			}
+		}
+	}
 }
 
-function bp_register_group_extension( $group_extension_class ) {
+function bp_register_group_extension( $group_extension_class = '' ) {
 
-	if ( !class_exists( $group_extension_class ) )
+	if ( ! class_exists( $group_extension_class ) ) {
 		return false;
+	}
 
 	// Register the group extension on the bp_init action so we have access
 	// to all plugins.
diff --git a/wp-content/plugins/buddypress/bp-groups/bp-groups-forums.php b/wp-content/plugins/buddypress/bp-groups/bp-groups-forums.php
index 509f56af93168bbafabe20fedb46b3e42e6eabc6..d87018811f106ff5f244e2603ef29f3a5f102932 100644
--- a/wp-content/plugins/buddypress/bp-groups/bp-groups-forums.php
+++ b/wp-content/plugins/buddypress/bp-groups/bp-groups-forums.php
@@ -398,7 +398,7 @@ function groups_total_public_forum_topic_count( $type = 'newest' ) {
  * @package BuddyPress
  * @since BuddyPress (1.5)
  *
- * @param str $status 'public', 'private', 'hidden', 'all' Which group types to count
+ * @param string $status 'public', 'private', 'hidden', 'all' Which group types to count
  * @return int The topic count
  */
 function groups_total_forum_topic_count( $status = 'public', $search_terms = false ) {
diff --git a/wp-content/plugins/buddypress/bp-groups/bp-groups-functions.php b/wp-content/plugins/buddypress/bp-groups/bp-groups-functions.php
index 1a490a0930bf0d9d4e548ab879024575d22ae5ba..3f1d4eb66bcfbab359f5eac114ca57e8488d79c5 100644
--- a/wp-content/plugins/buddypress/bp-groups/bp-groups-functions.php
+++ b/wp-content/plugins/buddypress/bp-groups/bp-groups-functions.php
@@ -36,8 +36,8 @@ function bp_groups_has_directory() {
  * of instantiating BP_Groups_Group directly, so that you will inherit cache
  * support and pass through the groups_get_group filter.
  *
- * @param $args The load_users parameter is deprecated and does nothing.
- * @return obj $group The group object
+ * @param string $args The load_users parameter is deprecated and does nothing.
+ * @return BP_Groups_Group $group The group object
  */
 function groups_get_group( $args = '' ) {
 	$defaults = array(
@@ -123,6 +123,8 @@ function groups_create_group( $args = '' ) {
 		$member->date_modified = bp_core_current_time();
 		$member->save();
 
+		groups_update_groupmeta( $group->id, 'last_activity', bp_core_current_time() );
+
 		do_action( 'groups_create_group', $group->id, $member, $group );
 
 	} else {
@@ -296,12 +298,6 @@ function groups_leave_group( $group_id, $user_id = 0 ) {
 	if ( !groups_uninvite_user( $user_id, $group_id ) )
 		return false;
 
-	// Modify group member count
-	groups_update_groupmeta( $group_id, 'total_member_count', (int) groups_get_groupmeta( $group_id, 'total_member_count') - 1 );
-
-	// Modify user's group memberhip count
-	bp_update_user_meta( $user_id, 'total_group_count', (int) bp_get_user_meta( $user_id, 'total_group_count', true ) - 1 );
-
 	/**
 	 * If the user joined this group less than five minutes ago, remove the
 	 * joined_group activity so users cannot flood the activity stream by
@@ -361,7 +357,6 @@ function groups_join_group( $group_id, $user_id = 0 ) {
 	) );
 
 	// Modify group meta
-	groups_update_groupmeta( $group_id, 'total_member_count', (int) groups_get_groupmeta( $group_id, 'total_member_count') + 1 );
 	groups_update_groupmeta( $group_id, 'last_activity', bp_core_current_time() );
 
 	do_action( 'groups_join_group', $group_id, $user_id );
@@ -382,7 +377,11 @@ function groups_get_group_mods( $group_id ) {
 /**
  * Fetch the members of a group
  *
- * Procedural wrapper for BP_Groups_Member::get_all_for_group().
+ * Since BuddyPress 1.8, a procedural wrapper for BP_Group_Member_Query.
+ * Previously called BP_Groups_Member::get_all_for_group().
+ *
+ * To use the legacy query, filter 'bp_use_legacy_group_member_query',
+ * returning true.
  *
  * @param int $group_id
  * @param int $limit Maximum members to return
@@ -392,8 +391,49 @@ function groups_get_group_mods( $group_id ) {
  * @param array|string $exclude Array or comma-sep list of users to exclude
  * @return array Multi-d array of 'members' list and 'count'
  */
-function groups_get_group_members( $group_id, $limit = false, $page = false, $exclude_admins_mods = true, $exclude_banned = true, $exclude = false ) {
-	return BP_Groups_Member::get_all_for_group( $group_id, $limit, $page, $exclude_admins_mods, $exclude_banned, $exclude );
+function groups_get_group_members( $group_id, $limit = false, $page = false, $exclude_admins_mods = true, $exclude_banned = true, $exclude = false, $group_role = false ) {
+
+	// For legacy users. Use of BP_Groups_Member::get_all_for_group()
+	// is deprecated. func_get_args() can't be passed to a function in PHP
+	// 5.2.x, so we create a variable
+	$func_args = func_get_args();
+	if ( apply_filters( 'bp_use_legacy_group_member_query', false, __FUNCTION__, $func_args ) ) {
+		$retval = BP_Groups_Member::get_all_for_group( $group_id, $limit, $page, $exclude_admins_mods, $exclude_banned, $exclude );
+	} else {
+
+		// exclude_admins_mods and exclude_banned are legacy arguments.
+		// Convert to group_role
+		if ( empty( $group_role ) ) {
+			$group_role = array( 'member' );
+
+			if ( ! $exclude_admins_mods ) {
+				$group_role[] = 'mod';
+				$group_role[] = 'admin';
+			}
+
+			if ( ! $exclude_banned ) {
+				$group_role[] = 'banned';
+			}
+		}
+
+		// Perform the group member query (extends BP_User_Query)
+		$members = new BP_Group_Member_Query( array(
+			'group_id'       => $group_id,
+			'per_page'       => $limit,
+			'page'           => $page,
+			'group_role'     => $group_role,
+			'exclude'        => $exclude,
+			'type'           => 'last_modified',
+		) );
+
+		// Structure the return value as expected by the template functions
+		$retval = array(
+			'members' => array_values( $members->results ),
+			'count'   => $members->total_users,
+		);
+	}
+
+	return $retval;
 }
 
 function groups_get_total_member_count( $group_id ) {
@@ -413,11 +453,14 @@ function groups_get_total_member_count( $group_id ) {
 function groups_get_groups( $args = '' ) {
 
 	$defaults = array(
-		'type'            => 'active', // active, newest, alphabetical, random, popular, most-forum-topics or most-forum-posts
+		'type'            => false,    // active, newest, alphabetical, random, popular, most-forum-topics or most-forum-posts
+		'order'           => 'DESC',   // 'ASC' or 'DESC'
+		'orderby'         => 'date_created', // date_created, last_activity, total_member_count, name, random
 		'user_id'         => false,    // Pass a user_id to limit to only groups that this user is a member of
 		'include'         => false,    // Only include these specific groups (group_ids)
 		'exclude'         => false,    // Do not include these specific groups (group_ids)
 		'search_terms'    => false,    // Limit to groups that match these search terms
+		'meta_query'      => false,    // Filter by groupmeta. See WP_Meta_Query for syntax
 		'show_hidden'     => false,    // Show hidden groups to non-admins
 		'per_page'        => 20,       // The number of results to return per page
 		'page'            => 1,        // The page to return if limiting per page
@@ -432,10 +475,13 @@ function groups_get_groups( $args = '' ) {
 		'include'         => $r['include'],
 		'exclude'         => $r['exclude'],
 		'search_terms'    => $r['search_terms'],
+		'meta_query'      => $r['meta_query'],
 		'show_hidden'     => $r['show_hidden'],
 		'per_page'        => $r['per_page'],
 		'page'            => $r['page'],
-		'populate_extras' => $r['populate_extras']
+		'populate_extras' => $r['populate_extras'],
+		'order'           => $r['order'],
+		'orderby'         => $r['orderby'],
 	) );
 
 	return apply_filters_ref_array( 'groups_get_groups', array( &$groups, &$r ) );
@@ -477,7 +523,7 @@ function groups_total_groups_for_user( $user_id = 0 ) {
  * @package BuddyPress
  * @since BuddyPress (1.5)
  *
- * @return obj The current group object
+ * @return BP_Groups_Group The current group object
  */
 function groups_get_current_group() {
 	global $bp;
@@ -670,7 +716,6 @@ function groups_accept_invite( $user_id, $group_id ) {
 		$member->delete_request( $user_id, $group_id );
 
 	// Modify group meta
-	groups_update_groupmeta( $group_id, 'total_member_count', (int) groups_get_groupmeta( $group_id, 'total_member_count') + 1 );
 	groups_update_groupmeta( $group_id, 'last_activity', bp_core_current_time() );
 
 	bp_core_delete_notifications_by_item_id( $user_id, $group_id, $bp->groups->id, 'group_invite' );
@@ -736,7 +781,7 @@ function groups_get_invites_for_group( $user_id, $group_id ) {
  *
  * @param int $user_id Potential group member
  * @param int $group_id Potential group
- * @param str $type Optional. Use 'sent' to check for sent invites, 'all' to check for all
+ * @param string $type Optional. Use 'sent' to check for sent invites, 'all' to check for all
  * @return bool Returns true if an invitation is found
  */
 function groups_check_user_has_invite( $user_id, $group_id, $type = 'sent' ) {
@@ -868,9 +913,6 @@ function groups_accept_membership_request( $membership_id, $user_id = 0, $group_
 	if ( groups_check_user_has_invite( $membership->user_id, $membership->group_id ) )
 		groups_delete_invite( $membership->user_id, $membership->group_id );
 
-	// Modify group member count
-	groups_update_groupmeta( $membership->group_id, 'total_member_count', (int) groups_get_groupmeta( $membership->group_id, 'total_member_count') + 1 );
-
 	// Record this in activity streams
 	$group = groups_get_group( array( 'group_id' => $membership->group_id ) );
 
@@ -1003,7 +1045,7 @@ function groups_update_groupmeta( $group_id, $meta_key, $meta_value ) {
 	$meta_key = preg_replace( '|[^a-z0-9_]|i', '', $meta_key );
 
 	if ( is_string( $meta_value ) )
-		$meta_value = stripslashes( $wpdb->escape( $meta_value ) );
+		$meta_value = stripslashes( esc_sql( $meta_value ) );
 
 	$meta_value = maybe_serialize( $meta_value );
 
diff --git a/wp-content/plugins/buddypress/bp-groups/bp-groups-loader.php b/wp-content/plugins/buddypress/bp-groups/bp-groups-loader.php
index d56500f650c4ee3ed07c76c40c438d1a214b23aa..cf582b6718d79eb84d7c4df48664a2a828954a20 100644
--- a/wp-content/plugins/buddypress/bp-groups/bp-groups-loader.php
+++ b/wp-content/plugins/buddypress/bp-groups/bp-groups-loader.php
@@ -88,7 +88,7 @@ class BP_Groups_Component extends BP_Component {
 	/**
 	 * Include files
 	 */
-	function includes() {
+	public function includes( $includes = array() ) {
 		$includes = array(
 			'cache',
 			'forums',
@@ -120,7 +120,7 @@ class BP_Groups_Component extends BP_Component {
 	 * @since BuddyPress (1.5)
 	 * @global BuddyPress $bp The one true BuddyPress instance
 	 */
-	function setup_globals() {
+	public function setup_globals( $args = array() ) {
 		global $bp;
 
 		// Define a slug, if necessary
@@ -305,7 +305,7 @@ class BP_Groups_Component extends BP_Component {
 		) );
 
 		// If avatar uploads are not disabled, add avatar option
-		if ( !(int)bp_get_option( 'bp-disable-avatar-uploads' ) ) {
+		if ( ! (int) buddypress()->site_options['bp-disable-avatar-uploads'] ) {
 			$this->group_creation_steps['group-avatar'] = array(
 				'name'     => __( 'Avatar',   'buddypress' ),
 				'position' => 20
@@ -336,7 +336,7 @@ class BP_Groups_Component extends BP_Component {
 	 *
 	 * @global BuddyPress $bp The one true BuddyPress instance
 	 */
-	function setup_nav() {
+	public function setup_nav( $main_nav = array(), $sub_nav = array() ) {
 
 		// Define local variables
 		$sub_nav = array();
@@ -499,7 +499,7 @@ class BP_Groups_Component extends BP_Component {
 	 *
 	 * @global BuddyPress $bp The one true BuddyPress instance
 	 */
-	function setup_admin_bar() {
+	public function setup_admin_bar( $wp_admin_nav = array() ) {
 		global $bp;
 
 		// Prevent debug notices
@@ -545,6 +545,16 @@ class BP_Groups_Component extends BP_Component {
 				'title'  => $pending,
 				'href'   => trailingslashit( $groups_link . 'invites' )
 			);
+
+			// Create a Group
+			if ( bp_user_can_create_groups() ) {
+				$wp_admin_nav[] = array(
+					'parent' => 'my-account-' . $this->id,
+					'id'     => 'my-account-' . $this->id . '-create',
+					'title'  => __( 'Create a Group', 'buddypress' ),
+					'href'   => trailingslashit( bp_get_groups_directory_permalink() . 'create' )
+				);
+			}
 		}
 
 		parent::setup_admin_bar( $wp_admin_nav );
diff --git a/wp-content/plugins/buddypress/bp-groups/bp-groups-screens.php b/wp-content/plugins/buddypress/bp-groups/bp-groups-screens.php
index 634dc9e8fdb9927dd70860f62d8511487d0dac6d..7d83ad923d34ef4cf1c1d0110b4582348770a6f2 100644
--- a/wp-content/plugins/buddypress/bp-groups/bp-groups-screens.php
+++ b/wp-content/plugins/buddypress/bp-groups/bp-groups-screens.php
@@ -466,7 +466,7 @@ function groups_screen_group_request_membership() {
 
 	if ( 'private' != $bp->groups->current_group->status )
 		return false;
-	
+
 	// If the user has submitted a request, send it.
 	if ( isset( $_POST['group-request-send']) ) {
 
@@ -523,7 +523,9 @@ function groups_screen_group_admin_edit_details() {
 			if ( !check_admin_referer( 'groups_edit_group_details' ) )
 				return false;
 
-			if ( !groups_edit_base_group_details( $_POST['group-id'], $_POST['group-name'], $_POST['group-desc'], (int) $_POST['group-notify-members'] ) ) {
+			$group_notify_members = isset( $_POST['group-notify-members'] ) ? (int) $_POST['group-notify-members'] : 0;
+
+			if ( !groups_edit_base_group_details( $_POST['group-id'], $_POST['group-name'], $_POST['group-desc'], $group_notify_members ) ) {
 				bp_core_add_message( __( 'There was an error updating group details, please try again.', 'buddypress' ), 'error' );
 			} else {
 				bp_core_add_message( __( 'Group details were successfully updated.', 'buddypress' ) );
@@ -969,16 +971,19 @@ class BP_Groups_Theme_Compat {
 
 			do_action( 'groups_directory_groups_setup' );
 
+			add_filter( 'bp_get_buddypress_template',                array( $this, 'directory_template_hierarchy' ) );
 			add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'directory_dummy_post' ) );
 			add_filter( 'bp_replace_the_content',                    array( $this, 'directory_content'    ) );
 
 		// Creating a group
 		} elseif ( bp_is_groups_component() && bp_is_current_action( 'create' ) ) {
+			add_filter( 'bp_get_buddypress_template',                array( $this, 'create_template_hierarchy' ) );
 			add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'create_dummy_post' ) );
 			add_filter( 'bp_replace_the_content',                    array( $this, 'create_content'    ) );
 
-		// Group admin
+		// Group page
 		} elseif ( bp_is_single_item() ) {
+			add_filter( 'bp_get_buddypress_template',                array( $this, 'single_template_hierarchy' ) );
 			add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'single_dummy_post' ) );
 			add_filter( 'bp_replace_the_content',                    array( $this, 'single_content'    ) );
 
@@ -987,6 +992,29 @@ class BP_Groups_Theme_Compat {
 
 	/** Directory *************************************************************/
 
+	/**
+	 * Add template hierarchy to theme compat for the group directory page.
+	 *
+	 * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
+	 *
+	 * @since BuddyPress (1.8)
+	 *
+	 * @param string $templates The templates from bp_get_theme_compat_templates()
+	 * @return array $templates Array of custom templates to look for.
+	 */
+	public function directory_template_hierarchy( $templates ) {
+		// Setup our templates based on priority
+		$new_templates = apply_filters( 'bp_template_hierarchy_groups_directory', array(
+			'groups/index-directory.php'
+		) );
+
+		// Merge new templates with existing stack
+		// @see bp_get_theme_compat_templates()
+		$templates = array_merge( (array) $new_templates, $templates );
+
+		return $templates;
+	}
+
 	/**
 	 * Update the global $post with directory data
 	 *
@@ -1025,6 +1053,29 @@ class BP_Groups_Theme_Compat {
 
 	/** Create ****************************************************************/
 
+	/**
+	 * Add custom template hierarchy to theme compat for the group create page.
+	 *
+	 * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
+	 *
+	 * @since BuddyPress (1.8)
+	 *
+	 * @param string $templates The templates from bp_get_theme_compat_templates()
+	 * @return array $templates Array of custom templates to look for.
+	 */
+	public function create_template_hierarchy( $templates ) {
+		// Setup our templates based on priority
+		$new_templates = apply_filters( 'bp_template_hierarchy_groups_create', array(
+			'groups/index-create.php'
+		) );
+
+		// Merge new templates with existing stack
+		// @see bp_get_theme_compat_templates()
+		$templates = array_merge( $new_templates, $templates );
+
+		return $templates;
+	}
+
 	/**
 	 * Update the global $post with create screen data
 	 *
@@ -1063,6 +1114,36 @@ class BP_Groups_Theme_Compat {
 
 	/** Single ****************************************************************/
 
+	/**
+	 * Add custom template hierarchy to theme compat for group pages. 
+	 *
+	 * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
+	 *
+	 * @since BuddyPress (1.8)
+	 *
+	 * @param string $templates The templates from bp_get_theme_compat_templates()
+	 * @return array $templates Array of custom templates to look for.
+	 */
+	public function single_template_hierarchy( $templates ) {
+		// Setup some variables we're going to reference in our custom templates
+		$group = groups_get_current_group();
+
+		// Setup our templates based on priority
+		$new_templates = apply_filters( 'bp_template_hierarchy_groups_single_item', array(
+			'groups/single/index-id-'     . sanitize_file_name( bp_get_current_group_id() )   . '.php',
+			'groups/single/index-slug-'   . sanitize_file_name( bp_get_current_group_slug() ) . '.php',
+			'groups/single/index-action-' . sanitize_file_name( bp_current_action() )         . '.php',
+			'groups/single/index-status-' . sanitize_file_name( $group->status )              . '.php',
+			'groups/single/index.php'
+		) );
+
+		// Merge new templates with existing stack
+		// @see bp_get_theme_compat_templates()
+		$templates = array_merge( (array) $new_templates, $templates );
+
+		return $templates;
+	}
+
 	/**
 	 * Update the global $post with single group data
 	 *
diff --git a/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php b/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php
index ec625c1ca67daeb241bb1716022fa63b273ef59b..fddd3086ae6c5063039b6efcd626fd2708436044 100644
--- a/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php
+++ b/wp-content/plugins/buddypress/bp-groups/bp-groups-template.php
@@ -144,6 +144,7 @@ class BP_Groups_Template {
 			'include'         => false,
 			'exclude'         => false,
 			'search_terms'    => '',
+			'meta_query'      => false,
 			'populate_extras' => true
 		);
 
@@ -165,10 +166,13 @@ class BP_Groups_Template {
 		} else {
 			$this->groups = groups_get_groups( array(
 				'type'            => $type,
+				'order'           => $order,
+				'orderby'         => $orderby,
 				'per_page'        => $this->pag_num,
 				'page'            => $this->pag_page,
 				'user_id'         => $user_id,
 				'search_terms'    => $search_terms,
+				'meta_query'      => $meta_query,
 				'include'         => $include,
 				'exclude'         => $exclude,
 				'populate_extras' => $populate_extras,
@@ -264,6 +268,17 @@ class BP_Groups_Template {
 	}
 }
 
+/**
+ * Start the Groups Template Loop
+ *
+ * See the $defaults definition below for a description of parameters.
+ *
+ * Note that the 'type' parameter overrides 'order' and 'orderby'. See
+ * BP_Groups_Group::get() for more details.
+ *
+ * @param array $args
+ * @return bool True if there are groups to display that match the params
+ */
 function bp_has_groups( $args = '' ) {
 	global $groups_template, $bp;
 
@@ -273,7 +288,7 @@ function bp_has_groups( $args = '' ) {
 	 * pass their parameters directly to the loop.
 	 */
 	$slug    = false;
-	$type    = 'active';
+	$type    = '';
 	$user_id = 0;
 	$order   = '';
 
@@ -282,6 +297,7 @@ function bp_has_groups( $args = '' ) {
 		$user_id = bp_displayed_user_id();
 
 	// Type
+	// @todo What is $order? At some point it was removed incompletely?
 	if ( bp_is_current_action( 'my-groups' ) ) {
 		if ( 'most-popular' == $order ) {
 			$type = 'popular';
@@ -296,7 +312,9 @@ function bp_has_groups( $args = '' ) {
 	}
 
 	$defaults = array(
-		'type'            => $type,
+		'type'            => $type, // 'type' is an override for 'order' and 'orderby'. See docblock.
+		'order'           => 'DESC',
+		'orderby'         => 'last_activity',
 		'page'            => 1,
 		'per_page'        => 20,
 		'max'             => false,
@@ -307,10 +325,11 @@ function bp_has_groups( $args = '' ) {
 		'user_id'         => $user_id, // Pass a user ID to limit to groups this user has joined
 		'slug'            => $slug,    // Pass a group slug to only return that group
 		'search_terms'    => '',       // Pass search terms to return only matching groups
+		'meta_query'      => false,    // Filter by groupmeta. See WP_Meta_Query for format
 		'include'         => false,    // Pass comma separated list or array of group ID's to return only these groups
 		'exclude'         => false,    // Pass comma separated list or array of group ID's to exclude these groups
 
-		'populate_extras' => true      // Get extra meta - is_member, is_banned
+		'populate_extras' => true,     // Get extra meta - is_member, is_banned
 	);
 
 	$r = wp_parse_args( $args, $defaults );
@@ -326,6 +345,8 @@ function bp_has_groups( $args = '' ) {
 
 	$groups_template = new BP_Groups_Template( array(
 		'type'            => $r['type'],
+		'order'           => $r['order'],
+		'orderby'         => $r['orderby'],
 		'page'            => (int) $r['page'],
 		'per_page'        => (int) $r['per_page'],
 		'max'             => (int) $r['max'],
@@ -334,6 +355,7 @@ function bp_has_groups( $args = '' ) {
 		'user_id'         => (int) $r['user_id'],
 		'slug'            => $r['slug'],
 		'search_terms'    => $r['search_terms'],
+		'meta_query'      => $r['meta_query'],
 		'include'         => $r['include'],
 		'exclude'         => $r['exclude'],
 		'populate_extras' => (bool) $r['populate_extras']
@@ -651,30 +673,30 @@ function bp_group_date_created( $group = false ) {
 
 		return apply_filters( 'bp_get_group_date_created', bp_core_time_since( strtotime( $group->date_created ) ) );
 	}
-	
+
 function bp_group_creator_username( $group = false ) {
 	echo bp_get_group_creator_username( $group );
 }
 	function bp_get_group_creator_username( $group = false ) {
 		global $groups_template;
-		
+
 		if ( empty( $group ) )
 			$group =& $groups_template->group;
-		
+
 		return apply_filters( 'bp_get_group_creator_username', bp_core_get_user_displayname( $group->creator_id ) );
-	}	
+	}
 
 function bp_group_creator_id( $group = false ) {
 	echo bp_get_group_creator_id( $group );
 }
 	function bp_get_group_creator_id( $group = false ) {
 		global $groups_template;
-		
+
 		if ( empty( $group ) )
 			$group =& $groups_template->group;
-		
+
 		return apply_filters( 'bp_get_group_creator_id', $group->creator_id );
-	}	
+	}
 
 function bp_group_creator_permalink( $group = false ) {
 	echo bp_get_group_creator_permalink( $group );
@@ -686,14 +708,14 @@ function bp_group_creator_permalink( $group = false ) {
 			$group =& $groups_template->group;
 
 		return apply_filters( 'bp_get_group_creator_permalink', bp_core_get_user_domain( $group->creator_id ) );
-	}	
+	}
 
 function bp_is_group_creator( $group = false, $user_id = 0 ) {
 	global $groups_template;
-	
+
 	if ( empty( $group ) )
 		$group =& $groups_template->group;
-	
+
 	if ( empty( $user_id ) )
 		$user_id = bp_loggedin_user_id();
 
@@ -726,7 +748,7 @@ function bp_group_creator_avatar( $group = false, $args = array() ) {
 		return apply_filters( 'bp_get_group_creator_avatar', $avatar );
 	}
 
-		
+
 function bp_group_is_admin() {
 	return bp_is_item_admin();
 }
@@ -789,8 +811,8 @@ function bp_group_list_mods( $group = false ) {
  * @package BuddyPress
  * @since BuddyPress (1.5)
  *
- * @param obj $group (optional) The group being queried. Defaults to the current group in the loop
- * @param str $format 'string' to get a comma-separated string, 'array' to get an array
+ * @param BP_Groups_Group $group (optional) The group being queried. Defaults to the current group in the loop
+ * @param string $format 'string' to get a comma-separated string, 'array' to get an array
  * @return mixed $admin_ids A string or array of user_ids
  */
 function bp_group_admin_ids( $group = false, $format = 'string' ) {
@@ -819,8 +841,8 @@ function bp_group_admin_ids( $group = false, $format = 'string' ) {
  * @package BuddyPress
  * @since BuddyPress (1.5)
  *
- * @param obj $group (optional) The group being queried. Defaults to the current group in the loop
- * @param str $format 'string' to get a comma-separated string, 'array' to get an array
+ * @param BP_Groups_Group $group (optional) The group being queried. Defaults to the current group in the loop
+ * @param string $format 'string' to get a comma-separated string, 'array' to get an array
  * @return mixed $mod_ids A string or array of user_ids
  */
 function bp_group_mod_ids( $group = false, $format = 'string' ) {
@@ -1059,8 +1081,8 @@ function bp_group_show_status_setting( $setting, $group = false ) {
  * @subpackage Groups Template
  * @since BuddyPress (1.5)
  *
- * @param str $setting The setting you want to check against ('members', 'mods', or 'admins')
- * @param obj $group (optional) The group whose status you want to check
+ * @param string $setting The setting you want to check against ('members', 'mods', or 'admins')
+ * @param BP_Groups_Group $group (optional) The group whose status you want to check
  */
 function bp_group_show_invite_status_setting( $setting, $group = false ) {
 	$group_id = isset( $group->id ) ? $group->id : false;
@@ -1650,7 +1672,7 @@ function bp_has_friends_to_invite( $group = false ) {
  *
  * @since BuddyPress (1.2.7)
  *
- * @param obj|bool $group The BP Groups_Group object if passed, boolean false if not passed.
+ * @param BP_Groups_Group|bool $group The BP Groups_Group object if passed, boolean false if not passed.
  * @uses bp_get_group_new_topic_button() Returns the 'New Topic' button
  */
 function bp_group_new_topic_button( $group = false ) {
@@ -1661,13 +1683,13 @@ function bp_group_new_topic_button( $group = false ) {
 	 *
 	 * @since BuddyPress (1.2.7)
 	 *
-	 * @param obj|bool $group The BP Groups_Group object if passed, boolean false if not passed.
+	 * @param BP_Groups_Group|bool $group The BP Groups_Group object if passed, boolean false if not passed.
 	 * @uses is_user_logged_in() Is there a user logged in?
 	 * @uses bp_group_is_user_banned() Is the current user banned from the current group?
 	 * @uses bp_is_group_forum() Are we on a group forum page?
 	 * @uses bp_is_group_forum_topic() Are we on a group topic page?
 	 * @uses bp_get_button() Renders a button
-	 * @return HTML code for the button
+	 * @return string HTML code for the button
 	 */
 	function bp_get_group_new_topic_button( $group = false ) {
 		global $groups_template;
@@ -1875,11 +1897,11 @@ class BP_Groups_Group_Members_Template {
 	var $pag_links;
 	var $total_group_count;
 
-	function __construct( $group_id, $per_page, $max, $exclude_admins_mods, $exclude_banned, $exclude ) {
+	function __construct( $group_id, $per_page, $max, $exclude_admins_mods, $exclude_banned, $exclude, $group_role = false ) {
 
 		$this->pag_page = isset( $_REQUEST['mlpage'] ) ? intval( $_REQUEST['mlpage'] ) : 1;
 		$this->pag_num  = isset( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : $per_page;
-		$this->members  = BP_Groups_Member::get_all_for_group( $group_id, $this->pag_num, $this->pag_page, $exclude_admins_mods, $exclude_banned, $exclude );
+		$this->members  = groups_get_group_members( $group_id, $this->pag_num, $this->pag_page, $exclude_admins_mods, $exclude_banned, $exclude, $group_role );
 
 		if ( !$max || $max >= (int) $this->members['count'] )
 			$this->total_member_count = (int) $this->members['count'];
@@ -1955,19 +1977,17 @@ class BP_Groups_Group_Members_Template {
 function bp_group_has_members( $args = '' ) {
 	global $members_template;
 
-	$defaults = array(
+	$r = wp_parse_args( $args, array(
 		'group_id' => bp_get_current_group_id(),
 		'per_page' => 20,
 		'max' => false,
 		'exclude' => false,
 		'exclude_admins_mods' => 1,
-		'exclude_banned' => 1
-	);
-
-	$r = wp_parse_args( $args, $defaults );
-	extract( $r, EXTR_SKIP );
+		'exclude_banned' => 1,
+		'group_role' => false,
+	) );
 
-	$members_template = new BP_Groups_Group_Members_Template( $group_id, $per_page, $max, (int) $exclude_admins_mods, (int) $exclude_banned, $exclude );
+	$members_template = new BP_Groups_Group_Members_Template( $r['group_id'], $r['per_page'], $r['max'], (int) $r['exclude_admins_mods'], (int) $r['exclude_banned'], $r['exclude'], $r['group_role'] );
 	return apply_filters( 'bp_group_has_members', $members_template->has_members(), $members_template );
 }
 
@@ -2396,7 +2416,7 @@ function bp_groups_current_create_step() {
 	 * @since BuddyPress (1.6)
 	 *
 	 * @uses apply_filters() Filter bp_get_groups_current_create_step to modify
-	 * @return str $current_create_step
+	 * @return string $current_create_step
 	 */
 	function bp_get_groups_current_create_step() {
 		global $bp;
@@ -2562,7 +2582,7 @@ function bp_group_current_admin_tab() {
 	 * @since BuddyPress (1.6)
 	 *
 	 * @uses apply_filters() Filter bp_get_current_group_admin_tab to modify return value
-	 * @return str $tab The current tab's slug
+	 * @return string $tab The current tab's slug
 	 */
 	function bp_get_group_current_admin_tab() {
 		if ( bp_is_groups_component() && bp_is_current_action( 'admin' ) ) {
@@ -3020,7 +3040,7 @@ function bp_current_group_slug() {
 	 * @since BuddyPress (1.5)
 	 * @uses apply_filters() Filter bp_get_current_group_slug to modify this output
 	 *
-	 * @return str $current_group_slug The slug of the current group, if there is one
+	 * @return string $current_group_slug The slug of the current group, if there is one
 	 */
 	function bp_get_current_group_slug() {
 		$current_group = groups_get_current_group();
@@ -3045,7 +3065,7 @@ function bp_current_group_name() {
 	 * @since BuddyPress (1.5)
 	 * @uses apply_filters() Filter bp_get_current_group_name to modify this output
 	 *
-	 * @return str The name of the current group, if there is one
+	 * @return string The name of the current group, if there is one
 	 */
 	function bp_get_current_group_name() {
 		global $bp;
diff --git a/wp-content/plugins/buddypress/bp-groups/bp-groups-widgets.php b/wp-content/plugins/buddypress/bp-groups/bp-groups-widgets.php
index 2a264e21b03c9856b54392f6d1fb52ebcf6db69a..7b40d0b556030d3ccc155931410c11f4a8077b4c 100644
--- a/wp-content/plugins/buddypress/bp-groups/bp-groups-widgets.php
+++ b/wp-content/plugins/buddypress/bp-groups/bp-groups-widgets.php
@@ -26,7 +26,7 @@ class BP_Groups_Widget extends WP_Widget {
 	function __construct() {
 		$widget_ops = array(
 			'description' => __( 'A dynamic list of recently active, popular, and newest groups', 'buddypress' ),
-			'classname' => 'widget_bp_groups_widget buddypress',
+			'classname' => 'widget_bp_groups_widget buddypress widget',
 		);
 		parent::__construct( false, _x( '(BuddyPress) Groups', 'widget name', 'buddypress' ), $widget_ops );
 
@@ -47,17 +47,19 @@ class BP_Groups_Widget extends WP_Widget {
 		if ( empty( $instance['title'] ) )
 			$instance['title'] = __( 'Groups', 'buddypress' );
 
+		$title = apply_filters( 'widget_title', $instance['title'] );
+
 		echo $before_widget;
 
-		$title = !empty( $instance['link_title'] ) ? '<a href="' . trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() ) . '">' . $instance['title'] . '</a>' : $instance['title'];
+		$title = !empty( $instance['link_title'] ) ? '<a href="' . trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() ) . '">' . $title . '</a>' : $title;
 
 		echo $before_title . $title . $after_title; ?>
 
 		<?php if ( bp_has_groups( 'user_id=' . $user_id . '&type=' . $instance['group_default'] . '&max=' . $instance['max_groups'] ) ) : ?>
 			<div class="item-options" id="groups-list-options">
-				<a href="<?php echo site_url( bp_get_groups_root_slug() ); ?>" id="newest-groups"<?php if ( $instance['group_default'] == 'newest' ) : ?> class="selected"<?php endif; ?>><?php _e("Newest", 'buddypress') ?></a> |
-				<a href="<?php echo site_url( bp_get_groups_root_slug() ); ?>" id="recently-active-groups"<?php if ( $instance['group_default'] == 'active' ) : ?> class="selected"<?php endif; ?>><?php _e("Active", 'buddypress') ?></a> |
-				<a href="<?php echo site_url( bp_get_groups_root_slug() ); ?>" id="popular-groups" <?php if ( $instance['group_default'] == 'popular' ) : ?> class="selected"<?php endif; ?>><?php _e("Popular", 'buddypress') ?></a>
+				<a href="<?php bp_groups_directory_permalink(); ?>" id="newest-groups"<?php if ( $instance['group_default'] == 'newest' ) : ?> class="selected"<?php endif; ?>><?php _e("Newest", 'buddypress') ?></a> |
+				<a href="<?php bp_groups_directory_permalink(); ?>" id="recently-active-groups"<?php if ( $instance['group_default'] == 'active' ) : ?> class="selected"<?php endif; ?>><?php _e("Active", 'buddypress') ?></a> |
+				<a href="<?php bp_groups_directory_permalink(); ?>" id="popular-groups" <?php if ( $instance['group_default'] == 'popular' ) : ?> class="selected"<?php endif; ?>><?php _e("Popular", 'buddypress') ?></a>
 			</div>
 
 			<ul id="groups-list" class="item-list">
diff --git a/wp-content/plugins/buddypress/bp-languages/buddypress.pot b/wp-content/plugins/buddypress/bp-languages/buddypress.pot
index 2a6dc3d8aaa5c09f6637aae3c75624322018e0d4..0ee6edbad17fab65f5c76b9f8ee15ae1b01a5095 100644
--- a/wp-content/plugins/buddypress/bp-languages/buddypress.pot
+++ b/wp-content/plugins/buddypress/bp-languages/buddypress.pot
@@ -4,7 +4,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: BuddyPress \n"
 "Report-Msgid-Bugs-To: http://wppolyglots.wordpress.com\n"
-"POT-Creation-Date: 2013-05-15 18:35:23+00:00\n"
+"POT-Creation-Date: 2013-07-27 18:35:29+00:00\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -12,77 +12,129 @@ msgstr ""
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 
-#: bp-activity/bp-activity-actions.php:158
+#: bp-activity/bp-activity-actions.php:157
 msgid "Activity deleted successfully"
 msgstr ""
 
-#: bp-activity/bp-activity-actions.php:160
+#: bp-activity/bp-activity-actions.php:159
 msgid "There was an error when deleting that activity"
 msgstr ""
 
-#: bp-activity/bp-activity-actions.php:214
+#: bp-activity/bp-activity-actions.php:213
 msgid "The activity item has been marked as spam and is no longer visible."
 msgstr ""
 
-#: bp-activity/bp-activity-actions.php:263
-#: bp-templates/bp-legacy/buddypress-functions.php:554
-#: bp-themes/bp-default/_inc/ajax.php:263
+#: bp-activity/bp-activity-actions.php:262
+#: bp-templates/bp-legacy/buddypress-functions.php:621
+#: bp-themes/bp-default/_inc/ajax.php:276
 msgid "Please enter some content to post."
 msgstr ""
 
-#: bp-activity/bp-activity-actions.php:284
+#: bp-activity/bp-activity-actions.php:283
 msgid "Update Posted!"
 msgstr ""
 
-#: bp-activity/bp-activity-actions.php:286
+#: bp-activity/bp-activity-actions.php:285
 msgid "There was an error when posting your update, please try again."
 msgstr ""
 
-#: bp-activity/bp-activity-actions.php:323
-#: bp-templates/bp-legacy/buddypress-functions.php:602
-#: bp-themes/bp-default/_inc/ajax.php:311
+#: bp-activity/bp-activity-actions.php:322
+#: bp-templates/bp-legacy/buddypress-functions.php:669
+#: bp-themes/bp-default/_inc/ajax.php:324
 msgid "Please do not leave the comment area blank."
 msgstr ""
 
-#: bp-activity/bp-activity-actions.php:334
+#: bp-activity/bp-activity-actions.php:333
 msgid "Reply Posted!"
 msgstr ""
 
-#: bp-activity/bp-activity-actions.php:336
-#: bp-templates/bp-legacy/buddypress-functions.php:605
-#: bp-templates/bp-legacy/buddypress-functions.php:614
-#: bp-themes/bp-default/_inc/ajax.php:314
-#: bp-themes/bp-default/_inc/ajax.php:323
+#: bp-activity/bp-activity-actions.php:335
+#: bp-templates/bp-legacy/buddypress-functions.php:672
+#: bp-templates/bp-legacy/buddypress-functions.php:681
+#: bp-themes/bp-default/_inc/ajax.php:327
+#: bp-themes/bp-default/_inc/ajax.php:336
 msgid "There was an error posting that reply, please try again."
 msgstr ""
 
-#: bp-activity/bp-activity-actions.php:368
+#: bp-activity/bp-activity-actions.php:367
 msgid "Activity marked as favorite."
 msgstr ""
 
-#: bp-activity/bp-activity-actions.php:370
+#: bp-activity/bp-activity-actions.php:369
 msgid "There was an error marking that activity as a favorite, please try again."
 msgstr ""
 
-#: bp-activity/bp-activity-actions.php:402
+#: bp-activity/bp-activity-actions.php:401
 msgid "Activity removed as favorite."
 msgstr ""
 
-#: bp-activity/bp-activity-actions.php:404
+#: bp-activity/bp-activity-actions.php:403
 msgid "There was an error removing that activity as a favorite, please try again."
 msgstr ""
 
-#. translators: Personal activity RSS title - "[Site Name] | [Displayed User
+#. translators: Sitewide activity RSS title - "[Site Name] | Site Wide
+#. Activity"
+
+#: bp-activity/bp-activity-actions.php:434
+msgid "%s | Site Wide Activity"
+msgstr ""
+
+#: bp-activity/bp-activity-actions.php:437
+msgid "Activity feed for the entire site."
+msgstr ""
+
+#. translators: Personal activity RSS title - "[Site Name] | [User Display
 #. Name] | Activity"
+#. translators: Group activity RSS title - "[Site Name] | [Group Name] |
+#. Activity"
+
+#: bp-activity/bp-activity-actions.php:465 bp-groups/bp-groups-actions.php:331
+msgid "%1$s | %2$s | Activity"
+msgstr ""
+
+#: bp-activity/bp-activity-actions.php:468
+msgid "Activity feed for %s."
+msgstr ""
+
+#. translators: Friends activity RSS title - "[Site Name] | [User Display Name]
+#. | Friends Activity"
+
+#: bp-activity/bp-activity-actions.php:499
+msgid "%1$s | %2$s | Friends Activity"
+msgstr ""
+
+#: bp-activity/bp-activity-actions.php:502
+msgid "Activity feed for %s's friends."
+msgstr ""
+
+#. translators: Member groups activity RSS title - "[Site Name] | [User Display
+#. Name] | Groups Activity"
+
+#: bp-activity/bp-activity-actions.php:537
+msgid "%1$s | %2$s | Group Activity"
+msgstr ""
+
+#: bp-activity/bp-activity-actions.php:540
+msgid "Public group activity feed of which %s is a member of."
+msgstr ""
+
+#. translators: User activity favorites RSS title - "[Site Name] | [User
+#. Display Name] | Favorites"
+
+#: bp-activity/bp-activity-actions.php:608
+msgid "%1$s | %2$s | Favorites"
+msgstr ""
+
+#: bp-activity/bp-activity-actions.php:611
+msgid "Activity feed of %s's favorites."
+msgstr ""
 
 #: bp-activity/bp-activity-admin.php:35 bp-activity/bp-activity-admin.php:36
 #: bp-activity/bp-activity-admin.php:852 bp-activity/bp-activity-admin.php:1167
 #: bp-activity/bp-activity-loader.php:118
-#: bp-activity/bp-activity-loader.php:242
-#: bp-activity/bp-activity-screens.php:278
-#: bp-activity/bp-activity-screens.php:394
-#: bp-activity/feeds/bp-activity-personal-feed.php:27
-#: bp-core/bp-core-admin.php:409
+#: bp-activity/bp-activity-loader.php:246
+#: bp-activity/bp-activity-screens.php:284
+#: bp-activity/bp-activity-screens.php:451 bp-core/bp-core-admin.php:409
 msgid "Activity"
 msgstr ""
 
@@ -95,10 +147,10 @@ msgid "ERROR: The item you are trying to reply to cannot be found, or it has bee
 msgstr ""
 
 #: bp-activity/bp-activity-admin.php:197 bp-activity/bp-activity-admin.php:244
-#: bp-core/admin/bp-core-functions.php:402
-#: bp-core/admin/bp-core-functions.php:420
-#: bp-core/admin/bp-core-functions.php:439
-#: bp-core/admin/bp-core-functions.php:458 bp-groups/bp-groups-admin.php:107
+#: bp-core/admin/bp-core-functions.php:412
+#: bp-core/admin/bp-core-functions.php:430
+#: bp-core/admin/bp-core-functions.php:449
+#: bp-core/admin/bp-core-functions.php:468 bp-groups/bp-groups-admin.php:107
 #: bp-groups/bp-groups-admin.php:143
 msgid "Overview"
 msgstr ""
@@ -136,10 +188,10 @@ msgid "For information about when and how BuddyPress uses all of these settings,
 msgstr ""
 
 #: bp-activity/bp-activity-admin.php:216 bp-activity/bp-activity-admin.php:261
-#: bp-core/admin/bp-core-functions.php:408
-#: bp-core/admin/bp-core-functions.php:426
-#: bp-core/admin/bp-core-functions.php:445
-#: bp-core/admin/bp-core-functions.php:464 bp-groups/bp-groups-admin.php:115
+#: bp-core/admin/bp-core-functions.php:418
+#: bp-core/admin/bp-core-functions.php:436
+#: bp-core/admin/bp-core-functions.php:455
+#: bp-core/admin/bp-core-functions.php:474 bp-groups/bp-groups-admin.php:115
 #: bp-groups/bp-groups-admin.php:159
 msgid "For more information:"
 msgstr ""
@@ -149,10 +201,10 @@ msgid "<a href=\"http://codex.buddypress.org/buddypress-site-administration/mana
 msgstr ""
 
 #: bp-activity/bp-activity-admin.php:218 bp-activity/bp-activity-admin.php:262
-#: bp-core/admin/bp-core-functions.php:410
-#: bp-core/admin/bp-core-functions.php:428
-#: bp-core/admin/bp-core-functions.php:447
-#: bp-core/admin/bp-core-functions.php:466 bp-groups/bp-groups-admin.php:160
+#: bp-core/admin/bp-core-functions.php:420
+#: bp-core/admin/bp-core-functions.php:438
+#: bp-core/admin/bp-core-functions.php:457
+#: bp-core/admin/bp-core-functions.php:476 bp-groups/bp-groups-admin.php:160
 msgid "<a href=\"http://buddypress.org/support/\">Support Forums</a>"
 msgstr ""
 
@@ -247,8 +299,8 @@ msgid "Submitted on: <strong>%1$s</strong>"
 msgstr ""
 
 #: bp-activity/bp-activity-admin.php:665 bp-activity/bp-activity-admin.php:1281
-#: bp-forums/bp-forums-template.php:1270 bp-groups/bp-groups-admin.php:1248
-#: bp-themes/bp-default/functions.php:507 bp-xprofile/bp-xprofile-admin.php:456
+#: bp-forums/bp-forums-template.php:1270 bp-groups/bp-groups-admin.php:1338
+#: bp-themes/bp-default/functions.php:509 bp-xprofile/bp-xprofile-admin.php:456
 #: bp-xprofile/bp-xprofile-loader.php:185
 #: bp-xprofile/bp-xprofile-loader.php:245
 msgid "Edit"
@@ -322,7 +374,7 @@ msgstr ""
 msgid "Activity related to ID #%s"
 msgstr ""
 
-#: bp-activity/bp-activity-admin.php:856 bp-groups/bp-groups-admin.php:625
+#: bp-activity/bp-activity-admin.php:856 bp-groups/bp-groups-admin.php:630
 msgid "Search results for &#8220;%s&#8221;"
 msgstr ""
 
@@ -334,12 +386,12 @@ msgstr ""
 msgid "Reply to Activity"
 msgstr ""
 
-#: bp-activity/bp-activity-admin.php:884 bp-groups/bp-groups-admin.php:585
+#: bp-activity/bp-activity-admin.php:884 bp-groups/bp-groups-admin.php:586
 #: bp-templates/bp-legacy/buddypress/activity/entry.php:102
 #: bp-templates/bp-legacy/buddypress/forums/index.php:116
 #: bp-themes/bp-default/forums/index.php:134
 #: bp-xprofile/bp-xprofile-classes.php:406
-#: bp-xprofile/bp-xprofile-classes.php:929
+#: bp-xprofile/bp-xprofile-classes.php:928
 msgid "Cancel"
 msgstr ""
 
@@ -355,7 +407,7 @@ msgstr ""
 msgid "No activities found."
 msgstr ""
 
-#: bp-activity/bp-activity-admin.php:1133 bp-groups/bp-groups-admin.php:1138
+#: bp-activity/bp-activity-admin.php:1133 bp-groups/bp-groups-admin.php:1219
 #: bp-messages/bp-messages-template.php:434
 msgid "All"
 msgstr ""
@@ -374,7 +426,7 @@ msgid "Not Spam"
 msgstr ""
 
 #: bp-activity/bp-activity-admin.php:1151
-#: bp-activity/bp-activity-admin.php:1291 bp-groups/bp-groups-admin.php:584
+#: bp-activity/bp-activity-admin.php:1291 bp-groups/bp-groups-admin.php:585
 msgid "Delete Permanently"
 msgstr ""
 
@@ -394,6 +446,10 @@ msgstr ""
 msgid "Filter"
 msgstr ""
 
+#: bp-activity/bp-activity-admin.php:1227
+msgid "Select activity item %1$d"
+msgstr ""
+
 #: bp-activity/bp-activity-admin.php:1291 bp-core/bp-core-cssjs.php:20
 msgid "Are you sure?"
 msgstr ""
@@ -464,53 +520,62 @@ msgid "<span>%1$s</span> &mdash; %2$s"
 msgstr ""
 
 #: bp-activity/bp-activity-classes.php:120
-#: bp-activity/bp-activity-template.php:120 bp-groups/bp-groups-classes.php:316
+#: bp-activity/bp-activity-template.php:120 bp-groups/bp-groups-classes.php:318
 #: bp-groups/bp-groups-template.php:114
 msgid "Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details."
 msgstr ""
 
-#: bp-activity/bp-activity-filters.php:348
+#: bp-activity/bp-activity-classes.php:844
+msgid "RSS feed 'id' must be defined"
+msgstr ""
+
+#: bp-activity/bp-activity-classes.php:941
+msgid "In reply to"
+msgstr ""
+
+#: bp-activity/bp-activity-filters.php:361
 msgid "[Read more]"
 msgstr ""
 
-#: bp-activity/bp-activity-filters.php:353
+#: bp-activity/bp-activity-filters.php:366
 msgid "&hellip;"
 msgstr ""
 
-#: bp-activity/bp-activity-functions.php:199
+#: bp-activity/bp-activity-functions.php:223
 msgid "@%s Mentions"
 msgstr ""
 
-#: bp-activity/bp-activity-functions.php:202
+#: bp-activity/bp-activity-functions.php:226
 msgid "You have %1$d new mentions"
 msgstr ""
 
-#: bp-activity/bp-activity-functions.php:206
+#: bp-activity/bp-activity-functions.php:230
 msgid "%1$s mentioned you"
 msgstr ""
 
-#: bp-activity/bp-activity-functions.php:843
+#: bp-activity/bp-activity-functions.php:867
 msgid "Posted a status update"
 msgstr ""
 
-#: bp-activity/bp-activity-functions.php:844
+#: bp-activity/bp-activity-functions.php:868
 msgid "Replied to a status update"
 msgstr ""
 
-#: bp-activity/bp-activity-functions.php:1092
+#: bp-activity/bp-activity-functions.php:1119
 msgid "%s posted an update"
 msgstr ""
 
-#: bp-activity/bp-activity-functions.php:1161
+#: bp-activity/bp-activity-functions.php:1188
+#: tests/testcases/activity/class.BP_Activity_Activity.php:202
 msgid "%s posted a new activity comment"
 msgstr ""
 
-#: bp-activity/bp-activity-functions.php:1536
+#: bp-activity/bp-activity-functions.php:1565
 msgid "Thumbnail"
 msgstr ""
 
 #: bp-activity/bp-activity-loader.php:30
-#: bp-core/admin/bp-core-components.php:372
+#: bp-core/admin/bp-core-components.php:371
 msgid "Activity Streams"
 msgstr ""
 
@@ -519,69 +584,65 @@ msgid "Search Activity..."
 msgstr ""
 
 #: bp-activity/bp-activity-loader.php:144
-#: bp-activity/bp-activity-loader.php:258
+#: bp-activity/bp-activity-loader.php:264
 msgid "Personal"
 msgstr ""
 
-#. translators: Mentions RSS title - "[Site Name] | [Displayed User Name] |
-#. Mentions"
-
-#: bp-activity/bp-activity-loader.php:154
-#: bp-activity/bp-activity-loader.php:235
-#: bp-activity/feeds/bp-activity-mentions-feed.php:27
-#: bp-templates/bp-legacy/buddypress/activity/index.php:57
-#: bp-themes/bp-default/activity/index.php:77
+#: bp-activity/bp-activity-loader.php:155
+#: bp-activity/bp-activity-loader.php:238
+#: bp-templates/bp-legacy/buddypress/activity/index.php:59
+#: bp-themes/bp-default/activity/index.php:79
 msgid "Mentions"
 msgstr ""
 
-#: bp-activity/bp-activity-loader.php:165
-#: bp-activity/bp-activity-loader.php:266
+#: bp-activity/bp-activity-loader.php:167
+#: bp-activity/bp-activity-loader.php:272
 msgid "Favorites"
 msgstr ""
 
-#: bp-activity/bp-activity-loader.php:177
-#: bp-activity/bp-activity-loader.php:275 bp-friends/bp-friends-loader.php:164
+#: bp-activity/bp-activity-loader.php:179
+#: bp-activity/bp-activity-loader.php:281 bp-friends/bp-friends-loader.php:164
 #: bp-friends/bp-friends-screens.php:83
 msgid "Friends"
 msgstr ""
 
-#: bp-activity/bp-activity-loader.php:190
-#: bp-activity/bp-activity-loader.php:285 bp-core/bp-core-template.php:246
+#: bp-activity/bp-activity-loader.php:192
+#: bp-activity/bp-activity-loader.php:291 bp-core/bp-core-template.php:246
 #: bp-groups/bp-groups-activity.php:150 bp-groups/bp-groups-activity.php:186
 #: bp-groups/bp-groups-activity.php:222 bp-groups/bp-groups-activity.php:258
 #: bp-groups/bp-groups-admin.php:35 bp-groups/bp-groups-admin.php:36
-#: bp-groups/bp-groups-admin.php:622 bp-groups/bp-groups-loader.php:517
-#: bp-groups/bp-groups-screens.php:893 bp-groups/bp-groups-screens.php:999
-#: bp-groups/bp-groups-screens.php:1001 bp-groups/bp-groups-screens.php:1037
-#: bp-groups/bp-groups-screens.php:1039 bp-groups/bp-groups-widgets.php:48
-#: bp-groups/bp-groups-widgets.php:117
+#: bp-groups/bp-groups-admin.php:623 bp-groups/bp-groups-loader.php:517
+#: bp-groups/bp-groups-screens.php:895 bp-groups/bp-groups-screens.php:1027
+#: bp-groups/bp-groups-screens.php:1029 bp-groups/bp-groups-screens.php:1088
+#: bp-groups/bp-groups-screens.php:1090 bp-groups/bp-groups-widgets.php:48
+#: bp-groups/bp-groups-widgets.php:119
 msgid "Groups"
 msgstr ""
 
-#: bp-activity/bp-activity-loader.php:233
+#: bp-activity/bp-activity-loader.php:236
 msgid "Mentions <span class=\"count\">%s</span>"
 msgstr ""
 
-#: bp-activity/bp-activity-loader.php:310
+#: bp-activity/bp-activity-loader.php:316
 msgid "My Activity"
 msgstr ""
 
-#: bp-activity/bp-activity-loader.php:315
-#: bp-activity/bp-activity-template.php:975
-#: bp-activity/bp-activity-template.php:1111
-#: bp-activity/bp-activity-template.php:1122 bp-blogs/bp-blogs-loader.php:209
-#: bp-forums/bp-forums-loader.php:212 bp-forums/bp-forums-template.php:487
+#: bp-activity/bp-activity-loader.php:321
+#: bp-activity/bp-activity-template.php:985
+#: bp-activity/bp-activity-template.php:1121
+#: bp-activity/bp-activity-template.php:1132 bp-blogs/bp-blogs-loader.php:218
+#: bp-forums/bp-forums-loader.php:218 bp-forums/bp-forums-template.php:487
 #: bp-forums/bp-forums-template.php:604 bp-forums/bp-forums-template.php:1200
-#: bp-friends/bp-friends-loader.php:212 bp-groups/bp-groups-loader.php:572
-#: bp-groups/bp-groups-template.php:748 bp-groups/bp-groups-template.php:771
-#: bp-groups/bp-groups-template.php:1200 bp-groups/bp-groups-template.php:1216
-#: bp-groups/bp-groups-template.php:1265 bp-groups/bp-groups-template.php:1281
-#: bp-groups/bp-groups-template.php:1992 bp-groups/bp-groups-template.php:2001
-#: bp-groups/bp-groups-template.php:2010 bp-groups/bp-groups-template.php:2758
+#: bp-friends/bp-friends-loader.php:212 bp-groups/bp-groups-loader.php:582
+#: bp-groups/bp-groups-template.php:770 bp-groups/bp-groups-template.php:793
+#: bp-groups/bp-groups-template.php:1222 bp-groups/bp-groups-template.php:1238
+#: bp-groups/bp-groups-template.php:1287 bp-groups/bp-groups-template.php:1303
+#: bp-groups/bp-groups-template.php:2012 bp-groups/bp-groups-template.php:2021
+#: bp-groups/bp-groups-template.php:2030 bp-groups/bp-groups-template.php:2778
 #: bp-members/bp-members-buddybar.php:90 bp-members/bp-members-loader.php:198
-#: bp-members/bp-members-template.php:519
-#: bp-members/bp-members-template.php:819
-#: bp-members/bp-members-template.php:838
+#: bp-members/bp-members-template.php:520
+#: bp-members/bp-members-template.php:820
+#: bp-members/bp-members-template.php:839
 #: bp-messages/bp-messages-loader.php:264
 #: bp-messages/bp-messages-template.php:326
 #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:185
@@ -666,76 +727,72 @@ msgstr ""
 msgid "You do not have access to this activity."
 msgstr ""
 
-#: bp-activity/bp-activity-screens.php:279 bp-blogs/bp-blogs-template.php:683
-#: bp-friends/bp-friends-screens.php:84 bp-groups/bp-groups-screens.php:894
+#: bp-activity/bp-activity-screens.php:285 bp-blogs/bp-blogs-template.php:683
+#: bp-friends/bp-friends-screens.php:84 bp-groups/bp-groups-screens.php:896
 #: bp-messages/bp-messages-screens.php:169
-#: bp-templates/bp-legacy/buddypress/groups/single/admin.php:26
 #: bp-templates/bp-legacy/buddypress/members/register.php:223
-#: bp-themes/bp-default/groups/single/admin.php:26
 #: bp-themes/bp-default/registration/register.php:228
 msgid "Yes"
 msgstr ""
 
-#: bp-activity/bp-activity-screens.php:280 bp-blogs/bp-blogs-template.php:687
-#: bp-friends/bp-friends-screens.php:85 bp-groups/bp-groups-screens.php:895
+#: bp-activity/bp-activity-screens.php:286 bp-blogs/bp-blogs-template.php:687
+#: bp-friends/bp-friends-screens.php:85 bp-groups/bp-groups-screens.php:897
 #: bp-messages/bp-messages-screens.php:170
-#: bp-templates/bp-legacy/buddypress/groups/single/admin.php:27
 #: bp-templates/bp-legacy/buddypress/members/register.php:224
-#: bp-themes/bp-default/groups/single/admin.php:27
 #: bp-themes/bp-default/registration/register.php:229
 msgid "No"
 msgstr ""
 
-#: bp-activity/bp-activity-screens.php:287
+#: bp-activity/bp-activity-screens.php:294
 msgid "A member mentions you in an update using \"@%s\""
 msgstr ""
 
-#: bp-activity/bp-activity-screens.php:293
+#: bp-activity/bp-activity-screens.php:302
 msgid "A member replies to an update or comment you've posted"
 msgstr ""
 
-#: bp-activity/bp-activity-screens.php:364
+#: bp-activity/bp-activity-screens.php:398
 msgid "Sitewide Activity"
 msgstr ""
 
-#: bp-activity/bp-activity-template.php:220
+#: bp-activity/bp-activity-template.php:221
 msgctxt "Activity pagination previous text"
 msgid "&larr;"
 msgstr ""
 
-#: bp-activity/bp-activity-template.php:221
+#: bp-activity/bp-activity-template.php:222
 msgctxt "Activity pagination next text"
 msgid "&rarr;"
 msgstr ""
 
-#: bp-activity/bp-activity-template.php:526
+#: bp-activity/bp-activity-template.php:536
 msgid "Viewing item %1$s to %2$s (of %3$s items)"
 msgstr ""
 
-#: bp-activity/bp-activity-template.php:975
+#: bp-activity/bp-activity-template.php:985
 msgid "Profile picture"
 msgstr ""
 
-#: bp-activity/bp-activity-template.php:1087
+#: bp-activity/bp-activity-template.php:1097
 msgid "Group logo"
 msgstr ""
 
-#: bp-activity/bp-activity-template.php:1090 bp-groups/bp-groups-admin.php:1262
-#: bp-groups/bp-groups-template.php:494
+#: bp-activity/bp-activity-template.php:1100 bp-groups/bp-groups-admin.php:1352
+#: bp-groups/bp-groups-template.php:516
 msgid "Group logo of %s"
 msgstr ""
 
-#: bp-activity/bp-activity-template.php:1101
+#: bp-activity/bp-activity-template.php:1111
 msgid "Profile picture of the author of the site %s"
 msgstr ""
 
-#: bp-activity/bp-activity-template.php:1326
+#: bp-activity/bp-activity-template.php:1336
 msgid "View Discussion"
 msgstr ""
 
-#: bp-activity/bp-activity-template.php:2167
-#: bp-forums/bp-forums-template.php:1271 bp-groups/bp-groups-admin.php:1156
-#: bp-groups/bp-groups-admin.php:1251 bp-groups/bp-groups-template.php:1464
+#: bp-activity/bp-activity-template.php:2205
+#: bp-forums/bp-forums-template.php:1271 bp-groups/bp-groups-admin.php:1237
+#: bp-groups/bp-groups-admin.php:1341 bp-groups/bp-groups-template.php:1486
 #: bp-templates/bp-legacy/buddypress/activity/comment.php:43
 #: bp-templates/bp-legacy/buddypress/members/single/messages/messages-loop.php:51
 #: bp-templates/bp-legacy/buddypress/members/single/messages/single.php:24
@@ -746,124 +803,38 @@ msgstr ""
 msgid "Delete"
 msgstr ""
 
-#: bp-activity/bp-activity-template.php:2214
+#: bp-activity/bp-activity-template.php:2252
 #: bp-core/admin/bp-core-slugs.php:109 bp-core/admin/bp-core-slugs.php:172
-#: bp-core/bp-core-loader.php:225 bp-members/bp-members-loader.php:172
-#: bp-members/bp-members-template.php:624
-#: bp-templates/bp-legacy/buddypress-functions.php:258
+#: bp-core/bp-core-loader.php:226 bp-members/bp-members-loader.php:172
+#: bp-members/bp-members-template.php:625
+#: bp-templates/bp-legacy/buddypress-functions.php:237
 #: bp-themes/bp-default/activity/entry.php:37
-#: bp-themes/bp-default/functions.php:165
+#: bp-themes/bp-default/functions.php:166
 #: bp-xprofile/bp-xprofile-loader.php:175
 #: bp-xprofile/bp-xprofile-loader.php:237
 msgid "View"
 msgstr ""
 
-#: bp-activity/bp-activity-template.php:2308
+#: bp-activity/bp-activity-template.php:2346
 msgid "Clear Filter"
 msgstr ""
 
-#: bp-activity/bp-activity-template.php:2491
+#: bp-activity/bp-activity-template.php:2537
 msgid "a user"
 msgstr ""
 
-#: bp-activity/bp-activity-template.php:2531
+#: bp-activity/bp-activity-template.php:2577
 msgid "Send a public message on your activity stream."
 msgstr ""
 
-#: bp-activity/bp-activity-template.php:2532
+#: bp-activity/bp-activity-template.php:2578
 msgid "Public Message"
 msgstr ""
 
-#: bp-activity/bp-activity-template.php:2954
+#: bp-activity/bp-activity-template.php:3000
 msgid "Site Wide Activity RSS Feed"
 msgstr ""
 
-#. translators: Favorited activity RSS title - "[Site Name] | [Displayed User
-#. Name] | Favorite Activity"
-
-#: bp-activity/feeds/bp-activity-favorites-feed.php:27
-msgid "Favorite Activity"
-msgstr ""
-
-#: bp-activity/feeds/bp-activity-favorites-feed.php:30
-msgid "%s - Favorite Activity"
-msgstr ""
-
-#: bp-activity/feeds/bp-activity-favorites-feed.php:56
-#: bp-activity/feeds/bp-activity-friends-feed.php:49
-#: bp-activity/feeds/bp-activity-group-feed.php:49
-#: bp-activity/feeds/bp-activity-mentions-feed.php:50
-#: bp-activity/feeds/bp-activity-mygroups-feed.php:55
-#: bp-activity/feeds/bp-activity-personal-feed.php:49
-#: bp-activity/feeds/bp-activity-sitewide-feed.php:49
-msgid "Comments: %s"
-msgstr ""
-
-#: bp-activity/feeds/bp-activity-favorites-feed.php:60
-#: bp-activity/feeds/bp-activity-friends-feed.php:53
-#: bp-activity/feeds/bp-activity-mentions-feed.php:54
-#: bp-activity/feeds/bp-activity-personal-feed.php:53
-msgid "In reply to"
-msgstr ""
-
-#. translators: Member friends activity RSS title - "[Site Name] | Friends
-#. Activity"
-
-#: bp-activity/feeds/bp-activity-friends-feed.php:27
-msgid "Friends Activity"
-msgstr ""
-
-#: bp-activity/feeds/bp-activity-friends-feed.php:30
-msgid "%s - Friends Activity Feed"
-msgstr ""
-
-#. translators: Single group activity RSS title - "[Site Name] | [Group Name] |
-#. Group Activity"
-
-#: bp-activity/feeds/bp-activity-group-feed.php:27
-msgid "Group Activity"
-msgstr ""
-
-#: bp-activity/feeds/bp-activity-group-feed.php:30
-msgid "%s - Group Activity Feed"
-msgstr ""
-
-#. translators: Mentions RSS title - "[Site Name] | [Displayed User Name] |
-#. Mentions"
-
-#: bp-activity/feeds/bp-activity-mentions-feed.php:31
-msgid "%s - Mentions"
-msgstr ""
-
-#. translators: Member groups activity RSS title - "[Site Name] | [Displayed
-#. User Name] | My Groups - Public Activity"
-
-#: bp-activity/feeds/bp-activity-mygroups-feed.php:27
-msgid "My Groups - Public Activity"
-msgstr ""
-
-#. translators: Member groups activity RSS description - "[Displayed user name]
-#. - My Groups - Public Activity"
-
-#: bp-activity/feeds/bp-activity-mygroups-feed.php:31
-msgid "%1$s - My Groups - Public Activity"
-msgstr ""
-
-#: bp-activity/feeds/bp-activity-personal-feed.php:30
-msgid "%s - Activity Feed"
-msgstr ""
-
-#. translators: Sitewide activity RSS title - "[Site Name] | Site Wide
-#. Activity"
-
-#: bp-activity/feeds/bp-activity-sitewide-feed.php:27
-msgid "Site Wide Activity"
-msgstr ""
-
-#: bp-activity/feeds/bp-activity-sitewide-feed.php:30
-msgid "Site Wide Activity Feed"
-msgstr ""
-
 #: bp-blogs/bp-blogs-activity.php:31
 msgid "New site created"
 msgstr ""
@@ -877,23 +848,23 @@ msgid "New post comment posted"
 msgstr ""
 
 #: bp-blogs/bp-blogs-buddybar.php:43 bp-blogs/bp-blogs-loader.php:131
-#: bp-blogs/bp-blogs-loader.php:179 bp-blogs/bp-blogs-loader.php:200
+#: bp-blogs/bp-blogs-loader.php:179 bp-blogs/bp-blogs-loader.php:209
 msgid "My Sites"
 msgstr ""
 
-#: bp-blogs/bp-blogs-buddybar.php:55 bp-core/bp-core-buddybar.php:548
+#: bp-blogs/bp-blogs-buddybar.php:55 bp-core/bp-core-buddybar.php:545
 msgid "Dashboard"
 msgstr ""
 
-#: bp-blogs/bp-blogs-buddybar.php:56 bp-core/bp-core-buddybar.php:552
+#: bp-blogs/bp-blogs-buddybar.php:56 bp-core/bp-core-buddybar.php:549
 msgid "New Post"
 msgstr ""
 
-#: bp-blogs/bp-blogs-buddybar.php:57 bp-core/bp-core-buddybar.php:553
+#: bp-blogs/bp-blogs-buddybar.php:57 bp-core/bp-core-buddybar.php:550
 msgid "Manage Posts"
 msgstr ""
 
-#: bp-blogs/bp-blogs-buddybar.php:58 bp-core/bp-core-buddybar.php:554
+#: bp-blogs/bp-blogs-buddybar.php:58 bp-core/bp-core-buddybar.php:551
 msgid "Manage Comments"
 msgstr ""
 
@@ -913,15 +884,15 @@ msgstr ""
 msgid "%1$s wrote a new post, %2$s"
 msgstr ""
 
-#: bp-blogs/bp-blogs-functions.php:361
+#: bp-blogs/bp-blogs-functions.php:360
 msgid "%1$s commented on the post, %2$s, on the site %3$s"
 msgstr ""
 
-#: bp-blogs/bp-blogs-functions.php:363
+#: bp-blogs/bp-blogs-functions.php:362
 msgid "%1$s commented on the post, %2$s"
 msgstr ""
 
-#: bp-blogs/bp-blogs-loader.php:25 bp-core/admin/bp-core-components.php:384
+#: bp-blogs/bp-blogs-loader.php:25 bp-core/admin/bp-core-components.php:383
 msgid "Site Tracking"
 msgstr ""
 
@@ -937,14 +908,15 @@ msgstr ""
 msgid "Sites"
 msgstr ""
 
-#: bp-blogs/bp-blogs-screens.php:110 bp-blogs/bp-blogs-screens.php:112
-#: bp-blogs/bp-blogs-screens.php:148 bp-blogs/bp-blogs-screens.php:150
-#: bp-core/bp-core-template.php:249
-msgid "Blogs"
+#: bp-blogs/bp-blogs-loader.php:188 bp-blogs/bp-blogs-screens.php:135
+#: bp-blogs/bp-blogs-screens.php:196
+msgid "Create a Blog"
 msgstr ""
 
-#: bp-blogs/bp-blogs-screens.php:110 bp-blogs/bp-blogs-screens.php:148
-msgid "Create a Blog"
+#: bp-blogs/bp-blogs-screens.php:135 bp-blogs/bp-blogs-screens.php:137
+#: bp-blogs/bp-blogs-screens.php:196 bp-blogs/bp-blogs-screens.php:198
+#: bp-core/bp-core-template.php:249
+msgid "Blogs"
 msgstr ""
 
 #: bp-blogs/bp-blogs-template.php:136
@@ -965,10 +937,10 @@ msgstr ""
 msgid "Profile picture of site author %s"
 msgstr ""
 
-#: bp-blogs/bp-blogs-template.php:403 bp-core/bp-core-classes.php:718
-#: bp-groups/bp-groups-widgets.php:78 bp-groups/bp-groups-widgets.php:181
-#: bp-members/bp-members-template.php:595
-#: bp-members/bp-members-template.php:870
+#: bp-blogs/bp-blogs-template.php:403 bp-core/bp-core-classes.php:774
+#: bp-groups/bp-groups-widgets.php:80 bp-groups/bp-groups-widgets.php:183
+#: bp-members/bp-members-template.php:596
+#: bp-members/bp-members-template.php:871
 #: bp-templates/bp-legacy/buddypress/groups/groups-loop.php:47
 #: bp-templates/bp-legacy/buddypress/groups/single/group-header.php:42
 #: bp-themes/bp-default/groups/groups-loop.php:47
@@ -1042,7 +1014,7 @@ msgstr ""
 msgid "<a href=\"%1$s\">%2$s</a> is your new site.  <a href=\"%3$s\">Login</a> as \"%4$s\" using your existing password."
 msgstr ""
 
-#: bp-blogs/bp-blogs-template.php:773 bp-core/bp-core-filters.php:377
+#: bp-blogs/bp-blogs-template.php:773 bp-core/bp-core-filters.php:378
 #: bp-themes/bp-default/blogs/create.php:21
 #: bp-themes/bp-default/blogs/index.php:21
 msgid "Create a Site"
@@ -1060,33 +1032,50 @@ msgstr ""
 msgid "%s's Recent Comments"
 msgstr ""
 
-#: bp-blogs/bp-blogs-template.php:803 bp-core/deprecated/1.5.php:417
-#: bp-forums/bp-forums-template.php:1321 bp-groups/bp-groups-template.php:2483
-#: bp-members/bp-members-template.php:709
+#: bp-blogs/bp-blogs-template.php:801 bp-core/deprecated/1.5.php:417
+#: bp-forums/bp-forums-template.php:1321 bp-groups/bp-groups-template.php:2503
+#: bp-members/bp-members-template.php:710
 #: bp-messages/bp-messages-template.php:367 bp-themes/bp-default/header.php:30
 #: bp-themes/bp-default/searchform.php:5
 msgid "Search"
 msgstr ""
 
-#: bp-blogs/bp-blogs-template.php:836 bp-blogs/bp-blogs-template.php:837
+#: bp-blogs/bp-blogs-template.php:834 bp-blogs/bp-blogs-template.php:835
 msgid "Visit Site"
 msgstr ""
 
-#: bp-blogs/bp-blogs-widgets.php:25
+#: bp-blogs/bp-blogs-widgets.php:29
+msgid "A list of recently published posts from across your network."
+msgstr ""
+
+#: bp-blogs/bp-blogs-widgets.php:32
 msgctxt "widget name"
 msgid "(BuddyPress) Recent Networkwide Posts"
 msgstr ""
 
-#: bp-blogs/bp-blogs-widgets.php:67
+#: bp-blogs/bp-blogs-widgets.php:37 bp-blogs/bp-blogs-widgets.php:97
+msgid "Recent Networkwide Posts"
+msgstr ""
+
+#: bp-blogs/bp-blogs-widgets.php:78
 msgid "Sorry, there were no posts found. Why not write one?"
 msgstr ""
 
-#: bp-blogs/bp-blogs-widgets.php:87
+#: bp-blogs/bp-blogs-widgets.php:108
+msgctxt "Label for the Title field of the Recent Networkwide Posts widget"
+msgid "Title:"
+msgstr ""
+
+#: bp-blogs/bp-blogs-widgets.php:109
+msgid "Link widget title to Blogs directory"
+msgstr ""
+
+#: bp-blogs/bp-blogs-widgets.php:110
 msgid "Max posts to show:"
 msgstr ""
 
 #: bp-core/admin/bp-core-components.php:26
-#: bp-core/admin/bp-core-functions.php:356
+#: bp-core/admin/bp-core-functions.php:354
 msgid "Components"
 msgstr ""
 
@@ -1096,13 +1085,13 @@ msgid "Save Settings"
 msgstr ""
 
 #: bp-core/admin/bp-core-components.php:59
-#: bp-core/admin/bp-core-components.php:356
+#: bp-core/admin/bp-core-components.php:355
 #: bp-xprofile/bp-xprofile-loader.php:41
 msgid "Extended Profiles"
 msgstr ""
 
 #: bp-core/admin/bp-core-components.php:60
-#: bp-core/admin/bp-core-components.php:357
+#: bp-core/admin/bp-core-components.php:356
 msgid "Customize your community with fully editable profile fields that allow your users to describe themselves."
 msgstr ""
 
@@ -1155,81 +1144,81 @@ msgstr ""
 msgid "No components found."
 msgstr ""
 
-#: bp-core/admin/bp-core-components.php:336 bp-core/bp-core-loader.php:27
+#: bp-core/admin/bp-core-components.php:335 bp-core/bp-core-loader.php:27
 msgid "BuddyPress Core"
 msgstr ""
 
-#: bp-core/admin/bp-core-components.php:337
+#: bp-core/admin/bp-core-components.php:336
 msgid "It&#8216;s what makes <del>time travel</del> BuddyPress possible!"
 msgstr ""
 
-#: bp-core/admin/bp-core-components.php:340
+#: bp-core/admin/bp-core-components.php:339
 msgid "Community Members"
 msgstr ""
 
-#: bp-core/admin/bp-core-components.php:341
+#: bp-core/admin/bp-core-components.php:340
 msgid "Everything in a BuddyPress community revolves around its members."
 msgstr ""
 
-#: bp-core/admin/bp-core-components.php:348
+#: bp-core/admin/bp-core-components.php:347
 #: bp-templates/bp-legacy/buddypress/groups/create.php:105
 #: bp-themes/bp-default/groups/create.php:112
 msgid "Group Forums"
 msgstr ""
 
-#: bp-core/admin/bp-core-components.php:349
+#: bp-core/admin/bp-core-components.php:348
 msgid "BuddyPress Forums are retired. Use %s."
 msgstr ""
 
-#: bp-core/admin/bp-core-components.php:360
+#: bp-core/admin/bp-core-components.php:359
 msgid "Account Settings"
 msgstr ""
 
-#: bp-core/admin/bp-core-components.php:361
+#: bp-core/admin/bp-core-components.php:360
 msgid "Allow your users to modify their account and notification settings directly from within their profiles."
 msgstr ""
 
-#: bp-core/admin/bp-core-components.php:364 bp-friends/bp-friends-loader.php:24
+#: bp-core/admin/bp-core-components.php:363 bp-friends/bp-friends-loader.php:24
 msgid "Friend Connections"
 msgstr ""
 
-#: bp-core/admin/bp-core-components.php:365
+#: bp-core/admin/bp-core-components.php:364
 msgid "Let your users make connections so they can track the activity of others and focus on the people they care about the most."
 msgstr ""
 
-#: bp-core/admin/bp-core-components.php:368
+#: bp-core/admin/bp-core-components.php:367
 msgid "Private Messaging"
 msgstr ""
 
-#: bp-core/admin/bp-core-components.php:369
+#: bp-core/admin/bp-core-components.php:368
 msgid "Allow your users to talk to each other directly and in private. Not just limited to one-on-one discussions, messages can be sent between any number of members."
 msgstr ""
 
-#: bp-core/admin/bp-core-components.php:373
+#: bp-core/admin/bp-core-components.php:372
 msgid "Global, personal, and group activity streams with threaded commenting, direct posting, favoriting and @mentions, all with full RSS feed and email notification support."
 msgstr ""
 
-#: bp-core/admin/bp-core-components.php:376 bp-groups/bp-groups-loader.php:83
+#: bp-core/admin/bp-core-components.php:375 bp-groups/bp-groups-loader.php:83
 msgid "User Groups"
 msgstr ""
 
-#: bp-core/admin/bp-core-components.php:377
+#: bp-core/admin/bp-core-components.php:376
 msgid "Groups allow your users to organize themselves into specific public, private or hidden sections with separate activity streams and member listings."
 msgstr ""
 
-#: bp-core/admin/bp-core-components.php:380
+#: bp-core/admin/bp-core-components.php:379
 msgid "Group Forums (Legacy)"
 msgstr ""
 
-#: bp-core/admin/bp-core-components.php:381
+#: bp-core/admin/bp-core-components.php:380
 msgid "Group forums allow for focused, bulletin-board style conversations."
 msgstr ""
 
-#: bp-core/admin/bp-core-components.php:385
+#: bp-core/admin/bp-core-components.php:384
 msgid "Record activity for new posts and comments from your site."
 msgstr ""
 
-#: bp-core/admin/bp-core-components.php:392
+#: bp-core/admin/bp-core-components.php:391
 msgid "Record activity for new sites, posts, and comments across your network."
 msgstr ""
 
@@ -1269,47 +1258,55 @@ msgstr ""
 msgid "Each BuddyPress Component needs its own WordPress page. The following WordPress Pages have more than one component associated with them: %2$s. <a href=\"%1$s\" class=\"button-secondary\">Repair</a>"
 msgstr ""
 
-#: bp-core/admin/bp-core-functions.php:360 bp-core/admin/bp-core-slugs.php:26
+#: bp-core/admin/bp-core-functions.php:358 bp-core/admin/bp-core-slugs.php:26
 msgid "Pages"
 msgstr ""
 
-#: bp-core/admin/bp-core-functions.php:364
+#: bp-core/admin/bp-core-functions.php:362
 #: bp-core/admin/bp-core-settings.php:258 bp-core/bp-core-admin.php:331
-#: bp-groups/bp-groups-loader.php:302 bp-groups/bp-groups-template.php:1446
+#: bp-groups/bp-groups-loader.php:302 bp-groups/bp-groups-template.php:1468
 #: bp-settings/bp-settings-loader.php:23 bp-settings/bp-settings-loader.php:73
 #: bp-settings/bp-settings-loader.php:165
 msgid "Settings"
 msgstr ""
 
-#: bp-core/admin/bp-core-functions.php:409
+#: bp-core/admin/bp-core-functions.php:374 bp-core/bp-core-template.php:252
+#: bp-forums/bp-forums-loader.php:109 bp-forums/bp-forums-loader.php:172
+#: bp-forums/bp-forums-loader.php:213 bp-forums/bp-forums-screens.php:188
+#: bp-forums/bp-forums-screens.php:190 bp-forums/deprecated/1.6.php:42
+#: bp-forums/deprecated/1.7.php:25 bp-forums/deprecated/1.7.php:100
+msgid "Forums"
+msgstr ""
+
+#: bp-core/admin/bp-core-functions.php:419
 msgid "<a href=\"http://codex.buddypress.org/getting-started/configure-buddypress-components/#settings-buddypress-components\">Managing Components</a>"
 msgstr ""
 
-#: bp-core/admin/bp-core-functions.php:427
+#: bp-core/admin/bp-core-functions.php:437
 msgid "<a href=\"http://codex.buddypress.org/getting-started/configure-buddypress-components/#settings-buddypress-pages\">Managing Pages</a>"
 msgstr ""
 
-#: bp-core/admin/bp-core-functions.php:446
+#: bp-core/admin/bp-core-functions.php:456
 msgid "<a href=\"http://codex.buddypress.org/getting-started/configure-buddypress-components/#settings-buddypress-settings\">Managing Settings</a>"
 msgstr ""
 
-#: bp-core/admin/bp-core-functions.php:465
+#: bp-core/admin/bp-core-functions.php:475
 msgid "<a href=\"http://codex.buddypress.org/getting-started/configure-buddypress-components/#users-profile-fields\">Managing Profile Fields</a>"
 msgstr ""
 
-#: bp-core/admin/bp-core-functions.php:483
+#: bp-core/admin/bp-core-functions.php:493
 msgid "By default, all BuddyPress components are enabled. You can selectively disable any of the components by using the form. Your BuddyPress installation will continue to function. However, the features of the disabled components will no longer be accessible to anyone using the site."
 msgstr ""
 
-#: bp-core/admin/bp-core-functions.php:487
+#: bp-core/admin/bp-core-functions.php:497
 msgid "BuddyPress Components use WordPress Pages for their root directory/archive pages. Here you can change the page associations for each active component."
 msgstr ""
 
-#: bp-core/admin/bp-core-functions.php:491
+#: bp-core/admin/bp-core-functions.php:501
 msgid "Extra configuration settings."
 msgstr ""
 
-#: bp-core/admin/bp-core-functions.php:495
+#: bp-core/admin/bp-core-functions.php:505
 msgid "Your users will distinguish themselves through their profile page. Create relevant profile fields that will show on each users profile.</br></br>Note: Any fields in the first group will appear on the signup page."
 msgstr ""
 
@@ -1392,10 +1389,10 @@ msgid "New Page"
 msgstr ""
 
 #: bp-core/admin/bp-core-slugs.php:105 bp-core/admin/bp-core-slugs.php:168
-#: bp-templates/bp-legacy/buddypress/members/single/settings/capabilities.php:19
+#: bp-templates/bp-legacy/buddypress/members/single/settings/capabilities.php:13
 #: bp-themes/bp-default/members/single/settings/capabilities.php:61
 #: bp-xprofile/bp-xprofile-classes.php:401
-#: bp-xprofile/bp-xprofile-classes.php:928
+#: bp-xprofile/bp-xprofile-classes.php:927
 msgid "Save"
 msgstr ""
 
@@ -1530,9 +1527,9 @@ msgid "BuddyPress&#8217;s powerful features help your users connect and collabor
 msgstr ""
 
 #: bp-core/bp-core-admin.php:408 bp-core/bp-core-template.php:243
-#: bp-core/bp-core-widgets.php:111 bp-groups/bp-groups-admin.php:764
-#: bp-groups/bp-groups-template.php:1454 bp-members/bp-members-loader.php:24
-#: bp-members/bp-members-screens.php:329
+#: bp-core/bp-core-widgets.php:113 bp-groups/bp-groups-admin.php:759
+#: bp-groups/bp-groups-template.php:1476 bp-members/bp-members-loader.php:24
+#: bp-members/bp-members-screens.php:355
 #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:231
 #: bp-themes/bp-default/groups/single/admin.php:231
 msgid "Members"
@@ -1547,23 +1544,23 @@ msgid "Looking for help? The <a href=\"http://codex.buddypress.org/\">BuddyPress
 msgstr ""
 
 #: bp-core/bp-core-admin.php:421
-msgid "A Declaration of (Theme) Independence"
+msgid "Improved Theme Integration"
 msgstr ""
 
 #: bp-core/bp-core-admin.php:424
-msgid "It Just Works"
+msgid "Hey, Good Lookin&#8217;"
 msgstr ""
 
 #: bp-core/bp-core-admin.php:425
-msgid "BuddyPress is now compatible with <strong>any WordPress theme</strong>. If your theme has BuddyPress-specific templates and styling, we&#8217;ll use them. If not, we provide what you need to make your BuddyPress content look great. Still want to customize? No problem - you can override our templates just like you would in a WordPress child theme. <a href=\"http://codex.buddypress.org/theme-compatibility/\">Learn more about theme compatibility</a>."
+msgid "We&#8217;ve streamlined our stylesheets, so that BuddyPress content looks more at home in your theme. And theme developers will love BP&#8217;s new hierarchies that make it easy to override specific top-level templates, stylesheets, and JavaScript files."
 msgstr ""
 
 #: bp-core/bp-core-admin.php:430
-msgid "Group Management"
+msgid "Better Group Member Management"
 msgstr ""
 
 #: bp-core/bp-core-admin.php:433
-msgid "Get More Done Quickly"
+msgid "<em>Add</em>, <em>Remove</em>, and More, in a Snap"
 msgstr ""
 
 #: bp-core/bp-core-admin.php:436
@@ -1571,7 +1568,7 @@ msgid "Groups administration panel"
 msgstr ""
 
 #: bp-core/bp-core-admin.php:443
-msgid "The new %s makes it easy to handle large numbers of groups on your BuddyPress installation. Delete groups, edit group details, modify memberships, and more, with just a few clicks."
+msgid "The Manage Members section of the %s has been rewritten, to make it easier to handle groups with many members. We&#8217;ve also made the interface nicer to use, to ensure that you don&#8217;t make changes and then forget to save them."
 msgstr ""
 
 #: bp-core/bp-core-admin.php:450
@@ -1579,38 +1576,38 @@ msgid "Under the Hood"
 msgstr ""
 
 #: bp-core/bp-core-admin.php:454
-msgid "Faster Member Queries"
+msgid "Superpowered Group Extensions"
 msgstr ""
 
 #: bp-core/bp-core-admin.php:455
-msgid "The new <code>BP_User_Query</code> makes member queries (like in the Members directory) up to 4x faster than before."
+msgid "<code>BP_Group_Extension</code> has been overhauled, making it easier than ever before to add custom functionality to groups."
 msgstr ""
 
 #: bp-core/bp-core-admin.php:457
-msgid "Sortable Profile Options"
+msgid "Filter Groups or Activity by Metadata"
 msgstr ""
 
 #: bp-core/bp-core-admin.php:458
-msgid "Profile field types with multiple options - like radio buttons and checkboxes - now support drag-and-drop reordering."
+msgid "<code>bp_has_groups()</code> and <code>bp_has_activities()</code> now accept a <code>meta_query</code> paramater, for more powerful directory queries."
 msgstr ""
 
 #: bp-core/bp-core-admin.php:462
-msgid "New Visibility Level"
+msgid "Feed Me, Seymour"
 msgstr ""
 
 #: bp-core/bp-core-admin.php:463
-msgid "By popular demand, the \"Admins Only\" visibility setting is now available for profile fields."
+msgid "The new <code>BP_Activity_Feed</code> class centralizes BP&#8217;s RSS logic, making our feeds more standards-compliant, and giving developers more tools for building custom feeds."
 msgstr ""
 
 #: bp-core/bp-core-admin.php:465
-msgid "Better bbPress Integration"
+msgid "Disable @-Mentions"
 msgstr ""
 
 #: bp-core/bp-core-admin.php:466
-msgid "Support for group and sitewide forums, using the latest version of the bbPress plugin, is better than ever. Still using bbPress 1.x? Our new migration tools are field-tested."
+msgid "Not using @-mentions? Disable them with <code>add_filter( 'bp_activity_do_mentions', '__return_false' );</code>"
 msgstr ""
 
-#: bp-core/bp-core-admin.php:471 bp-core/bp-core-admin.php:598
+#: bp-core/bp-core-admin.php:471 bp-core/bp-core-admin.php:601
 msgid "Go to the BuddyPress Settings page"
 msgstr ""
 
@@ -1655,10 +1652,10 @@ msgid "Support Officer"
 msgstr ""
 
 #: bp-core/bp-core-admin.php:552
-msgid "Core Contributors to BuddyPress 1.7"
+msgid "Core Contributors to BuddyPress 1.8"
 msgstr ""
 
-#: bp-core/bp-core-adminbar.php:36 bp-core/bp-core-buddybar.php:498
+#: bp-core/bp-core-adminbar.php:35 bp-core/bp-core-buddybar.php:495
 msgid "My Account"
 msgstr ""
 
@@ -1706,47 +1703,47 @@ msgstr ""
 msgid "Upload failed! Error was: %s"
 msgstr ""
 
-#: bp-core/bp-core-avatars.php:733 bp-core/bp-core-classes.php:715
-#: bp-core/bp-core-classes.php:716 bp-core/bp-core-classes.php:717
+#: bp-core/bp-core-avatars.php:733 bp-core/bp-core-classes.php:771
+#: bp-core/bp-core-classes.php:772 bp-core/bp-core-classes.php:773
 #: bp-core/bp-core-template.php:98 bp-core/bp-core-template.php:107
 msgid "Avatar of %s"
 msgstr ""
 
-#: bp-core/bp-core-buddybar.php:303
+#: bp-core/bp-core-buddybar.php:302
 msgid "You do not have access to this page."
 msgstr ""
 
-#: bp-core/bp-core-buddybar.php:482 bp-themes/bp-default/sidebar.php:53
+#: bp-core/bp-core-buddybar.php:479 bp-themes/bp-default/sidebar.php:52
 msgid "Log In"
 msgstr ""
 
-#: bp-core/bp-core-buddybar.php:486
+#: bp-core/bp-core-buddybar.php:483
 msgid "Sign Up"
 msgstr ""
 
-#: bp-core/bp-core-buddybar.php:540 bp-core/deprecated/1.5.php:307
-#: bp-members/bp-members-template.php:773 bp-themes/bp-default/sidebar.php:18
+#: bp-core/bp-core-buddybar.php:537 bp-core/deprecated/1.5.php:307
+#: bp-members/bp-members-template.php:774 bp-themes/bp-default/sidebar.php:18
 msgid "Log Out"
 msgstr ""
 
-#: bp-core/bp-core-buddybar.php:569 bp-groups/bp-groups-admin.php:1245
+#: bp-core/bp-core-buddybar.php:566 bp-groups/bp-groups-admin.php:1335
 msgid "Visit"
 msgstr ""
 
-#: bp-core/bp-core-buddybar.php:571
+#: bp-core/bp-core-buddybar.php:568
 msgid "Random Member"
 msgstr ""
 
-#: bp-core/bp-core-buddybar.php:575
+#: bp-core/bp-core-buddybar.php:572
 msgid "Random Group"
 msgstr ""
 
-#: bp-core/bp-core-buddybar.php:581
+#: bp-core/bp-core-buddybar.php:578
 msgid "Random Site"
 msgstr ""
 
-#: bp-core/bp-core-caps.php:250 bp-core/bp-core-caps.php:263
-#: bp-core/bp-core-caps.php:278 bp-core/bp-core-caps.php:289
+#: bp-core/bp-core-caps.php:248 bp-core/bp-core-caps.php:261
+#: bp-core/bp-core-caps.php:276 bp-core/bp-core-caps.php:287
 msgid "Special community roles no longer exist. Use mapped capabilities instead"
 msgstr ""
 
@@ -1758,7 +1755,7 @@ msgstr ""
 msgid "You must log in to access the page you requested."
 msgstr ""
 
-#: bp-core/bp-core-classes.php:732
+#: bp-core/bp-core-classes.php:788
 msgid "%d group"
 msgid_plural "%d groups"
 msgstr[0] ""
@@ -1768,11 +1765,11 @@ msgstr[1] ""
 msgid "The current user is being initialized without using $wp->init()."
 msgstr ""
 
-#: bp-core/bp-core-filters.php:215 bp-core/bp-core-filters.php:239
+#: bp-core/bp-core-filters.php:216 bp-core/bp-core-filters.php:240
 msgid "[User Set]"
 msgstr ""
 
-#: bp-core/bp-core-filters.php:257
+#: bp-core/bp-core-filters.php:258
 msgid ""
 "Thanks for registering! To complete the activation of your account and blog, please click the following link:\n"
 "\n"
@@ -1785,11 +1782,11 @@ msgid ""
 "%2$s"
 msgstr ""
 
-#: bp-core/bp-core-filters.php:258
+#: bp-core/bp-core-filters.php:259
 msgid "Activate %s"
 msgstr ""
 
-#: bp-core/bp-core-filters.php:285 bp-members/bp-members-functions.php:1357
+#: bp-core/bp-core-filters.php:286 bp-members/bp-members-functions.php:1390
 msgid ""
 "Thanks for registering! To complete the activation of your account please click the following link:\n"
 "\n"
@@ -1797,157 +1794,143 @@ msgid ""
 "\n"
 msgstr ""
 
-#: bp-core/bp-core-filters.php:286 bp-members/bp-members-functions.php:1358
+#: bp-core/bp-core-filters.php:287 bp-members/bp-members-functions.php:1391
 msgid "Activate Your Account"
 msgstr ""
 
-#: bp-core/bp-core-filters.php:342
+#: bp-core/bp-core-filters.php:343
 msgctxt "Construct the page title. 1 = user name, 2 = component name, 3 = seperator"
 msgid "%1$s %3$s %2$s"
 msgstr ""
 
 #. translators: "group name | group nav section name"
 
-#: bp-core/bp-core-filters.php:348
+#: bp-core/bp-core-filters.php:349
 msgid "%1$s | %2$s"
 msgstr ""
 
 #. translators: "component item name | component nav section name | root
 #. component name"
 
-#: bp-core/bp-core-filters.php:353
+#: bp-core/bp-core-filters.php:354
 msgid "%1$s | %2$s | %3$s"
 msgstr ""
 
-#: bp-core/bp-core-filters.php:358 bp-core/bp-core-filters.php:360
+#: bp-core/bp-core-filters.php:359 bp-core/bp-core-filters.php:361
 msgid "%s Directory"
 msgstr ""
 
-#: bp-core/bp-core-filters.php:365 bp-members/bp-members-screens.php:430
+#: bp-core/bp-core-filters.php:366 bp-members/bp-members-screens.php:512
 #: bp-themes/bp-default/registration/register.php:23
 msgid "Create an Account"
 msgstr ""
 
-#: bp-core/bp-core-filters.php:369 bp-members/bp-members-screens.php:438
+#: bp-core/bp-core-filters.php:370 bp-members/bp-members-screens.php:520
 #: bp-themes/bp-default/registration/activate.php:13
 msgid "Activate your Account"
 msgstr ""
 
-#: bp-core/bp-core-filters.php:373 bp-groups/bp-groups-screens.php:999
-#: bp-groups/bp-groups-screens.php:1037
+#: bp-core/bp-core-filters.php:374 bp-groups/bp-groups-loader.php:554
+#: bp-groups/bp-groups-screens.php:1027 bp-groups/bp-groups-screens.php:1088
 #: bp-themes/bp-default/groups/create.php:18
 #: bp-themes/bp-default/groups/index.php:21
 msgid "Create a Group"
 msgstr ""
 
-#: bp-core/bp-core-functions.php:204
+#: bp-core/bp-core-functions.php:322
 msgctxt "Page title for the Activity directory."
 msgid "Activity"
 msgstr ""
 
-#: bp-core/bp-core-functions.php:205
+#: bp-core/bp-core-functions.php:323
 msgctxt "Page title for the Groups directory."
 msgid "Groups"
 msgstr ""
 
-#: bp-core/bp-core-functions.php:206
+#: bp-core/bp-core-functions.php:324
 msgctxt "Page title for the Sites directory."
 msgid "Sites"
 msgstr ""
 
-#: bp-core/bp-core-functions.php:207
+#: bp-core/bp-core-functions.php:325
 msgctxt "Page title for the user account activation screen."
 msgid "Activate"
 msgstr ""
 
-#: bp-core/bp-core-functions.php:208
+#: bp-core/bp-core-functions.php:326
 msgctxt "Page title for the Members directory."
 msgid "Members"
 msgstr ""
 
-#: bp-core/bp-core-functions.php:209
+#: bp-core/bp-core-functions.php:327
 msgctxt "Page title for the user registration screen."
 msgid "Register"
 msgstr ""
 
-#: bp-core/bp-core-functions.php:441
+#: bp-core/bp-core-functions.php:592
 msgid "sometime"
 msgstr ""
 
-#: bp-core/bp-core-functions.php:442
+#: bp-core/bp-core-functions.php:593
 msgid "right now"
 msgstr ""
 
-#: bp-core/bp-core-functions.php:443
+#: bp-core/bp-core-functions.php:594
 msgid "%s ago"
 msgstr ""
 
-#: bp-core/bp-core-functions.php:447
-msgid "year"
-msgstr ""
-
-#: bp-core/bp-core-functions.php:447
-msgid "years"
-msgstr ""
-
-#: bp-core/bp-core-functions.php:448
-msgid "month"
-msgstr ""
-
-#: bp-core/bp-core-functions.php:448
-msgid "months"
-msgstr ""
-
-#: bp-core/bp-core-functions.php:449
-msgid "week"
-msgstr ""
-
-#: bp-core/bp-core-functions.php:449
-msgid "weeks"
-msgstr ""
-
-#: bp-core/bp-core-functions.php:450
-msgid "day"
-msgstr ""
-
-#: bp-core/bp-core-functions.php:450
-msgid "days"
-msgstr ""
+#: bp-core/bp-core-functions.php:655
+msgid "%s year"
+msgid_plural "%s years"
+msgstr[0] ""
+msgstr[1] ""
 
-#: bp-core/bp-core-functions.php:451
-msgid "hour"
-msgstr ""
+#: bp-core/bp-core-functions.php:658 bp-core/bp-core-functions.php:692
+msgid "%s month"
+msgid_plural "%s months"
+msgstr[0] ""
+msgstr[1] ""
 
-#: bp-core/bp-core-functions.php:451
-msgid "hours"
-msgstr ""
+#: bp-core/bp-core-functions.php:661 bp-core/bp-core-functions.php:695
+msgid "%s week"
+msgid_plural "%s weeks"
+msgstr[0] ""
+msgstr[1] ""
 
-#: bp-core/bp-core-functions.php:452
-msgid "minute"
-msgstr ""
+#: bp-core/bp-core-functions.php:664 bp-core/bp-core-functions.php:698
+msgid "%s day"
+msgid_plural "%s days"
+msgstr[0] ""
+msgstr[1] ""
 
-#: bp-core/bp-core-functions.php:452
-msgid "minutes"
-msgstr ""
+#: bp-core/bp-core-functions.php:667 bp-core/bp-core-functions.php:701
+msgid "%s hour"
+msgid_plural "%s hours"
+msgstr[0] ""
+msgstr[1] ""
 
-#: bp-core/bp-core-functions.php:453
-msgid "second"
-msgstr ""
+#: bp-core/bp-core-functions.php:670 bp-core/bp-core-functions.php:704
+msgid "%s minute"
+msgid_plural "%s minutes"
+msgstr[0] ""
+msgstr[1] ""
 
-#: bp-core/bp-core-functions.php:453
-msgid "seconds"
-msgstr ""
+#: bp-core/bp-core-functions.php:673 bp-core/bp-core-functions.php:707
+msgid "%s second"
+msgid_plural "%s seconds"
+msgstr[0] ""
+msgstr[1] ""
 
-#: bp-core/bp-core-functions.php:512
+#: bp-core/bp-core-functions.php:688
 msgctxt "Separator in time since"
 msgid ","
 msgstr ""
 
-#: bp-core/bp-core-functions.php:580
+#: bp-core/bp-core-functions.php:866
 msgid "Not recently active"
 msgstr ""
 
-#: bp-core/bp-core-loader.php:214 bp-members/bp-members-loader.php:158
+#: bp-core/bp-core-loader.php:215 bp-members/bp-members-loader.php:158
 #: bp-xprofile/bp-xprofile-loader.php:154
 #: bp-xprofile/bp-xprofile-loader.php:229
 msgid "Profile"
@@ -1961,19 +1944,11 @@ msgstr ""
 msgid "%1$s at %2$s"
 msgstr ""
 
-#: bp-core/bp-core-template.php:252 bp-forums/bp-forums-loader.php:103
-#: bp-forums/bp-forums-loader.php:166 bp-forums/bp-forums-loader.php:207
-#: bp-forums/bp-forums-screens.php:188 bp-forums/bp-forums-screens.php:190
-#: bp-forums/deprecated/1.6.php:24 bp-forums/deprecated/1.7.php:25
-#: bp-forums/deprecated/1.7.php:57 bp-forums/deprecated/1.7.php:329
-msgid "Forums"
-msgstr ""
-
 #: bp-core/bp-core-template.php:254
-#: bp-templates/bp-legacy/buddypress/activity/index.php:79
+#: bp-templates/bp-legacy/buddypress/activity/index.php:83
 #: bp-templates/bp-legacy/buddypress/forums/forums-loop.php:40
 #: bp-templates/bp-legacy/buddypress/members/single/activity.php:27
-#: bp-themes/bp-default/activity/index.php:99
+#: bp-themes/bp-default/activity/index.php:103
 #: bp-themes/bp-default/forums/forums-loop.php:40
 #: bp-themes/bp-default/members/single/activity.php:27
 msgid "Posts"
@@ -2004,9 +1979,9 @@ msgctxt "widget name"
 msgid "(BuddyPress) Members"
 msgstr ""
 
-#: bp-core/bp-core-widgets.php:47 bp-core/bp-core-widgets.php:133
+#: bp-core/bp-core-widgets.php:49 bp-core/bp-core-widgets.php:135
 #: bp-core/deprecated/1.6.php:129 bp-core/deprecated/1.6.php:152
-#: bp-groups/bp-groups-widgets.php:58 bp-groups/bp-groups-widgets.php:139
+#: bp-groups/bp-groups-widgets.php:60 bp-groups/bp-groups-widgets.php:141
 #: bp-templates/bp-legacy/buddypress/blogs/index.php:39
 #: bp-templates/bp-legacy/buddypress/members/single/blogs.php:22
 #: bp-themes/bp-default/blogs/index.php:56
@@ -2014,22 +1989,22 @@ msgstr ""
 msgid "Newest"
 msgstr ""
 
-#: bp-core/bp-core-widgets.php:48 bp-core/bp-core-widgets.php:134
-#: bp-groups/bp-groups-widgets.php:59 bp-groups/bp-groups-widgets.php:140
+#: bp-core/bp-core-widgets.php:50 bp-core/bp-core-widgets.php:136
+#: bp-groups/bp-groups-widgets.php:61 bp-groups/bp-groups-widgets.php:142
 msgid "Active"
 msgstr ""
 
-#: bp-core/bp-core-widgets.php:52 bp-core/bp-core-widgets.php:135
-#: bp-groups/bp-groups-widgets.php:60 bp-groups/bp-groups-widgets.php:141
+#: bp-core/bp-core-widgets.php:54 bp-core/bp-core-widgets.php:137
+#: bp-groups/bp-groups-widgets.php:62 bp-groups/bp-groups-widgets.php:143
 msgid "Popular"
 msgstr ""
 
-#: bp-core/bp-core-widgets.php:89
+#: bp-core/bp-core-widgets.php:91
 msgid "No one has signed up yet!"
 msgstr ""
 
-#: bp-core/bp-core-widgets.php:124 bp-core/bp-core-widgets.php:204
-#: bp-core/bp-core-widgets.php:271 bp-groups/bp-groups-widgets.php:130
+#: bp-core/bp-core-widgets.php:126 bp-core/bp-core-widgets.php:208
+#: bp-core/bp-core-widgets.php:277 bp-groups/bp-groups-widgets.php:132
 #: bp-templates/bp-legacy/buddypress/forums/index.php:86
 #: bp-templates/bp-legacy/buddypress/groups/single/forum/edit.php:47
 #: bp-templates/bp-legacy/buddypress/groups/single/forum.php:75
@@ -2039,53 +2014,53 @@ msgstr ""
 msgid "Title:"
 msgstr ""
 
-#: bp-core/bp-core-widgets.php:126
+#: bp-core/bp-core-widgets.php:128
 msgid "Link widget title to Members directory"
 msgstr ""
 
-#: bp-core/bp-core-widgets.php:128
+#: bp-core/bp-core-widgets.php:130
 msgid "Max members to show:"
 msgstr ""
 
-#: bp-core/bp-core-widgets.php:131
+#: bp-core/bp-core-widgets.php:133
 msgid "Default members to show:"
 msgstr ""
 
-#: bp-core/bp-core-widgets.php:150
+#: bp-core/bp-core-widgets.php:152
 msgid "Avatars of users who are currently online"
 msgstr ""
 
-#: bp-core/bp-core-widgets.php:153
+#: bp-core/bp-core-widgets.php:155
 msgctxt "widget name"
 msgid "(BuddyPress) Who's Online"
 msgstr ""
 
-#: bp-core/bp-core-widgets.php:176
+#: bp-core/bp-core-widgets.php:180
 msgid "There are no users currently online"
 msgstr ""
 
-#: bp-core/bp-core-widgets.php:195
+#: bp-core/bp-core-widgets.php:199
 msgid "Who's Online"
 msgstr ""
 
-#: bp-core/bp-core-widgets.php:206 bp-core/bp-core-widgets.php:273
+#: bp-core/bp-core-widgets.php:210 bp-core/bp-core-widgets.php:279
 msgid "Max Members to show:"
 msgstr ""
 
-#: bp-core/bp-core-widgets.php:217
+#: bp-core/bp-core-widgets.php:221
 msgid "Avatars of recently active members"
 msgstr ""
 
-#: bp-core/bp-core-widgets.php:220
+#: bp-core/bp-core-widgets.php:224
 msgctxt "widget name"
 msgid "(BuddyPress) Recently Active Members"
 msgstr ""
 
-#: bp-core/bp-core-widgets.php:243
+#: bp-core/bp-core-widgets.php:249
 msgid "There are no recently active members"
 msgstr ""
 
-#: bp-core/bp-core-widgets.php:325
+#: bp-core/bp-core-widgets.php:331
 msgid "There were no members found, please try another filter."
 msgstr ""
 
@@ -2100,7 +2075,7 @@ msgstr ""
 
 #: bp-core/deprecated/1.5.php:149
 #: bp-templates/bp-legacy/buddypress/members/single/profile/profile-wp.php:15
-#: bp-themes/bp-default/functions.php:641
+#: bp-themes/bp-default/functions.php:643
 #: bp-themes/bp-default/members/single/profile/profile-wp.php:15
 msgid "Name"
 msgstr ""
@@ -2113,7 +2088,7 @@ msgstr ""
 
 #: bp-core/deprecated/1.5.php:167
 #: bp-templates/bp-legacy/buddypress/members/single/profile/profile-wp.php:33
-#: bp-themes/bp-default/functions.php:645
+#: bp-themes/bp-default/functions.php:647
 #: bp-themes/bp-default/members/single/profile/profile-wp.php:33
 msgid "Website"
 msgstr ""
@@ -2141,12 +2116,12 @@ msgid "%1$s mentioned you in the group \"%2$s\""
 msgstr ""
 
 #: bp-core/deprecated/1.6.php:128 bp-core/deprecated/1.6.php:149
-#: bp-groups/bp-groups-template.php:2498 bp-groups/bp-groups-template.php:2520
+#: bp-groups/bp-groups-template.php:2518 bp-groups/bp-groups-template.php:2540
 msgid "Recently Active"
 msgstr ""
 
 #: bp-core/deprecated/1.6.php:130 bp-core/deprecated/1.6.php:155
-#: bp-groups/bp-groups-template.php:2503 bp-groups/bp-groups-template.php:2535
+#: bp-groups/bp-groups-template.php:2523 bp-groups/bp-groups-template.php:2555
 msgid "Alphabetically"
 msgstr ""
 
@@ -2158,19 +2133,19 @@ msgstr ""
 msgid "Search Forums..."
 msgstr ""
 
-#: bp-forums/bp-forums-loader.php:125 bp-forums/bp-forums-loader.php:174
+#: bp-forums/bp-forums-loader.php:131 bp-forums/bp-forums-loader.php:180
 msgid "Topics Started"
 msgstr ""
 
-#: bp-forums/bp-forums-loader.php:136
+#: bp-forums/bp-forums-loader.php:142
 msgid "Replied To"
 msgstr ""
 
-#: bp-forums/bp-forums-loader.php:182
+#: bp-forums/bp-forums-loader.php:188
 msgid "Replies"
 msgstr ""
 
-#: bp-forums/bp-forums-loader.php:190
+#: bp-forums/bp-forums-loader.php:196
 msgid "Favorite Topics"
 msgstr ""
 
@@ -2198,8 +2173,8 @@ msgstr ""
 msgid "Please pick the group forum where you would like to post this topic."
 msgstr ""
 
-#: bp-forums/bp-forums-screens.php:188 bp-groups/bp-groups-template.php:1690
-#: bp-groups/bp-groups-template.php:1691
+#: bp-forums/bp-forums-screens.php:188 bp-groups/bp-groups-template.php:1712
+#: bp-groups/bp-groups-template.php:1713
 #: bp-templates/bp-legacy/buddypress/groups/single/forum.php:19
 #: bp-themes/bp-default/forums/index.php:23
 #: bp-themes/bp-default/groups/single/forum.php:19
@@ -2219,8 +2194,8 @@ msgstr ""
 #: bp-forums/bp-forums-template.php:505 bp-forums/bp-forums-template.php:567
 #: bp-forums/bp-forums-template.php:1216
 #: bp-messages/bp-messages-classes.php:269
-#: bp-messages/bp-messages-template.php:841
-#: bp-messages/bp-messages-template.php:902
+#: bp-messages/bp-messages-template.php:843
+#: bp-messages/bp-messages-template.php:904
 msgid "Deleted User"
 msgstr ""
 
@@ -2228,11 +2203,11 @@ msgstr ""
 msgid "Group logo for %s"
 msgstr ""
 
-#: bp-forums/bp-forums-template.php:683 bp-groups/bp-groups-template.php:1013
+#: bp-forums/bp-forums-template.php:683 bp-groups/bp-groups-template.php:1035
 msgid "%d post"
 msgstr ""
 
-#: bp-forums/bp-forums-template.php:685 bp-groups/bp-groups-template.php:1015
+#: bp-forums/bp-forums-template.php:685 bp-groups/bp-groups-template.php:1037
 msgid "%d posts"
 msgstr ""
 
@@ -2282,150 +2257,154 @@ msgstr ""
 msgid "Viewing post %1$s to %2$s (%3$s total posts)"
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:29 bp-forums/deprecated/1.7.php:62
+#: bp-forums/deprecated/1.6.php:31 bp-forums/deprecated/1.6.php:133
+msgid "Configure bbPress"
+msgstr ""
+
+#: bp-forums/deprecated/1.6.php:34 bp-forums/deprecated/1.6.php:136
+msgid "Install bbPress"
+msgstr ""
+
+#: bp-forums/deprecated/1.6.php:47
 msgid "Settings Saved."
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:45 bp-forums/deprecated/1.6.php:145
-#: bp-forums/deprecated/1.7.php:83 bp-forums/deprecated/1.7.php:220
+#: bp-forums/deprecated/1.6.php:68
+msgid "(Installed)"
+msgstr ""
+
+#: bp-forums/deprecated/1.6.php:68 bp-forums/deprecated/1.6.php:210
 msgid "Forums for Groups"
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:47 bp-forums/deprecated/1.6.php:147
-#: bp-forums/deprecated/1.7.php:85 bp-forums/deprecated/1.7.php:222
+#: bp-forums/deprecated/1.6.php:70 bp-forums/deprecated/1.6.php:212
 msgid "Give each individual group its own discussion forum. Choose this if you'd like to keep your members' conversations separated into distinct areas."
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:48 bp-forums/deprecated/1.6.php:148
-#: bp-forums/deprecated/1.7.php:86 bp-forums/deprecated/1.7.php:223
-msgid "You may use an existing bbPress installation if you have one."
+#: bp-forums/deprecated/1.6.php:72 bp-forums/deprecated/1.6.php:214
+msgid "Note: This component is retired and will not be receiving any updates in the future.  Only use this component if your current site relies on it."
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:50 bp-forums/deprecated/1.6.php:150
-#: bp-forums/deprecated/1.7.php:88 bp-forums/deprecated/1.7.php:106
-#: bp-forums/deprecated/1.7.php:225 bp-forums/deprecated/1.7.php:244
+#: bp-forums/deprecated/1.6.php:74 bp-forums/deprecated/1.6.php:216
 msgid "Features"
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:52 bp-forums/deprecated/1.6.php:152
-#: bp-forums/deprecated/1.7.php:90 bp-forums/deprecated/1.7.php:227
+#: bp-forums/deprecated/1.6.php:76 bp-forums/deprecated/1.6.php:218
 msgid "Group Integration"
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:53 bp-forums/deprecated/1.6.php:153
-#: bp-forums/deprecated/1.7.php:91 bp-forums/deprecated/1.7.php:228
+#: bp-forums/deprecated/1.6.php:77 bp-forums/deprecated/1.6.php:219
 msgid "Member Profile Integration"
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:54 bp-forums/deprecated/1.6.php:154
-#: bp-forums/deprecated/1.7.php:92 bp-forums/deprecated/1.7.php:110
-#: bp-forums/deprecated/1.7.php:229 bp-forums/deprecated/1.7.php:248
+#: bp-forums/deprecated/1.6.php:78 bp-forums/deprecated/1.6.php:220
 msgid "Activity Stream Integration"
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:55 bp-forums/deprecated/1.6.php:155
-#: bp-forums/deprecated/1.7.php:93 bp-forums/deprecated/1.7.php:111
-#: bp-forums/deprecated/1.7.php:230 bp-forums/deprecated/1.7.php:249
+#: bp-forums/deprecated/1.6.php:79 bp-forums/deprecated/1.6.php:221
 msgid "@ Mention Integration"
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:59
-msgid "Reinstall Group Forums"
+#: bp-forums/deprecated/1.6.php:83
+msgid "Uninstall Group Forums"
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:78 bp-forums/deprecated/1.7.php:153
-msgid "The bb-config.php file was not found at that location, please try again."
+#: bp-forums/deprecated/1.6.php:88 bp-forums/deprecated/1.6.php:231
+msgid "New! bbPress"
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:81 bp-forums/deprecated/1.7.php:156
-msgid "Forums were set up correctly using your existing bbPress install!"
+#: bp-forums/deprecated/1.6.php:89 bp-forums/deprecated/1.6.php:232
+msgid "bbPress is a brand-new forum plugin from one of the lead developers of BuddyPress."
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:82 bp-forums/deprecated/1.7.php:157
-msgid "BuddyPress will now use its internal copy of bbPress to run the forums on your site. If you wish, you can remove your old bbPress installation files, as long as you keep the bb-config.php file in the same location."
+#: bp-forums/deprecated/1.6.php:91 bp-forums/deprecated/1.6.php:234
+msgid "It boasts a bunch of cool features that the BP Legacy Discussion Forums does not have including:"
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:87 bp-forums/deprecated/1.7.php:162
-msgid "Existing bbPress Installation"
+#: bp-forums/deprecated/1.6.php:94 bp-forums/deprecated/1.6.php:237
+msgid "Non-group specific forum creation"
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:88 bp-forums/deprecated/1.7.php:163
-msgid "BuddyPress can make use of your existing bbPress install. Just provide the location of your <code>bb-config.php</code> file, and BuddyPress will do the rest."
+#: bp-forums/deprecated/1.6.php:95 bp-forums/deprecated/1.6.php:238
+msgid "Moderation via the WP admin dashboard"
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:90 bp-forums/deprecated/1.6.php:122
-#: bp-forums/deprecated/1.7.php:165 bp-forums/deprecated/1.7.php:197
-msgid "Complete Installation"
+#: bp-forums/deprecated/1.6.php:96 bp-forums/deprecated/1.6.php:239
+msgid "Topic splitting"
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:106 bp-forums/deprecated/1.7.php:181
-msgid "<p>All done! Configuration settings have been saved to the file <code>bb-config.php</code> in the root of your WordPress install.</p>"
+#: bp-forums/deprecated/1.6.php:97 bp-forums/deprecated/1.6.php:240
+msgid "Revisions"
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:110 bp-forums/deprecated/1.7.php:185
-msgid "<p>A configuration file could not be created. No problem, but you will need to save the text shown below into a file named <code>bb-config.php</code> in the root directory of your WordPress installation before you can start using the forum functionality.</p>"
+#: bp-forums/deprecated/1.6.php:98 bp-forums/deprecated/1.6.php:241
+msgid "Spam management"
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:119 bp-forums/deprecated/1.7.php:194
-msgid "New bbPress Installation"
+#: bp-forums/deprecated/1.6.php:99 bp-forums/deprecated/1.6.php:242
+msgid "Subscriptions"
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:120 bp-forums/deprecated/1.7.php:195
-msgid ""
-"You've decided to set up a new installation of bbPress for forum management in BuddyPress. This is very simple and is usually just a one click\n"
-"\t\t\t\tprocess. When you're ready, hit the link below."
+#: bp-forums/deprecated/1.6.php:100 bp-forums/deprecated/1.6.php:243
+msgid "And more!"
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:132 bp-forums/deprecated/1.7.php:207
-msgid "bbPress files were not found. To install the forums component you must download a copy of bbPress and make sure it is in the folder: \"%s\""
+#: bp-forums/deprecated/1.6.php:103 bp-forums/deprecated/1.6.php:246
+msgid "If you decide to use bbPress, you will need to deactivate the legacy group forum component.  For more info, <a href=\"%s\">read this codex article</a>."
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:159 bp-forums/deprecated/1.7.php:234
-msgid "Install Group Forums"
+#: bp-forums/deprecated/1.6.php:143
+msgid "The bb-config.php file was not found at that location, please try again."
 msgstr ""
 
-#: bp-forums/deprecated/1.6.php:160 bp-forums/deprecated/1.7.php:235
-msgid "Use Existing Installation"
+#: bp-forums/deprecated/1.6.php:146
+msgid "Forums were set up correctly using your existing bbPress install!"
 msgstr ""
 
-#: bp-forums/deprecated/1.7.php:46 bp-forums/deprecated/1.7.php:143
-msgid "Configure Site Wide Forums"
+#: bp-forums/deprecated/1.6.php:147
+msgid "BuddyPress will now use its internal copy of bbPress to run the forums on your site. If you wish, you can remove your old bbPress installation files, as long as you keep the bb-config.php file in the same location."
 msgstr ""
 
-#: bp-forums/deprecated/1.7.php:49 bp-forums/deprecated/1.7.php:146
-msgid "Install Site Wide Forums"
+#: bp-forums/deprecated/1.6.php:152
+msgid "Existing bbPress Installation"
 msgstr ""
 
-#: bp-forums/deprecated/1.7.php:83
-msgid "(Installed)"
+#: bp-forums/deprecated/1.6.php:153
+msgid "BuddyPress can make use of your existing bbPress install. Just provide the location of your <code>bb-config.php</code> file, and BuddyPress will do the rest."
 msgstr ""
 
-#: bp-forums/deprecated/1.7.php:97
-msgid "Uninstall Group Forums"
+#: bp-forums/deprecated/1.6.php:155 bp-forums/deprecated/1.6.php:187
+msgid "Complete Installation"
 msgstr ""
 
-#: bp-forums/deprecated/1.7.php:102 bp-forums/deprecated/1.7.php:240
-msgid "New! Site Wide Forums"
+#: bp-forums/deprecated/1.6.php:171
+msgid "<p>All done! Configuration settings have been saved to the file <code>bb-config.php</code> in the root of your WordPress install.</p>"
 msgstr ""
 
-#: bp-forums/deprecated/1.7.php:103 bp-forums/deprecated/1.7.php:241
-msgid "Your site will have central forums that are not isolated to any specific group. Choose this if you'd like to have a central forum area for your members."
+#: bp-forums/deprecated/1.6.php:175
+msgid "<p>A configuration file could not be created. No problem, but you will need to save the text shown below into a file named <code>bb-config.php</code> in the root directory of your WordPress installation before you can start using the forum functionality.</p>"
 msgstr ""
 
-#: bp-forums/deprecated/1.7.php:104 bp-forums/deprecated/1.7.php:242
-msgid "You may activate both Group and Site Wide forums, but this may create a poor experience for your members."
+#: bp-forums/deprecated/1.6.php:184
+msgid "New bbPress Installation"
 msgstr ""
 
-#: bp-forums/deprecated/1.7.php:108 bp-forums/deprecated/1.7.php:246
-msgid "Central Discussion Area"
+#: bp-forums/deprecated/1.6.php:185
+msgid ""
+"You've decided to set up a new installation of bbPress for forum management in BuddyPress. This is very simple and is usually just a one click\n"
+"\t\t\t\tprocess. When you're ready, hit the link below."
 msgstr ""
 
-#: bp-forums/deprecated/1.7.php:109 bp-forums/deprecated/1.7.php:247
-msgid "Forum Plugins Available"
+#: bp-forums/deprecated/1.6.php:197
+msgid "bbPress files were not found. To install the forums component you must download a copy of bbPress and make sure it is in the folder: \"%s\""
 msgstr ""
 
-#: bp-forums/deprecated/1.7.php:121
-msgid "Need help deciding between Group Forums and Site Wide Forums? Visit <a href=\"%s\">the BuddyPress codex</a> for more information."
+#: bp-forums/deprecated/1.6.php:225
+msgid "Install Group Forums"
+msgstr ""
+
+#: bp-forums/deprecated/1.6.php:226
+msgid "Use Existing Installation"
 msgstr ""
 
 #: bp-friends/bp-friends-actions.php:35
@@ -2445,8 +2424,8 @@ msgid "You already have a pending friendship request with this user"
 msgstr ""
 
 #: bp-friends/bp-friends-actions.php:70
-#: bp-templates/bp-legacy/buddypress-functions.php:889
-#: bp-themes/bp-default/_inc/ajax.php:605
+#: bp-templates/bp-legacy/buddypress-functions.php:955
+#: bp-themes/bp-default/_inc/ajax.php:617
 msgid "Friendship could not be canceled."
 msgstr ""
 
@@ -2491,8 +2470,8 @@ msgstr ""
 msgid "You have a friendship request from %s"
 msgstr ""
 
-#: bp-friends/bp-friends-functions.php:100
-#: bp-friends/bp-friends-functions.php:109
+#: bp-friends/bp-friends-functions.php:104
+#: bp-friends/bp-friends-functions.php:113
 msgid "%1$s and %2$s are now friends"
 msgstr ""
 
@@ -2506,14 +2485,14 @@ msgstr ""
 
 #: bp-friends/bp-friends-loader.php:118 bp-friends/bp-friends-loader.php:180
 #: bp-friends/bp-friends-loader.php:207
-#: bp-templates/bp-legacy/buddypress/activity/index.php:100
+#: bp-templates/bp-legacy/buddypress/activity/index.php:104
 #: bp-templates/bp-legacy/buddypress/members/single/activity.php:35
-#: bp-themes/bp-default/activity/index.php:120
+#: bp-themes/bp-default/activity/index.php:124
 #: bp-themes/bp-default/members/single/activity.php:35
 msgid "Friendships"
 msgstr ""
 
-#: bp-friends/bp-friends-loader.php:128 bp-groups/bp-groups-template.php:1458
+#: bp-friends/bp-friends-loader.php:128 bp-groups/bp-groups-template.php:1480
 msgid "Requests"
 msgstr ""
 
@@ -2622,8 +2601,8 @@ msgid "%d friends"
 msgstr ""
 
 #: bp-friends/bp-friends-template.php:285
-#: bp-templates/bp-legacy/buddypress-functions.php:901
-#: bp-themes/bp-default/_inc/ajax.php:617
+#: bp-templates/bp-legacy/buddypress-functions.php:967
+#: bp-themes/bp-default/_inc/ajax.php:629
 msgid "Cancel Friendship Request"
 msgstr ""
 
@@ -2638,10 +2617,10 @@ msgstr ""
 
 #: bp-friends/bp-friends-template.php:319
 #: bp-friends/bp-friends-template.php:320
-#: bp-templates/bp-legacy/buddypress-functions.php:891
-#: bp-templates/bp-legacy/buddypress-functions.php:909
-#: bp-themes/bp-default/_inc/ajax.php:607
-#: bp-themes/bp-default/_inc/ajax.php:625
+#: bp-templates/bp-legacy/buddypress-functions.php:957
+#: bp-templates/bp-legacy/buddypress-functions.php:975
+#: bp-themes/bp-default/_inc/ajax.php:619
+#: bp-themes/bp-default/_inc/ajax.php:637
 msgid "Add Friend"
 msgstr ""
 
@@ -2657,42 +2636,46 @@ msgstr ""
 msgid "Please fill in all of the required fields"
 msgstr ""
 
-#: bp-groups/bp-groups-actions.php:79 bp-groups/bp-groups-actions.php:106
+#: bp-groups/bp-groups-actions.php:79 bp-groups/bp-groups-actions.php:103
 msgid "There was an error saving group details, please try again."
 msgstr ""
 
-#: bp-groups/bp-groups-actions.php:145
+#: bp-groups/bp-groups-actions.php:142
 msgid "%1$s created the group %2$s"
 msgstr ""
 
-#: bp-groups/bp-groups-actions.php:197
+#: bp-groups/bp-groups-actions.php:194
 msgid "There was an error saving the group avatar, please try uploading again."
 msgstr ""
 
-#: bp-groups/bp-groups-actions.php:199
+#: bp-groups/bp-groups-actions.php:196
 msgid "The group avatar was uploaded successfully!"
 msgstr ""
 
-#: bp-groups/bp-groups-actions.php:223 bp-groups/bp-groups-actions.php:230
+#: bp-groups/bp-groups-actions.php:220 bp-groups/bp-groups-actions.php:227
 msgid "There was an error joining the group."
 msgstr ""
 
-#: bp-groups/bp-groups-actions.php:232
+#: bp-groups/bp-groups-actions.php:229
 msgid "You joined the group!"
 msgstr ""
 
-#: bp-groups/bp-groups-actions.php:258 bp-groups/bp-groups-screens.php:709
+#: bp-groups/bp-groups-actions.php:255 bp-groups/bp-groups-screens.php:711
 msgid "This group must have at least one admin"
 msgstr ""
 
-#: bp-groups/bp-groups-actions.php:261
+#: bp-groups/bp-groups-actions.php:258
 msgid "There was an error leaving the group."
 msgstr ""
 
-#: bp-groups/bp-groups-actions.php:263 bp-groups/bp-groups-functions.php:313
+#: bp-groups/bp-groups-actions.php:260 bp-groups/bp-groups-functions.php:309
 msgid "You successfully left the group."
 msgstr ""
 
+#: bp-groups/bp-groups-actions.php:334
+msgid "Activity feed for the group, %s."
+msgstr ""
+
 #: bp-groups/bp-groups-activity.php:23
 msgid "Created a group"
 msgstr ""
@@ -2826,74 +2809,78 @@ msgstr ""
 msgid "Start typing a username to add a new member."
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:443
+#: bp-groups/bp-groups-admin.php:170
+msgid "If you leave this page, you will lose any unsaved changes you have made to the group."
+msgstr ""
+
+#: bp-groups/bp-groups-admin.php:444
 msgid "You cannot remove all administrators from a group."
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:447
+#: bp-groups/bp-groups-admin.php:448
 msgid "An error occurred when trying to update your group details."
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:449
+#: bp-groups/bp-groups-admin.php:450
 msgid "The group has been updated successfully."
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:453
+#: bp-groups/bp-groups-admin.php:454
 msgid "The following users could not be added to the group: <em>%s</em>"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:457
+#: bp-groups/bp-groups-admin.php:458
 msgid "The following users were successfully added to the group: <em>%s</em>"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:462
+#: bp-groups/bp-groups-admin.php:463
 msgid "An error occurred when trying to modify the following members: <em>%s</em>"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:467
+#: bp-groups/bp-groups-admin.php:468
 msgid "The following members were successfully modified: <em>%s</em>"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:486 bp-groups/bp-groups-adminbar.php:40
+#: bp-groups/bp-groups-admin.php:487 bp-groups/bp-groups-adminbar.php:40
 #: bp-xprofile/bp-xprofile-admin.php:114
 msgid "Edit Group"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:489
+#: bp-groups/bp-groups-admin.php:490 bp-groups/bp-groups-admin.php:626
 msgid "Add New"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:508
+#: bp-groups/bp-groups-admin.php:509
 msgid "Name and Description"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:535
+#: bp-groups/bp-groups-admin.php:536
 msgid "No group found with this ID. <a href=\"%s\">Go back and try again</a>."
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:573
+#: bp-groups/bp-groups-admin.php:574
 msgid "Delete Groups"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:574
+#: bp-groups/bp-groups-admin.php:575
 msgid "You are about to delete the following groups:"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:582
+#: bp-groups/bp-groups-admin.php:583
 msgid "This action cannot be undone."
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:609
+#: bp-groups/bp-groups-admin.php:610
 msgid "%s group has been permanently deleted."
 msgid_plural "%s groups have been permanently deleted."
 msgstr[0] ""
 msgstr[1] ""
 
-#: bp-groups/bp-groups-admin.php:638
+#: bp-groups/bp-groups-admin.php:643
 msgid "Search all Groups"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:660
+#: bp-groups/bp-groups-admin.php:665
 #: bp-templates/bp-legacy/buddypress/groups/create.php:112
 #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:47
 #: bp-themes/bp-default/groups/create.php:119
@@ -2901,29 +2888,29 @@ msgstr ""
 msgid "Enable discussion forum"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:665
+#: bp-groups/bp-groups-admin.php:670
 msgid "Privacy"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:668 bp-groups/bp-groups-admin.php:1295
-#: bp-groups/bp-groups-template.php:625
+#: bp-groups/bp-groups-admin.php:673 bp-groups/bp-groups-admin.php:1385
+#: bp-groups/bp-groups-template.php:647
 msgid "Public"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:669 bp-groups/bp-groups-admin.php:1298
-#: bp-groups/bp-groups-template.php:627
+#: bp-groups/bp-groups-admin.php:674 bp-groups/bp-groups-admin.php:1388
+#: bp-groups/bp-groups-template.php:649
 msgid "Private"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:670 bp-groups/bp-groups-admin.php:1301
+#: bp-groups/bp-groups-admin.php:675 bp-groups/bp-groups-admin.php:1391
 msgid "Hidden"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:674
+#: bp-groups/bp-groups-admin.php:679
 msgid "Who can invite others to this group?"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:677
+#: bp-groups/bp-groups-admin.php:682
 #: bp-templates/bp-legacy/buddypress/groups/create.php:89
 #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:99
 #: bp-themes/bp-default/groups/create.php:96
@@ -2931,7 +2918,7 @@ msgstr ""
 msgid "All group members"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:678
+#: bp-groups/bp-groups-admin.php:683
 #: bp-templates/bp-legacy/buddypress/groups/create.php:94
 #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:104
 #: bp-themes/bp-default/groups/create.php:101
@@ -2939,7 +2926,7 @@ msgstr ""
 msgid "Group admins and mods only"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:679
+#: bp-groups/bp-groups-admin.php:684
 #: bp-templates/bp-legacy/buddypress/groups/create.php:99
 #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:109
 #: bp-themes/bp-default/groups/create.php:106
@@ -2947,81 +2934,81 @@ msgstr ""
 msgid "Group admins only"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:694
+#: bp-groups/bp-groups-admin.php:699
 msgid "Enter a comma-separated list of user logins."
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:762
+#: bp-groups/bp-groups-admin.php:757
 #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:177
 #: bp-themes/bp-default/groups/single/admin.php:177
 msgid "Administrators"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:763
+#: bp-groups/bp-groups-admin.php:758
 #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:205
 #: bp-themes/bp-default/groups/single/admin.php:205
 msgid "Moderators"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:765
+#: bp-groups/bp-groups-admin.php:760
 msgid "Banned Users"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:774
+#: bp-groups/bp-groups-admin.php:773
 msgctxt "Group member user_id in group admin"
 msgid "ID"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:775
+#: bp-groups/bp-groups-admin.php:774
 msgctxt "Group member name in group admin"
 msgid "Name"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:776
+#: bp-groups/bp-groups-admin.php:775
 msgctxt "Group member role in group admin"
 msgid "Group Role"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:799
+#: bp-groups/bp-groups-admin.php:797
 msgid "Administrator"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:800
+#: bp-groups/bp-groups-admin.php:798
 msgid "Moderator"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:801
+#: bp-groups/bp-groups-admin.php:799
 msgid "Member"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:802
+#: bp-groups/bp-groups-admin.php:800
 msgid "Banned"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:803
+#: bp-groups/bp-groups-admin.php:801
 msgid "Remove From Group"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:824
+#: bp-groups/bp-groups-admin.php:834
 msgid "No members of this type"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:849 bp-groups/bp-groups-adminbar.php:102
-#: bp-groups/bp-groups-buddybar.php:58
+#: bp-groups/bp-groups-admin.php:859 bp-groups/bp-groups-adminbar.php:102
+#: bp-groups/bp-groups-buddybar.php:57
 #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:360
 #: bp-themes/bp-default/groups/single/admin.php:360
 #: bp-xprofile/bp-xprofile-admin.php:118
 msgid "Delete Group"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:853
+#: bp-groups/bp-groups-admin.php:863 bp-groups/bp-groups-classes.php:2121
 #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:32
 #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:117
 #: bp-templates/bp-legacy/buddypress/groups/single/forum/edit.php:58
 #: bp-templates/bp-legacy/buddypress/groups/single/forum/edit.php:74
 #: bp-templates/bp-legacy/buddypress/members/single/profile/edit.php:148
-#: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:30
-#: bp-templates/bp-legacy/buddypress/members/single/settings/notifications.php:19
+#: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:22
+#: bp-templates/bp-legacy/buddypress/members/single/settings/notifications.php:11
 #: bp-themes/bp-default/groups/single/admin.php:32
 #: bp-themes/bp-default/groups/single/admin.php:117
 #: bp-themes/bp-default/groups/single/forum/edit.php:58
@@ -3033,54 +3020,76 @@ msgstr ""
 msgid "Save Changes"
 msgstr ""
 
+#: bp-groups/bp-groups-admin.php:910
+msgid "&laquo;"
+msgstr ""
+
+#: bp-groups/bp-groups-admin.php:911
+msgid "&raquo;"
+msgstr ""
+
+#: bp-groups/bp-groups-admin.php:917
+msgid "Viewing %1$s - %2$s of %3$s"
+msgstr ""
+
+#: bp-groups/bp-groups-admin.php:920 bp-groups/bp-groups-template.php:960
+msgid "%s member"
+msgid_plural "%s members"
+msgstr[0] ""
+msgstr[1] ""
+
 #. translators: 1: user_login, 2: user_email
 
-#: bp-groups/bp-groups-admin.php:906
+#: bp-groups/bp-groups-admin.php:983
 msgid "%1$s (%2$s)"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:1075
+#: bp-groups/bp-groups-admin.php:1155
 msgid "No groups found."
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:1139
+#: bp-groups/bp-groups-admin.php:1220
 msgid "Public <span class=\"count\">(%s)</span>"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:1140
+#: bp-groups/bp-groups-admin.php:1221
 msgid "Private <span class=\"count\">(%s)</span>"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:1141
+#: bp-groups/bp-groups-admin.php:1222
 msgid "Hidden <span class=\"count\">(%s)</span>"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:1170
+#: bp-groups/bp-groups-admin.php:1251
 msgctxt "Groups admin Group Name column header"
 msgid "Name"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:1171
+#: bp-groups/bp-groups-admin.php:1252
 msgctxt "Groups admin Group Description column header"
 msgid "Description"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:1172
+#: bp-groups/bp-groups-admin.php:1253
 msgctxt "Groups admin Privacy Status column header"
 msgid "Status"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:1173
+#: bp-groups/bp-groups-admin.php:1254
 msgctxt "Groups admin Members column header"
 msgid "# Members"
 msgstr ""
 
-#: bp-groups/bp-groups-admin.php:1174
+#: bp-groups/bp-groups-admin.php:1255
 msgctxt "Groups admin Last Active column header"
 msgid "Last Active"
 msgstr ""
 
-#: bp-groups/bp-groups-adminbar.php:48 bp-groups/bp-groups-buddybar.php:34
+#: bp-groups/bp-groups-admin.php:1291
+msgid "Select group %1$d"
+msgstr ""
+
+#: bp-groups/bp-groups-adminbar.php:48 bp-groups/bp-groups-buddybar.php:33
 msgid "Edit Details"
 msgstr ""
 
@@ -3092,36 +3101,36 @@ msgstr ""
 msgid "Edit Avatar"
 msgstr ""
 
-#: bp-groups/bp-groups-adminbar.php:75 bp-groups/bp-groups-buddybar.php:46
+#: bp-groups/bp-groups-adminbar.php:75 bp-groups/bp-groups-buddybar.php:45
 msgid "Manage Invitations"
 msgstr ""
 
-#: bp-groups/bp-groups-adminbar.php:84 bp-groups/bp-groups-buddybar.php:50
+#: bp-groups/bp-groups-adminbar.php:84 bp-groups/bp-groups-buddybar.php:49
 msgid "Manage Members"
 msgstr ""
 
-#: bp-groups/bp-groups-adminbar.php:93 bp-groups/bp-groups-buddybar.php:54
+#: bp-groups/bp-groups-adminbar.php:93 bp-groups/bp-groups-buddybar.php:53
 msgid "Membership Requests"
 msgstr ""
 
-#: bp-groups/bp-groups-buddybar.php:31 bp-members/bp-members-buddybar.php:120
+#: bp-groups/bp-groups-buddybar.php:30 bp-members/bp-members-buddybar.php:120
 msgid "Admin Options"
 msgstr ""
 
-#: bp-groups/bp-groups-buddybar.php:36
+#: bp-groups/bp-groups-buddybar.php:35
 msgid "Group Settings"
 msgstr ""
 
-#: bp-groups/bp-groups-buddybar.php:40 bp-groups/bp-groups-loader.php:585
-#: bp-groups/bp-groups-template.php:2586
+#: bp-groups/bp-groups-buddybar.php:39 bp-groups/bp-groups-loader.php:595
+#: bp-groups/bp-groups-template.php:2606
 msgid "Group Avatar"
 msgstr ""
 
-#: bp-groups/bp-groups-classes.php:884
+#: bp-groups/bp-groups-classes.php:1303
 msgid "Group Mod"
 msgstr ""
 
-#: bp-groups/bp-groups-classes.php:890 bp-groups/bp-groups-functions.php:121
+#: bp-groups/bp-groups-classes.php:1309 bp-groups/bp-groups-functions.php:121
 msgid "Group Admin"
 msgstr ""
 
@@ -3137,16 +3146,16 @@ msgstr ""
 msgid "%1$s edited the forum topic %2$s in the group %3$s"
 msgstr ""
 
-#: bp-groups/bp-groups-functions.php:288
+#: bp-groups/bp-groups-functions.php:290
 msgid "As the only Admin, you cannot leave the group."
 msgstr ""
 
-#: bp-groups/bp-groups-functions.php:357 bp-groups/bp-groups-functions.php:878
+#: bp-groups/bp-groups-functions.php:353 bp-groups/bp-groups-functions.php:920
 #: bp-groups/bp-groups-screens.php:62
 msgid "%1$s joined the group %2$s"
 msgstr ""
 
-#: bp-groups/bp-groups-functions.php:568
+#: bp-groups/bp-groups-functions.php:614
 msgid "%1$s posted an update in the group %2$s"
 msgstr ""
 
@@ -3162,11 +3171,11 @@ msgstr ""
 msgid "You are not an admin of this group."
 msgstr ""
 
-#: bp-groups/bp-groups-loader.php:298 bp-groups/bp-groups-template.php:1439
+#: bp-groups/bp-groups-loader.php:298 bp-groups/bp-groups-template.php:1461
 msgid "Details"
 msgstr ""
 
-#: bp-groups/bp-groups-loader.php:310 bp-groups/bp-groups-template.php:1450
+#: bp-groups/bp-groups-loader.php:310 bp-groups/bp-groups-template.php:1472
 msgid "Avatar"
 msgstr ""
 
@@ -3179,7 +3188,7 @@ msgid "Groups <span>%d</span>"
 msgstr ""
 
 #: bp-groups/bp-groups-loader.php:368 bp-groups/bp-groups-loader.php:398
-#: bp-groups/bp-groups-loader.php:537 bp-groups/bp-groups-loader.php:565
+#: bp-groups/bp-groups-loader.php:537 bp-groups/bp-groups-loader.php:575
 msgid "Memberships"
 msgstr ""
 
@@ -3192,10 +3201,10 @@ msgctxt "Group home navigation title"
 msgid "Home"
 msgstr ""
 
-#: bp-groups/bp-groups-loader.php:427 bp-groups/bp-groups-template.php:1771
-#: bp-groups/bp-groups-template.php:1772
-#: bp-templates/bp-legacy/buddypress-functions.php:1008
-#: bp-themes/bp-default/_inc/ajax.php:724
+#: bp-groups/bp-groups-loader.php:427 bp-groups/bp-groups-template.php:1793
+#: bp-groups/bp-groups-template.php:1794
+#: bp-templates/bp-legacy/buddypress-functions.php:1074
+#: bp-themes/bp-default/_inc/ajax.php:736
 msgid "Request Membership"
 msgstr ""
 
@@ -3436,187 +3445,183 @@ msgstr ""
 msgid "Your membership request was sent to the group administrator successfully. You will be notified when the group administrator responds to your request."
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:527
+#: bp-groups/bp-groups-screens.php:529
 msgid "There was an error updating group details, please try again."
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:529
+#: bp-groups/bp-groups-screens.php:531
 msgid "Group details were successfully updated."
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:571
+#: bp-groups/bp-groups-screens.php:573
 msgid "There was an error updating group settings, please try again."
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:573
+#: bp-groups/bp-groups-screens.php:575
 msgid "Group settings were successfully updated."
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:605 bp-xprofile/bp-xprofile-actions.php:39
+#: bp-groups/bp-groups-screens.php:607 bp-xprofile/bp-xprofile-actions.php:39
 msgid "Your avatar was deleted successfully!"
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:607 bp-xprofile/bp-xprofile-actions.php:41
+#: bp-groups/bp-groups-screens.php:609 bp-xprofile/bp-xprofile-actions.php:41
 msgid "There was a problem deleting that avatar, please try again."
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:650
+#: bp-groups/bp-groups-screens.php:652
 msgid "There was a problem cropping the avatar."
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:652
+#: bp-groups/bp-groups-screens.php:654
 msgid "The new group avatar was uploaded successfully."
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:688
+#: bp-groups/bp-groups-screens.php:690
 msgid "There was an error when promoting that user, please try again"
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:690
+#: bp-groups/bp-groups-screens.php:692
 msgid "User promoted successfully"
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:713
+#: bp-groups/bp-groups-screens.php:715
 msgid "There was an error when demoting that user, please try again"
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:715
+#: bp-groups/bp-groups-screens.php:717
 msgid "User demoted successfully"
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:731
+#: bp-groups/bp-groups-screens.php:733
 msgid "There was an error when banning that user, please try again"
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:733
+#: bp-groups/bp-groups-screens.php:735
 msgid "User banned successfully"
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:749
+#: bp-groups/bp-groups-screens.php:751
 msgid "There was an error when unbanning that user, please try again"
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:751
+#: bp-groups/bp-groups-screens.php:753
 msgid "User ban removed successfully"
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:767
+#: bp-groups/bp-groups-screens.php:769
 msgid "There was an error removing that user from the group, please try again"
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:769
+#: bp-groups/bp-groups-screens.php:771
 msgid "User removed successfully"
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:807
+#: bp-groups/bp-groups-screens.php:809
 msgid "There was an error accepting the membership request, please try again."
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:809
+#: bp-groups/bp-groups-screens.php:811
 msgid "Group membership request accepted"
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:818
+#: bp-groups/bp-groups-screens.php:820
 msgid "There was an error rejecting the membership request, please try again."
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:820
+#: bp-groups/bp-groups-screens.php:822
 msgid "Group membership request rejected"
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:852
+#: bp-groups/bp-groups-screens.php:854
 msgid "There was an error deleting the group, please try again."
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:854
+#: bp-groups/bp-groups-screens.php:856
 msgid "The group was deleted successfully"
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:902
+#: bp-groups/bp-groups-screens.php:904
 msgid "A member invites you to join a group"
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:908
+#: bp-groups/bp-groups-screens.php:910
 msgid "Group information is updated"
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:914
+#: bp-groups/bp-groups-screens.php:916
 msgid "You are promoted to a group administrator or moderator"
 msgstr ""
 
-#: bp-groups/bp-groups-screens.php:920
+#: bp-groups/bp-groups-screens.php:922
 msgid "A member requests to join a private group for which you are an admin"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:214
+#: bp-groups/bp-groups-template.php:218
 msgctxt "Group pagination previous text"
 msgid "&larr;"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:215
+#: bp-groups/bp-groups-template.php:219
 msgctxt "Group pagination next text"
 msgid "&rarr;"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:458
+#: bp-groups/bp-groups-template.php:480
 msgid "Public Group"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:460
+#: bp-groups/bp-groups-template.php:482
 msgid "Hidden Group"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:462
+#: bp-groups/bp-groups-template.php:484
 msgid "Private Group"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:464
+#: bp-groups/bp-groups-template.php:486
 msgid "Group"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:536
+#: bp-groups/bp-groups-template.php:558
 msgid "not yet active"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:718
+#: bp-groups/bp-groups-template.php:740
 msgid "Group creator avatar of %s"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:753
+#: bp-groups/bp-groups-template.php:775
 msgid "No Admins"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:780
+#: bp-groups/bp-groups-template.php:802
 msgid "No Mods"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:862
+#: bp-groups/bp-groups-template.php:884
 msgid "Filter Groups"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:910
+#: bp-groups/bp-groups-template.php:932
 msgid "Viewing group %1$s to %2$s (of %3$s groups)"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:938
-msgid "%s member"
-msgstr ""
-
-#: bp-groups/bp-groups-template.php:940
+#: bp-groups/bp-groups-template.php:962
 #: bp-templates/bp-legacy/buddypress/members/single/groups/invites.php:14
 #: bp-themes/bp-default/members/single/groups/invites.php:14
 msgid "%s members"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:979
+#: bp-groups/bp-groups-template.php:1001
 msgid "%d topic"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:981
+#: bp-groups/bp-groups-template.php:1003
 msgid "%d topics"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:1207 bp-groups/bp-groups-template.php:1272
+#: bp-groups/bp-groups-template.php:1229 bp-groups/bp-groups-template.php:1294
 #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:190
 #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:217
 #: bp-themes/bp-default/groups/single/admin.php:190
@@ -3624,16 +3629,16 @@ msgstr ""
 msgid "Demote to Member"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:1220 bp-groups/bp-groups-template.php:1285
-#: bp-groups/bp-groups-template.php:2085
+#: bp-groups/bp-groups-template.php:1242 bp-groups/bp-groups-template.php:1307
+#: bp-groups/bp-groups-template.php:2105
 msgid "joined %s"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:1243
+#: bp-groups/bp-groups-template.php:1265
 msgid "This group has no administrators"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:1271
+#: bp-groups/bp-groups-template.php:1293
 #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:216
 #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:272
 #: bp-themes/bp-default/groups/single/admin.php:216
@@ -3641,75 +3646,75 @@ msgstr ""
 msgid "Promote to Admin"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:1305
+#: bp-groups/bp-groups-template.php:1327
 msgid "This group has no moderators"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:1730 bp-groups/bp-groups-template.php:1731
-#: bp-templates/bp-legacy/buddypress-functions.php:987
-#: bp-themes/bp-default/_inc/ajax.php:703
+#: bp-groups/bp-groups-template.php:1752 bp-groups/bp-groups-template.php:1753
+#: bp-templates/bp-legacy/buddypress-functions.php:1053
+#: bp-themes/bp-default/_inc/ajax.php:715
 msgid "Leave Group"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:1753 bp-groups/bp-groups-template.php:1754
-#: bp-templates/bp-legacy/buddypress-functions.php:1006
-#: bp-themes/bp-default/_inc/ajax.php:722
+#: bp-groups/bp-groups-template.php:1775 bp-groups/bp-groups-template.php:1776
+#: bp-templates/bp-legacy/buddypress-functions.php:1072
+#: bp-themes/bp-default/_inc/ajax.php:734
 msgid "Join Group"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:1786 bp-groups/bp-groups-template.php:1787
+#: bp-groups/bp-groups-template.php:1808 bp-groups/bp-groups-template.php:1809
 msgid "Request Sent"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:1817
+#: bp-groups/bp-groups-template.php:1839
 msgid "This is a private group and you must request group membership in order to join."
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:1819
+#: bp-groups/bp-groups-template.php:1841
 msgid "This is a private group. To join you must be a registered site member and request group membership."
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:1822
+#: bp-groups/bp-groups-template.php:1844
 msgid "This is a private group. Your membership request is awaiting approval from the group administrator."
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:1826
+#: bp-groups/bp-groups-template.php:1848
 msgid "This is a hidden group and only invited members can join."
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:2133
+#: bp-groups/bp-groups-template.php:2153
 msgid "Viewing members %1$s to %2$s (of %3$s members)"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:2359
+#: bp-groups/bp-groups-template.php:2379
 msgid "Group avatar"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:2499 bp-groups/bp-groups-template.php:2523
+#: bp-groups/bp-groups-template.php:2519 bp-groups/bp-groups-template.php:2543
 msgid "Recently Joined"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:2500 bp-groups/bp-groups-template.php:2526
+#: bp-groups/bp-groups-template.php:2520 bp-groups/bp-groups-template.php:2546
 msgid "Most Popular"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:2501 bp-groups/bp-groups-template.php:2529
+#: bp-groups/bp-groups-template.php:2521 bp-groups/bp-groups-template.php:2549
 msgid "Administrator Of"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:2502 bp-groups/bp-groups-template.php:2532
+#: bp-groups/bp-groups-template.php:2522 bp-groups/bp-groups-template.php:2552
 msgid "Moderator Of"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:2590
+#: bp-groups/bp-groups-template.php:2610
 msgid "No Group Avatar"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:2791
+#: bp-groups/bp-groups-template.php:2811
 msgid "requested %s"
 msgstr ""
 
-#: bp-groups/bp-groups-template.php:2966
+#: bp-groups/bp-groups-template.php:2986
 msgid "Group Activity RSS Feed"
 msgstr ""
 
@@ -3722,27 +3727,27 @@ msgctxt "widget name"
 msgid "(BuddyPress) Groups"
 msgstr ""
 
-#: bp-groups/bp-groups-widgets.php:76 bp-groups/bp-groups-widgets.php:179
+#: bp-groups/bp-groups-widgets.php:78 bp-groups/bp-groups-widgets.php:181
 msgid "created %s"
 msgstr ""
 
-#: bp-groups/bp-groups-widgets.php:95
+#: bp-groups/bp-groups-widgets.php:97
 msgid "There are no groups to display."
 msgstr ""
 
-#: bp-groups/bp-groups-widgets.php:132
+#: bp-groups/bp-groups-widgets.php:134
 msgid "Link widget title to Groups directory"
 msgstr ""
 
-#: bp-groups/bp-groups-widgets.php:134
+#: bp-groups/bp-groups-widgets.php:136
 msgid "Max groups to show:"
 msgstr ""
 
-#: bp-groups/bp-groups-widgets.php:137
+#: bp-groups/bp-groups-widgets.php:139
 msgid "Default groups to show:"
 msgstr ""
 
-#: bp-groups/bp-groups-widgets.php:197
+#: bp-groups/bp-groups-widgets.php:199
 msgid "No groups matched the current filter."
 msgstr ""
 
@@ -3750,7 +3755,7 @@ msgstr ""
 msgid "Cheatin&#8217; huh?"
 msgstr ""
 
-#: bp-loader.php:530
+#: bp-loader.php:547
 msgid "BuddyPress Default"
 msgstr ""
 
@@ -3783,26 +3788,26 @@ msgid "Edit Member"
 msgstr ""
 
 #: bp-members/bp-members-adminbar.php:99
-#: bp-xprofile/bp-xprofile-template.php:895
-#: bp-xprofile/bp-xprofile-template.php:896
+#: bp-xprofile/bp-xprofile-template.php:927
+#: bp-xprofile/bp-xprofile-template.php:928
 msgid "Edit Profile"
 msgstr ""
 
-#: bp-members/bp-members-adminbar.php:115
+#: bp-members/bp-members-adminbar.php:118
 #: bp-members/bp-members-buddybar.php:131
 msgid "User Capabilities"
 msgstr ""
 
-#: bp-members/bp-members-adminbar.php:123
+#: bp-members/bp-members-adminbar.php:126
 #: bp-settings/bp-settings-loader.php:130
 #: bp-settings/bp-settings-loader.php:190
-#: bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php:33
+#: bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php:27
 #: bp-themes/bp-default/members/single/settings/delete-account.php:50
 #: bp-themes/bp-default/members/single/settings/delete-account.php:76
 msgid "Delete Account"
 msgstr ""
 
-#: bp-members/bp-members-adminbar.php:167
+#: bp-members/bp-members-adminbar.php:173
 msgid "No new notifications"
 msgstr ""
 
@@ -3831,61 +3836,66 @@ msgstr ""
 msgid "Delete %s's Account"
 msgstr ""
 
-#: bp-members/bp-members-functions.php:897
+#: bp-members/bp-members-functions.php:927
+#: bp-members/bp-members-functions.php:1511
 msgid "<strong>ERROR</strong>: Your account has been marked as a spammer."
 msgstr ""
 
-#: bp-members/bp-members-functions.php:1071
+#: bp-members/bp-members-functions.php:1101
 msgid "Please check your email address."
 msgstr ""
 
-#: bp-members/bp-members-functions.php:1074
-#: bp-members/bp-members-functions.php:1077
+#: bp-members/bp-members-functions.php:1104
+#: bp-members/bp-members-functions.php:1107
 msgid "Sorry, that email address is not allowed!"
 msgstr ""
 
-#: bp-members/bp-members-functions.php:1080
+#: bp-members/bp-members-functions.php:1110
 msgid "Sorry, that email address is already used!"
 msgstr ""
 
-#: bp-members/bp-members-functions.php:1098
+#: bp-members/bp-members-functions.php:1128
 msgid "Please enter a username"
 msgstr ""
 
-#: bp-members/bp-members-functions.php:1106
-msgid "Only lowercase letters and numbers allowed"
+#: bp-members/bp-members-functions.php:1136
+msgid "That username is not allowed"
+msgstr ""
+
+#: bp-members/bp-members-functions.php:1139
+msgid "Usernames can contain only letters, numbers, ., -, *, and @"
 msgstr ""
 
-#: bp-members/bp-members-functions.php:1109
+#: bp-members/bp-members-functions.php:1142
 msgid "Username must be at least 4 characters"
 msgstr ""
 
-#: bp-members/bp-members-functions.php:1112
+#: bp-members/bp-members-functions.php:1145
 msgid "Sorry, usernames may not contain the character \"_\"!"
 msgstr ""
 
-#: bp-members/bp-members-functions.php:1119
+#: bp-members/bp-members-functions.php:1152
 msgid "Sorry, usernames must have letters too!"
 msgstr ""
 
-#: bp-members/bp-members-functions.php:1123
+#: bp-members/bp-members-functions.php:1156
 msgid "Sorry, that username already exists!"
 msgstr ""
 
-#: bp-members/bp-members-functions.php:1168
+#: bp-members/bp-members-functions.php:1201
 msgid "<strong>ERROR</strong>: Couldn&#8217;t register you... please contact the <a href=\"mailto:%s\">webmaster</a> !"
 msgstr ""
 
-#: bp-members/bp-members-functions.php:1266
-#: bp-members/bp-members-functions.php:1270
+#: bp-members/bp-members-functions.php:1299
+#: bp-members/bp-members-functions.php:1303
 msgid "Invalid activation key"
 msgstr ""
 
-#: bp-members/bp-members-functions.php:1307
+#: bp-members/bp-members-functions.php:1340
 msgid "%s became a registered member"
 msgstr ""
 
-#: bp-members/bp-members-functions.php:1391
+#: bp-members/bp-members-functions.php:1424
 msgid "<strong>ERROR</strong>: Your account has not been activated. Check your email for the activation link."
 msgstr ""
 
@@ -3913,12 +3923,12 @@ msgstr ""
 msgid "Your account is now active!"
 msgstr ""
 
-#: bp-members/bp-members-screens.php:433
+#: bp-members/bp-members-screens.php:515
 #: bp-themes/bp-default/registration/register.php:253
-msgid "Sign Up Complete!"
+msgid "Check Your Email To Activate Your Account!"
 msgstr ""
 
-#: bp-members/bp-members-screens.php:441
+#: bp-members/bp-members-screens.php:523
 #: bp-themes/bp-default/registration/activate.php:11
 msgid "Account Activated"
 msgstr ""
@@ -3933,41 +3943,41 @@ msgctxt "Member pagination next text"
 msgid "&rarr;"
 msgstr ""
 
-#: bp-members/bp-members-template.php:346
+#: bp-members/bp-members-template.php:347
 msgid "Viewing member %1$s to %2$s (of %3$s active members)"
 msgstr ""
 
-#: bp-members/bp-members-template.php:348
+#: bp-members/bp-members-template.php:349
 msgid "Viewing member %1$s to %2$s (of %3$s members with friends)"
 msgstr ""
 
-#: bp-members/bp-members-template.php:350
+#: bp-members/bp-members-template.php:351
 msgid "Viewing member %1$s to %2$s (of %3$s members online)"
 msgstr ""
 
-#: bp-members/bp-members-template.php:352
+#: bp-members/bp-members-template.php:353
 msgid "Viewing member %1$s to %2$s (of %3$s members)"
 msgstr ""
 
-#: bp-members/bp-members-template.php:597
+#: bp-members/bp-members-template.php:598
 msgid "Never active"
 msgstr ""
 
-#: bp-members/bp-members-template.php:619
+#: bp-members/bp-members-template.php:620
 msgctxt "member latest update in member directory"
 msgid "- &quot;%s &quot;"
 msgstr ""
 
-#: bp-members/bp-members-template.php:676
+#: bp-members/bp-members-template.php:677
 msgctxt "Records the timestamp that the user registered into the activy stream"
 msgid "registered %s"
 msgstr ""
 
-#: bp-members/bp-members-template.php:1145
+#: bp-members/bp-members-template.php:1146
 msgid "Your Avatar"
 msgstr ""
 
-#: bp-members/bp-members-template.php:1215
+#: bp-members/bp-members-template.php:1216
 msgid "Activity RSS Feed"
 msgstr ""
 
@@ -3992,8 +4002,8 @@ msgid "There was an error deleting messages."
 msgstr ""
 
 #: bp-messages/bp-messages-actions.php:91
-#: bp-templates/bp-legacy/buddypress-functions.php:1167
-#: bp-themes/bp-default/_inc/ajax.php:871
+#: bp-templates/bp-legacy/buddypress-functions.php:1233
+#: bp-themes/bp-default/_inc/ajax.php:883
 msgid "Messages deleted."
 msgstr ""
 
@@ -4182,80 +4192,80 @@ msgstr ""
 #: bp-messages/bp-messages-template.php:607
 #: bp-templates/bp-legacy/buddypress/members/register.php:166
 #: bp-templates/bp-legacy/buddypress/members/single/profile/edit.php:130
-#: bp-templates/bp-legacy/buddypress-functions.php:257
-#: bp-themes/bp-default/functions.php:164
+#: bp-templates/bp-legacy/buddypress-functions.php:236
+#: bp-themes/bp-default/functions.php:165
 #: bp-themes/bp-default/members/single/profile/edit.php:130
 #: bp-themes/bp-default/registration/register.php:171
 msgid "Close"
 msgstr ""
 
-#: bp-messages/bp-messages-template.php:650
+#: bp-messages/bp-messages-template.php:652
 msgid "Send a private message to this user."
 msgstr ""
 
-#: bp-messages/bp-messages-template.php:651
+#: bp-messages/bp-messages-template.php:653
 msgid "Private Message"
 msgstr ""
 
-#: bp-messages/bp-messages-template.php:834
+#: bp-messages/bp-messages-template.php:836
 msgid "%d Recipients"
 msgstr ""
 
-#: bp-messages/bp-messages-template.php:922
-#: bp-templates/bp-legacy/buddypress-functions.php:1073
-#: bp-themes/bp-default/_inc/ajax.php:777
+#: bp-messages/bp-messages-template.php:924
+#: bp-templates/bp-legacy/buddypress-functions.php:1139
+#: bp-themes/bp-default/_inc/ajax.php:789
 msgid "Sent %s"
 msgstr ""
 
-#: bp-settings/bp-settings-actions.php:158
+#: bp-settings/bp-settings-actions.php:157
 msgid "That email address is invalid. Check the formatting and try again."
 msgstr ""
 
-#: bp-settings/bp-settings-actions.php:161
+#: bp-settings/bp-settings-actions.php:160
 msgid "That email address is currently unavailable for use."
 msgstr ""
 
-#: bp-settings/bp-settings-actions.php:164
+#: bp-settings/bp-settings-actions.php:163
 msgid "That email address is already taken."
 msgstr ""
 
-#: bp-settings/bp-settings-actions.php:167
+#: bp-settings/bp-settings-actions.php:166
 msgid "Email address cannot be empty."
 msgstr ""
 
-#: bp-settings/bp-settings-actions.php:177
+#: bp-settings/bp-settings-actions.php:176
 msgid "Your current password is invalid."
 msgstr ""
 
-#: bp-settings/bp-settings-actions.php:180
+#: bp-settings/bp-settings-actions.php:179
 msgid "The new password fields did not match."
 msgstr ""
 
-#: bp-settings/bp-settings-actions.php:183
+#: bp-settings/bp-settings-actions.php:182
 msgid "One of the password fields was empty."
 msgstr ""
 
-#: bp-settings/bp-settings-actions.php:192
+#: bp-settings/bp-settings-actions.php:191
 msgid "Your settings have been saved."
 msgstr ""
 
-#: bp-settings/bp-settings-actions.php:198
+#: bp-settings/bp-settings-actions.php:197
 msgid "No changes were made to your account."
 msgstr ""
 
-#: bp-settings/bp-settings-actions.php:200
+#: bp-settings/bp-settings-actions.php:199
 msgid "No changes were made to this account."
 msgstr ""
 
-#: bp-settings/bp-settings-actions.php:250
+#: bp-settings/bp-settings-actions.php:247
 msgid "Your notification settings have been saved."
 msgstr ""
 
-#: bp-settings/bp-settings-actions.php:252
+#: bp-settings/bp-settings-actions.php:249
 msgid "This user's notification settings have been saved."
 msgstr ""
 
-#: bp-settings/bp-settings-actions.php:345
+#: bp-settings/bp-settings-actions.php:338
 msgid "%s was successfully deleted."
 msgstr ""
 
@@ -4301,24 +4311,24 @@ msgid "Mark as Favorite"
 msgstr ""
 
 #: bp-templates/bp-legacy/buddypress/activity/entry.php:66
-#: bp-templates/bp-legacy/buddypress-functions.php:259
-#: bp-templates/bp-legacy/buddypress-functions.php:764
-#: bp-templates/bp-legacy/buddypress-functions.php:781
-#: bp-themes/bp-default/_inc/ajax.php:481
-#: bp-themes/bp-default/_inc/ajax.php:498
+#: bp-templates/bp-legacy/buddypress-functions.php:238
+#: bp-templates/bp-legacy/buddypress-functions.php:831
+#: bp-templates/bp-legacy/buddypress-functions.php:848
+#: bp-themes/bp-default/_inc/ajax.php:494
+#: bp-themes/bp-default/_inc/ajax.php:511
 #: bp-themes/bp-default/activity/entry.php:68
-#: bp-themes/bp-default/functions.php:166
+#: bp-themes/bp-default/functions.php:167
 msgid "Favorite"
 msgstr ""
 
 #: bp-templates/bp-legacy/buddypress/activity/entry.php:70
-#: bp-templates/bp-legacy/buddypress-functions.php:260
-#: bp-templates/bp-legacy/buddypress-functions.php:762
-#: bp-templates/bp-legacy/buddypress-functions.php:783
-#: bp-themes/bp-default/_inc/ajax.php:479
-#: bp-themes/bp-default/_inc/ajax.php:500
+#: bp-templates/bp-legacy/buddypress-functions.php:239
+#: bp-templates/bp-legacy/buddypress-functions.php:829
+#: bp-templates/bp-legacy/buddypress-functions.php:850
+#: bp-themes/bp-default/_inc/ajax.php:492
+#: bp-themes/bp-default/_inc/ajax.php:513
 #: bp-themes/bp-default/activity/entry.php:72
-#: bp-themes/bp-default/functions.php:167
+#: bp-themes/bp-default/functions.php:168
 msgid "Remove Favorite"
 msgstr ""
 
@@ -4333,9 +4343,9 @@ msgid "The public activity for everyone on this site."
 msgstr ""
 
 #: bp-templates/bp-legacy/buddypress/activity/index.php:19
-#: bp-templates/bp-legacy/buddypress/members/index.php:17
+#: bp-templates/bp-legacy/buddypress/members/index.php:19
 #: bp-themes/bp-default/activity/index.php:39
-#: bp-themes/bp-default/members/index.php:33
+#: bp-themes/bp-default/members/index.php:35
 msgid "All Members <span>%s</span>"
 msgstr ""
 
@@ -4345,9 +4355,9 @@ msgid "The activity of my friends only."
 msgstr ""
 
 #: bp-templates/bp-legacy/buddypress/activity/index.php:29
-#: bp-templates/bp-legacy/buddypress/members/index.php:20
+#: bp-templates/bp-legacy/buddypress/members/index.php:22
 #: bp-themes/bp-default/activity/index.php:49
-#: bp-themes/bp-default/members/index.php:37
+#: bp-themes/bp-default/members/index.php:39
 msgid "My Friends <span>%s</span>"
 msgstr ""
 
@@ -4373,100 +4383,103 @@ msgstr ""
 msgid "My Favorites <span>%s</span>"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/activity/index.php:57
-#: bp-themes/bp-default/activity/index.php:77
+#: bp-templates/bp-legacy/buddypress/activity/index.php:59
+#: bp-themes/bp-default/activity/index.php:79
 msgid "Activity that I have been mentioned in."
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/activity/index.php:57
-#: bp-themes/bp-default/activity/index.php:77
-msgid "<span>%s new</span>"
-msgstr ""
+#: bp-templates/bp-legacy/buddypress/activity/index.php:59
+#: bp-themes/bp-default/activity/index.php:79
+msgctxt "Number of new activity mentions"
+msgid "%s new"
+msgid_plural "%s new"
+msgstr[0] ""
+msgstr[1] ""
 
-#: bp-templates/bp-legacy/buddypress/activity/index.php:67
+#: bp-templates/bp-legacy/buddypress/activity/index.php:71
 #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:3
-#: bp-themes/bp-default/activity/index.php:87
+#: bp-themes/bp-default/activity/index.php:91
 #: bp-themes/bp-default/groups/single/activity.php:3
 msgid "RSS Feed"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/activity/index.php:67
+#: bp-templates/bp-legacy/buddypress/activity/index.php:71
 #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:3
-#: bp-themes/bp-default/activity/index.php:87
+#: bp-themes/bp-default/activity/index.php:91
 #: bp-themes/bp-default/groups/single/activity.php:3
 msgid "RSS"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/activity/index.php:72
+#: bp-templates/bp-legacy/buddypress/activity/index.php:76
 #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:8
 #: bp-templates/bp-legacy/buddypress/members/single/activity.php:18
-#: bp-themes/bp-default/activity/index.php:92
+#: bp-themes/bp-default/activity/index.php:96
 #: bp-themes/bp-default/groups/single/activity.php:8
 #: bp-themes/bp-default/members/single/activity.php:18
 msgid "Show:"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/activity/index.php:74
+#: bp-templates/bp-legacy/buddypress/activity/index.php:78
 #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:10
 #: bp-templates/bp-legacy/buddypress/members/single/activity.php:20
-#: bp-themes/bp-default/activity/index.php:94
+#: bp-themes/bp-default/activity/index.php:98
 #: bp-themes/bp-default/groups/single/activity.php:10
 #: bp-themes/bp-default/members/single/activity.php:20
 msgid "Everything"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/activity/index.php:75
+#: bp-templates/bp-legacy/buddypress/activity/index.php:79
 #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:11
 #: bp-templates/bp-legacy/buddypress/members/single/activity.php:21
-#: bp-themes/bp-default/activity/index.php:95
+#: bp-themes/bp-default/activity/index.php:99
 #: bp-themes/bp-default/groups/single/activity.php:11
 #: bp-themes/bp-default/members/single/activity.php:21
 msgid "Updates"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/activity/index.php:80
+#: bp-templates/bp-legacy/buddypress/activity/index.php:84
 #: bp-templates/bp-legacy/buddypress/members/single/activity.php:28
-#: bp-themes/bp-default/activity/index.php:100
+#: bp-themes/bp-default/activity/index.php:104
 #: bp-themes/bp-default/members/single/activity.php:28
 msgid "Comments"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/activity/index.php:86
+#: bp-templates/bp-legacy/buddypress/activity/index.php:90
 #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:14
 #: bp-templates/bp-legacy/buddypress/members/single/activity.php:43
-#: bp-themes/bp-default/activity/index.php:106
+#: bp-themes/bp-default/activity/index.php:110
 #: bp-themes/bp-default/groups/single/activity.php:14
 #: bp-themes/bp-default/members/single/activity.php:43
 msgid "Forum Topics"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/activity/index.php:87
+#: bp-templates/bp-legacy/buddypress/activity/index.php:91
 #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:15
 #: bp-templates/bp-legacy/buddypress/members/single/activity.php:44
-#: bp-themes/bp-default/activity/index.php:107
+#: bp-themes/bp-default/activity/index.php:111
 #: bp-themes/bp-default/groups/single/activity.php:15
 #: bp-themes/bp-default/members/single/activity.php:44
 msgid "Forum Replies"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/activity/index.php:93
+#: bp-templates/bp-legacy/buddypress/activity/index.php:97
 #: bp-templates/bp-legacy/buddypress/members/single/activity.php:50
-#: bp-themes/bp-default/activity/index.php:113
+#: bp-themes/bp-default/activity/index.php:117
 #: bp-themes/bp-default/members/single/activity.php:50
 msgid "New Groups"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/activity/index.php:94
+#: bp-templates/bp-legacy/buddypress/activity/index.php:98
 #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:18
 #: bp-templates/bp-legacy/buddypress/members/single/activity.php:51
-#: bp-themes/bp-default/activity/index.php:114
+#: bp-themes/bp-default/activity/index.php:118
 #: bp-themes/bp-default/groups/single/activity.php:18
 #: bp-themes/bp-default/members/single/activity.php:51
 msgid "Group Memberships"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/activity/index.php:104
-#: bp-themes/bp-default/activity/index.php:124
+#: bp-templates/bp-legacy/buddypress/activity/index.php:108
+#: bp-themes/bp-default/activity/index.php:128
 msgid "New Members"
 msgstr ""
 
@@ -4514,7 +4527,7 @@ msgstr ""
 #: bp-templates/bp-legacy/buddypress/forums/index.php:42
 #: bp-templates/bp-legacy/buddypress/groups/index.php:36
 #: bp-templates/bp-legacy/buddypress/groups/single/forum.php:36
-#: bp-templates/bp-legacy/buddypress/members/index.php:33
+#: bp-templates/bp-legacy/buddypress/members/index.php:35
 #: bp-templates/bp-legacy/buddypress/members/single/blogs.php:19
 #: bp-templates/bp-legacy/buddypress/members/single/forums.php:18
 #: bp-templates/bp-legacy/buddypress/members/single/friends.php:20
@@ -4523,7 +4536,7 @@ msgstr ""
 #: bp-themes/bp-default/forums/index.php:60
 #: bp-themes/bp-default/groups/index.php:55
 #: bp-themes/bp-default/groups/single/forum.php:36
-#: bp-themes/bp-default/members/index.php:53
+#: bp-themes/bp-default/members/index.php:55
 #: bp-themes/bp-default/members/single/blogs.php:19
 #: bp-themes/bp-default/members/single/forums.php:18
 #: bp-themes/bp-default/members/single/friends.php:20
@@ -4535,7 +4548,7 @@ msgstr ""
 #: bp-templates/bp-legacy/buddypress/forums/index.php:44
 #: bp-templates/bp-legacy/buddypress/groups/index.php:39
 #: bp-templates/bp-legacy/buddypress/groups/single/forum.php:38
-#: bp-templates/bp-legacy/buddypress/members/index.php:35
+#: bp-templates/bp-legacy/buddypress/members/index.php:37
 #: bp-templates/bp-legacy/buddypress/members/single/blogs.php:21
 #: bp-templates/bp-legacy/buddypress/members/single/forums.php:20
 #: bp-templates/bp-legacy/buddypress/members/single/friends.php:22
@@ -4544,7 +4557,7 @@ msgstr ""
 #: bp-themes/bp-default/forums/index.php:62
 #: bp-themes/bp-default/groups/index.php:57
 #: bp-themes/bp-default/groups/single/forum.php:38
-#: bp-themes/bp-default/members/index.php:55
+#: bp-themes/bp-default/members/index.php:57
 #: bp-themes/bp-default/members/single/blogs.php:21
 #: bp-themes/bp-default/members/single/forums.php:20
 #: bp-themes/bp-default/members/single/friends.php:22
@@ -4554,13 +4567,13 @@ msgstr ""
 
 #: bp-templates/bp-legacy/buddypress/blogs/index.php:40
 #: bp-templates/bp-legacy/buddypress/groups/index.php:42
-#: bp-templates/bp-legacy/buddypress/members/index.php:39
+#: bp-templates/bp-legacy/buddypress/members/index.php:41
 #: bp-templates/bp-legacy/buddypress/members/single/blogs.php:23
 #: bp-templates/bp-legacy/buddypress/members/single/friends.php:24
 #: bp-templates/bp-legacy/buddypress/members/single/groups.php:25
 #: bp-themes/bp-default/blogs/index.php:57
 #: bp-themes/bp-default/groups/index.php:60
-#: bp-themes/bp-default/members/index.php:60
+#: bp-themes/bp-default/members/index.php:62
 #: bp-themes/bp-default/members/single/blogs.php:23
 #: bp-themes/bp-default/members/single/friends.php:24
 #: bp-themes/bp-default/members/single/groups.php:25
@@ -4663,7 +4676,7 @@ msgstr ""
 
 #: bp-templates/bp-legacy/buddypress/forums/index.php:98
 #: bp-themes/bp-default/forums/index.php:116
-#: bp-xprofile/bp-xprofile-template.php:459
+#: bp-xprofile/bp-xprofile-template.php:476
 msgid "----"
 msgstr ""
 
@@ -4864,8 +4877,8 @@ msgstr ""
 
 #: bp-templates/bp-legacy/buddypress/groups/create.php:222
 #: bp-templates/bp-legacy/buddypress/groups/single/send-invites.php:42
-#: bp-templates/bp-legacy/buddypress-functions.php:853
-#: bp-themes/bp-default/_inc/ajax.php:570
+#: bp-templates/bp-legacy/buddypress-functions.php:919
+#: bp-themes/bp-default/_inc/ajax.php:582
 #: bp-themes/bp-default/groups/create.php:229
 #: bp-themes/bp-default/groups/single/send-invites.php:42
 msgid "Remove Invite"
@@ -4922,9 +4935,9 @@ msgstr ""
 msgid "Newly Created"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/groups/single/admin.php:25
-#: bp-themes/bp-default/groups/single/admin.php:25
-msgid "Notify group members of changes via email"
+#: bp-templates/bp-legacy/buddypress/groups/single/admin.php:26
+#: bp-themes/bp-default/groups/single/admin.php:26
+msgid "Notify group members of these changes via email"
 msgstr ""
 
 #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:137
@@ -5125,7 +5138,7 @@ msgstr ""
 
 #: bp-templates/bp-legacy/buddypress/members/activate.php:16
 #: bp-themes/bp-default/registration/activate.php:25
-msgid "Your account was activated successfully! You can now log in with the username and password you provided when you signed up."
+msgid "Your account was activated successfully! You can now <a href=\"%s\">log in</a> with the username and password you provided when you signed up."
 msgstr ""
 
 #: bp-templates/bp-legacy/buddypress/members/activate.php:21
@@ -5138,9 +5151,9 @@ msgstr ""
 msgid "Activation Key:"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/members/index.php:36
+#: bp-templates/bp-legacy/buddypress/members/index.php:38
 #: bp-templates/bp-legacy/buddypress/members/single/friends.php:23
-#: bp-themes/bp-default/members/index.php:56
+#: bp-themes/bp-default/members/index.php:58
 #: bp-themes/bp-default/members/single/friends.php:23
 msgid "Newest Registered"
 msgstr ""
@@ -5449,62 +5462,62 @@ msgstr ""
 msgid "%s's Profile"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/members/single/settings/capabilities.php:15
+#: bp-templates/bp-legacy/buddypress/members/single/settings/capabilities.php:9
 #: bp-themes/bp-default/members/single/settings/capabilities.php:57
 msgid "This user is a spammer."
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php:13
+#: bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php:7
 #: bp-themes/bp-default/members/single/settings/delete-account.php:56
 msgid "Deleting your account will delete all of the content you have created. It will be completely irrecoverable."
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php:17
+#: bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php:11
 #: bp-themes/bp-default/members/single/settings/delete-account.php:60
 msgid "Deleting this account will delete all of the content it has created. It will be completely irrecoverable."
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php:29
+#: bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php:23
 #: bp-themes/bp-default/members/single/settings/delete-account.php:72
 msgid "I understand the consequences."
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:15
+#: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:7
 #: bp-themes/bp-default/members/single/settings/general.php:57
 msgid "Current Password <span>(required to update email or change current password)</span>"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:16
+#: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:8
 #: bp-themes/bp-default/members/single/settings/general.php:58
 msgid "Password Lost and Found"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:16
+#: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:8
 #: bp-themes/bp-default/members/single/settings/general.php:58
 msgid "Lost your password?"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:20
+#: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:12
 #: bp-themes/bp-default/members/single/settings/general.php:62
 msgid "Account Email"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:23
+#: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:15
 #: bp-themes/bp-default/members/single/settings/general.php:65
 msgid "Change Password <span>(leave blank for no change)</span>"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:24
+#: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:16
 #: bp-themes/bp-default/members/single/settings/general.php:66
 msgid "New Password"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:25
+#: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:17
 #: bp-themes/bp-default/members/single/settings/general.php:67
 msgid "Repeat New Password"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress/members/single/settings/notifications.php:12
+#: bp-templates/bp-legacy/buddypress/members/single/settings/notifications.php:4
 #: bp-themes/bp-default/members/single/settings/notifications.php:54
 msgid "Send a notification by email when:"
 msgstr ""
@@ -5513,115 +5526,125 @@ msgstr ""
 msgid "BuddyPress Legacy"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress-functions.php:251
+#: bp-templates/bp-legacy/buddypress-functions.php:229
 #: bp-themes/bp-default/functions.php:158
 msgid "My Favorites"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress-functions.php:252
+#: bp-templates/bp-legacy/buddypress-functions.php:230
 #: bp-themes/bp-default/functions.php:159
 msgid "Accepted"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress-functions.php:253
+#: bp-templates/bp-legacy/buddypress-functions.php:231
 #: bp-themes/bp-default/functions.php:160
 msgid "Rejected"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress-functions.php:254
+#: bp-templates/bp-legacy/buddypress-functions.php:232
 #: bp-themes/bp-default/functions.php:161
 msgid "Show all comments for this thread"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress-functions.php:255
+#: bp-templates/bp-legacy/buddypress-functions.php:233
 #: bp-themes/bp-default/functions.php:162
-msgid "Show all"
+msgid "Show all %d comments"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress-functions.php:256
+#: bp-templates/bp-legacy/buddypress-functions.php:234
 #: bp-themes/bp-default/functions.php:163
+msgid "Show all"
+msgstr ""
+
+#: bp-templates/bp-legacy/buddypress-functions.php:235
+#: bp-themes/bp-default/functions.php:164
 msgid "comments"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress-functions.php:569
-#: bp-themes/bp-default/_inc/ajax.php:278
+#: bp-templates/bp-legacy/buddypress-functions.php:240
+#: bp-themes/bp-default/functions.php:169
+msgid "Your profile has unsaved changes. If you leave the page, the changes will be lost."
+msgstr ""
+
+#: bp-templates/bp-legacy/buddypress-functions.php:636
+#: bp-themes/bp-default/_inc/ajax.php:291
 msgid "There was a problem posting your update, please try again."
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress-functions.php:663
-#: bp-templates/bp-legacy/buddypress-functions.php:699
-#: bp-themes/bp-default/_inc/ajax.php:380
-#: bp-themes/bp-default/_inc/ajax.php:416
+#: bp-templates/bp-legacy/buddypress-functions.php:730
+#: bp-templates/bp-legacy/buddypress-functions.php:766
+#: bp-themes/bp-default/_inc/ajax.php:393
+#: bp-themes/bp-default/_inc/ajax.php:429
 msgid "There was a problem when deleting. Please try again."
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress-functions.php:899
-#: bp-themes/bp-default/_inc/ajax.php:615
+#: bp-templates/bp-legacy/buddypress-functions.php:965
+#: bp-themes/bp-default/_inc/ajax.php:627
 msgid " Friendship could not be requested."
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress-functions.php:911
-#: bp-themes/bp-default/_inc/ajax.php:627
+#: bp-templates/bp-legacy/buddypress-functions.php:977
+#: bp-themes/bp-default/_inc/ajax.php:639
 msgid "Friendship request could not be cancelled."
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress-functions.php:916
-#: bp-themes/bp-default/_inc/ajax.php:632
+#: bp-templates/bp-legacy/buddypress-functions.php:982
+#: bp-themes/bp-default/_inc/ajax.php:644
 msgid "Request Pending"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress-functions.php:936
-#: bp-themes/bp-default/_inc/ajax.php:652
+#: bp-templates/bp-legacy/buddypress-functions.php:1002
+#: bp-themes/bp-default/_inc/ajax.php:664
 msgid "There was a problem accepting that request. Please try again."
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress-functions.php:955
-#: bp-themes/bp-default/_inc/ajax.php:671
+#: bp-templates/bp-legacy/buddypress-functions.php:1021
+#: bp-themes/bp-default/_inc/ajax.php:683
 msgid "There was a problem rejecting that request. Please try again."
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress-functions.php:985
-#: bp-themes/bp-default/_inc/ajax.php:701
+#: bp-templates/bp-legacy/buddypress-functions.php:1051
+#: bp-themes/bp-default/_inc/ajax.php:713
 msgid "Error joining group"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress-functions.php:994
-#: bp-themes/bp-default/_inc/ajax.php:710
+#: bp-templates/bp-legacy/buddypress-functions.php:1060
+#: bp-themes/bp-default/_inc/ajax.php:722
 msgid "Error requesting membership"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress-functions.php:996
-#: bp-themes/bp-default/_inc/ajax.php:712
+#: bp-templates/bp-legacy/buddypress-functions.php:1062
+#: bp-themes/bp-default/_inc/ajax.php:724
 msgid "Membership Requested"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress-functions.php:1004
-#: bp-themes/bp-default/_inc/ajax.php:720
+#: bp-templates/bp-legacy/buddypress-functions.php:1070
+#: bp-themes/bp-default/_inc/ajax.php:732
 msgid "Error leaving group"
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress-functions.php:1027
-#: bp-themes/bp-default/_inc/ajax.php:743
+#: bp-templates/bp-legacy/buddypress-functions.php:1093
+#: bp-themes/bp-default/_inc/ajax.php:755
 msgid "There was a problem closing the notice."
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress-functions.php:1090
-#: bp-themes/bp-default/_inc/ajax.php:794
+#: bp-templates/bp-legacy/buddypress-functions.php:1156
+#: bp-themes/bp-default/_inc/ajax.php:806
 msgid "There was a problem sending that reply. Please try again."
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress-functions.php:1108
-#: bp-themes/bp-default/_inc/ajax.php:812
+#: bp-templates/bp-legacy/buddypress-functions.php:1174
+#: bp-themes/bp-default/_inc/ajax.php:824
 msgid "There was a problem marking messages as unread."
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress-functions.php:1133
-#: bp-themes/bp-default/_inc/ajax.php:837
+#: bp-templates/bp-legacy/buddypress-functions.php:1199
+#: bp-themes/bp-default/_inc/ajax.php:849
 msgid "There was a problem marking messages as read."
 msgstr ""
 
-#: bp-templates/bp-legacy/buddypress-functions.php:1158
-#: bp-themes/bp-default/_inc/ajax.php:862
+#: bp-templates/bp-legacy/buddypress-functions.php:1224
+#: bp-themes/bp-default/_inc/ajax.php:874
 msgid "There was a problem deleting messages."
 msgstr ""
 
@@ -5766,78 +5789,78 @@ msgstr ""
 msgid "Primary Navigation"
 msgstr ""
 
-#: bp-themes/bp-default/functions.php:389
+#: bp-themes/bp-default/functions.php:391
 msgid "The sidebar widget area"
 msgstr ""
 
-#: bp-themes/bp-default/functions.php:398
+#: bp-themes/bp-default/functions.php:400
 msgid "First Footer Widget Area"
 msgstr ""
 
-#: bp-themes/bp-default/functions.php:400
+#: bp-themes/bp-default/functions.php:402
 msgid "The first footer widget area"
 msgstr ""
 
-#: bp-themes/bp-default/functions.php:409
+#: bp-themes/bp-default/functions.php:411
 msgid "Second Footer Widget Area"
 msgstr ""
 
-#: bp-themes/bp-default/functions.php:411
+#: bp-themes/bp-default/functions.php:413
 msgid "The second footer widget area"
 msgstr ""
 
-#: bp-themes/bp-default/functions.php:420
+#: bp-themes/bp-default/functions.php:422
 msgid "Third Footer Widget Area"
 msgstr ""
 
-#: bp-themes/bp-default/functions.php:422
+#: bp-themes/bp-default/functions.php:424
 msgid "The third footer widget area"
 msgstr ""
 
-#: bp-themes/bp-default/functions.php:431
+#: bp-themes/bp-default/functions.php:433
 msgid "Fourth Footer Widget Area"
 msgstr ""
 
-#: bp-themes/bp-default/functions.php:433
+#: bp-themes/bp-default/functions.php:435
 msgid "The fourth footer widget area"
 msgstr ""
 
 #. translators: 1: comment author url, 2: comment author name, 3: comment
 #. permalink, 4: comment date/timestamp
 
-#: bp-themes/bp-default/functions.php:488
+#: bp-themes/bp-default/functions.php:490
 msgid "<a href=\"%1$s\" rel=\"nofollow\">%2$s</a> said on <a href=\"%3$s\"><span class=\"time-since\">%4$s</span></a>"
 msgstr ""
 
-#: bp-themes/bp-default/functions.php:495
+#: bp-themes/bp-default/functions.php:497
 msgid "Your comment is awaiting moderation."
 msgstr ""
 
-#: bp-themes/bp-default/functions.php:507
+#: bp-themes/bp-default/functions.php:509
 msgid "Edit comment"
 msgstr ""
 
-#: bp-themes/bp-default/functions.php:577
+#: bp-themes/bp-default/functions.php:579
 msgid "Theme activated! This theme contains <a href=\"%s\">custom header image</a> support and <a href=\"%s\">sidebar widgets</a>."
 msgstr ""
 
-#: bp-themes/bp-default/functions.php:643
+#: bp-themes/bp-default/functions.php:645
 msgid "Email"
 msgstr ""
 
-#: bp-themes/bp-default/functions.php:653
+#: bp-themes/bp-default/functions.php:655
 msgid "You must be <a href=\"%1$s\">logged in</a> to post a comment."
 msgstr ""
 
-#: bp-themes/bp-default/functions.php:654
+#: bp-themes/bp-default/functions.php:656
 msgid "Leave a reply"
 msgstr ""
 
-#: bp-themes/bp-default/functions.php:741
+#: bp-themes/bp-default/functions.php:743
 msgid "&larr; Previous Entries"
 msgstr ""
 
-#: bp-themes/bp-default/functions.php:742
+#: bp-themes/bp-default/functions.php:744
 msgid "Next Entries &rarr;"
 msgstr ""
 
@@ -5912,7 +5935,7 @@ msgstr ""
 msgid "Remember Me"
 msgstr ""
 
-#: bp-themes/bp-default/sidebar.php:64
+#: bp-themes/bp-default/sidebar.php:66
 msgid "Forum Topic Tags"
 msgstr ""
 
@@ -6042,133 +6065,133 @@ msgstr ""
 msgid "Group Description"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:753
+#: bp-xprofile/bp-xprofile-classes.php:752
 msgid "Please enter options for this Field:"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:755
+#: bp-xprofile/bp-xprofile-classes.php:754
 msgid "Sort Order:"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:757
+#: bp-xprofile/bp-xprofile-classes.php:756
 msgid "Custom"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:758
+#: bp-xprofile/bp-xprofile-classes.php:757
 msgid "Ascending"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:759
+#: bp-xprofile/bp-xprofile-classes.php:758
 msgid "Descending"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:787
-#: bp-xprofile/bp-xprofile-classes.php:804
+#: bp-xprofile/bp-xprofile-classes.php:786
+#: bp-xprofile/bp-xprofile-classes.php:803
 msgid "Default Value"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:811
+#: bp-xprofile/bp-xprofile-classes.php:810
 msgid "Add Another Option"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:819
+#: bp-xprofile/bp-xprofile-classes.php:818
 msgid "Add Field"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:831
+#: bp-xprofile/bp-xprofile-classes.php:830
 msgid "Edit Field"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:838
+#: bp-xprofile/bp-xprofile-classes.php:837
 msgid "Fields marked * are required"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:851
+#: bp-xprofile/bp-xprofile-classes.php:850
 msgid "Field Title"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:858
+#: bp-xprofile/bp-xprofile-classes.php:857
 msgid "Field Description"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:867
+#: bp-xprofile/bp-xprofile-classes.php:866
 msgid "Is This Field Required?"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:869
+#: bp-xprofile/bp-xprofile-classes.php:868
 msgid "Not Required"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:870
+#: bp-xprofile/bp-xprofile-classes.php:869
 msgid "Required"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:875
+#: bp-xprofile/bp-xprofile-classes.php:874
 msgid "Field Type"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:877
+#: bp-xprofile/bp-xprofile-classes.php:876
 msgid "Text Box"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:878
+#: bp-xprofile/bp-xprofile-classes.php:877
 msgid "Multi-line Text Box"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:879
+#: bp-xprofile/bp-xprofile-classes.php:878
 msgid "Date Selector"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:880
+#: bp-xprofile/bp-xprofile-classes.php:879
 msgid "Radio Buttons"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:881
+#: bp-xprofile/bp-xprofile-classes.php:880
 msgid "Drop Down Select Box"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:882
+#: bp-xprofile/bp-xprofile-classes.php:881
 msgid "Multi Select Box"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:883
+#: bp-xprofile/bp-xprofile-classes.php:882
 msgid "Checkboxes"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:903
+#: bp-xprofile/bp-xprofile-classes.php:902
 msgid "Default Visibility"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:916
+#: bp-xprofile/bp-xprofile-classes.php:915
 msgid "Per-Member Visibility"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:918
+#: bp-xprofile/bp-xprofile-classes.php:917
 msgid "Let members change this field's visibility"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:919
+#: bp-xprofile/bp-xprofile-classes.php:918
 msgid "Enforce the default visibility for all members"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:929
+#: bp-xprofile/bp-xprofile-classes.php:928
 msgid "or"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:947
+#: bp-xprofile/bp-xprofile-classes.php:946
 msgid "Please make sure you fill out all required fields."
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:950
+#: bp-xprofile/bp-xprofile-classes.php:949
 msgid "Radio button field types require at least one option. Please add options below."
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:953
-#: bp-xprofile/bp-xprofile-classes.php:956
+#: bp-xprofile/bp-xprofile-classes.php:952
+#: bp-xprofile/bp-xprofile-classes.php:955
 msgid "Select box field types require at least one option. Please add options below."
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-classes.php:959
+#: bp-xprofile/bp-xprofile-classes.php:958
 msgid "Checkbox field types require at least one option. Please add options below."
 msgstr ""
 
@@ -6204,62 +6227,62 @@ msgstr ""
 msgid "Your new avatar was uploaded successfully."
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-template.php:664
+#: bp-xprofile/bp-xprofile-template.php:681
 msgid "January"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-template.php:665
+#: bp-xprofile/bp-xprofile-template.php:682
 msgid "February"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-template.php:666
+#: bp-xprofile/bp-xprofile-template.php:683
 msgid "March"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-template.php:667
+#: bp-xprofile/bp-xprofile-template.php:684
 msgid "April"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-template.php:668
+#: bp-xprofile/bp-xprofile-template.php:685
 msgid "May"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-template.php:669
+#: bp-xprofile/bp-xprofile-template.php:686
 msgid "June"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-template.php:670
+#: bp-xprofile/bp-xprofile-template.php:687
 msgid "July"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-template.php:671
+#: bp-xprofile/bp-xprofile-template.php:688
 msgid "August"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-template.php:672
+#: bp-xprofile/bp-xprofile-template.php:689
 msgid "September"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-template.php:673
+#: bp-xprofile/bp-xprofile-template.php:690
 msgid "October"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-template.php:674
+#: bp-xprofile/bp-xprofile-template.php:691
 msgid "November"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-template.php:675
+#: bp-xprofile/bp-xprofile-template.php:692
 msgid "December"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-template.php:843
+#: bp-xprofile/bp-xprofile-template.php:875
 msgid "Avatar uploads are currently disabled. Why not use a <a href=\"http://gravatar.com\" target=\"_blank\">gravatar</a> instead?"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-template.php:851
+#: bp-xprofile/bp-xprofile-template.php:883
 msgid "Profile not recently updated"
 msgstr ""
 
-#: bp-xprofile/bp-xprofile-template.php:861
+#: bp-xprofile/bp-xprofile-template.php:893
 msgid "Profile updated %s"
 msgstr ""
\ No newline at end of file
diff --git a/wp-content/plugins/buddypress/bp-loader.php b/wp-content/plugins/buddypress/bp-loader.php
index 16ab68ad3a7f4207062d731f30f586666ffb13fe..d8d009a8fcb7681bc036abb2fb763878720496c6 100644
--- a/wp-content/plugins/buddypress/bp-loader.php
+++ b/wp-content/plugins/buddypress/bp-loader.php
@@ -16,7 +16,7 @@
  * Description: Social networking in a box. Build a social network for your company, school, sports team or niche community all based on the power and flexibility of WordPress.
  * Author:      The BuddyPress Community
  * Author URI:  http://buddypress.org/community/members/
- * Version:     1.7.2
+ * Version:     1.8.1
  * Text Domain: buddypress
  * Domain Path: /bp-languages/
  * License:     GPLv2 or later (license.txt)
@@ -129,7 +129,7 @@ class BuddyPress {
 	 * @uses BuddyPress::setup_actions() Setup the hooks and actions
 	 * @see buddypress()
 	 *
-	 * @return The one true BuddyPress
+	 * @return BuddyPress The one true BuddyPress
 	 */
 	public static function instance() {
 		if ( ! isset( self::$instance ) ) {
@@ -207,7 +207,7 @@ class BuddyPress {
 
 	/**
 	 * Bootstrap constants
-	 * 
+	 *
 	 * @since BuddyPress (1.6)
 	 *
 	 * @uses is_multisite()
@@ -223,30 +223,12 @@ class BuddyPress {
 		if ( file_exists( WP_PLUGIN_DIR . '/bp-custom.php' ) )
 			require( WP_PLUGIN_DIR . '/bp-custom.php' );
 
-		// Define on which blog ID BuddyPress should run
-		if ( !defined( 'BP_ROOT_BLOG' ) ) {
-
-			// Default to 1
-			$root_blog_id = 1;
-
-			// Root blog is the main site on this network
-			if ( is_multisite() && !defined( 'BP_ENABLE_MULTIBLOG' ) ) {
-				$current_site = get_current_site();
-				$root_blog_id = $current_site->blog_id;
-
-			// Root blog is every site on this network
-			} elseif ( is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) ) {
-				$root_blog_id = get_current_blog_id();
-			}
-
-			define( 'BP_ROOT_BLOG', $root_blog_id );
-		}
-
 		// Path and URL
-		if ( !defined( 'BP_PLUGIN_DIR' ) )
+		if ( ! defined( 'BP_PLUGIN_DIR' ) ) {
 			define( 'BP_PLUGIN_DIR', trailingslashit( WP_PLUGIN_DIR . '/buddypress' ) );
+		}
 
-		if ( !defined( 'BP_PLUGIN_URL' ) ) {
+		if ( ! defined( 'BP_PLUGIN_URL' ) ) {
 			$plugin_url = plugin_dir_url( __FILE__ );
 
 			// If we're using https, update the protocol. Workaround for WP13941, WP15928, WP19037.
@@ -256,6 +238,40 @@ class BuddyPress {
 			define( 'BP_PLUGIN_URL', $plugin_url );
 		}
 
+		// Define on which blog ID BuddyPress should run
+		if ( ! defined( 'BP_ROOT_BLOG' ) ) {
+
+			// Default to use current blog ID
+			// Fulfills non-network installs and BP_ENABLE_MULTIBLOG installs
+			$root_blog_id = get_current_blog_id();
+
+			// Multisite check
+			if ( is_multisite() ) {
+
+				// Multiblog isn't enabled
+				if ( ! defined( 'BP_ENABLE_MULTIBLOG' ) || ( defined( 'BP_ENABLE_MULTIBLOG' ) && (int) constant( 'BP_ENABLE_MULTIBLOG' ) === 0 ) ) {
+					// Check to see if BP is network-activated
+					// We're not using is_plugin_active_for_network() b/c you need to include the
+					// /wp-admin/includes/plugin.php file in order to use that function.
+
+					// get network-activated plugins
+					$plugins = get_site_option( 'active_sitewide_plugins');
+
+					// basename
+					$basename = plugin_basename( constant( 'BP_PLUGIN_DIR' ) . 'bp-loader.php' );
+
+					// plugin is network-activated; use main site ID instead
+					if ( isset( $plugins[ $basename ] ) ) {
+						$current_site = get_current_site();
+						$root_blog_id = $current_site->blog_id;
+					}
+				}
+
+			}
+
+			define( 'BP_ROOT_BLOG', $root_blog_id );
+		}
+
 		// The search slug has to be defined nice and early because of the way
 		// search requests are loaded
 		//
@@ -278,7 +294,7 @@ class BuddyPress {
 
 		/** Versions **********************************************************/
 
-		$this->version    = '1.7.2';
+		$this->version    = '1.8.1';
 		$this->db_version = 6080;
 
 		/** Loading ***********************************************************/
@@ -424,6 +440,7 @@ class BuddyPress {
 
 		// Skip or load deprecated content
 		if ( false !== $this->load_deprecated ) {
+			require( $this->plugin_dir . 'bp-core/deprecated/1.2.php' );
 			require( $this->plugin_dir . 'bp-core/deprecated/1.5.php' );
 			require( $this->plugin_dir . 'bp-core/deprecated/1.6.php' );
 			require( $this->plugin_dir . 'bp-core/deprecated/1.7.php' );
@@ -564,10 +581,10 @@ class BuddyPress {
  *
  * Example: <?php $bp = buddypress(); ?>
  *
- * @return The one true BuddyPress Instance
+ * @return BuddyPress The one true BuddyPress Instance
  */
 function buddypress() {
-	return buddypress::instance();
+	return BuddyPress::instance();
 }
 
 /**
diff --git a/wp-content/plugins/buddypress/bp-members/bp-members-actions.php b/wp-content/plugins/buddypress/bp-members/bp-members-actions.php
index 9f85b3cfd1dfab9bd0c7b2446f947000dc72b4a6..69d0fe9bd8bf8add59b703a5475c675e3c06f2ac 100644
--- a/wp-content/plugins/buddypress/bp-members/bp-members-actions.php
+++ b/wp-content/plugins/buddypress/bp-members/bp-members-actions.php
@@ -98,9 +98,8 @@ function bp_core_action_delete_user() {
  * Returns the user_id for a user based on their username.
  *
  * @package BuddyPress Core
- * @param $username str Username to check.
- * @return false on no match
- * @return int the user ID of the matched user.
+ * @param string $username Username to check.
+ * @since BuddyPress (1.0)
  */
 function bp_core_get_random_member() {
 	if ( ! isset( $_GET['random-member'] ) )
diff --git a/wp-content/plugins/buddypress/bp-members/bp-members-adminbar.php b/wp-content/plugins/buddypress/bp-members/bp-members-adminbar.php
index 7641acd8a04752e865cbf490415318aa343fb2f6..5dedf73d66b37841b59436808257e8ae864d4e05 100644
--- a/wp-content/plugins/buddypress/bp-members/bp-members-adminbar.php
+++ b/wp-content/plugins/buddypress/bp-members/bp-members-adminbar.php
@@ -108,21 +108,27 @@ function bp_members_admin_bar_user_admin_menu() {
 		'href'   => bp_get_members_component_link( 'profile', 'change-avatar' )
 	) );
 
-	// User Admin > Spam/unspam
-	$wp_admin_bar->add_menu( array(
-		'parent' => $bp->user_admin_menu_id,
-		'id'     => $bp->user_admin_menu_id . '-user-capabilities',
-		'title'  => __( 'User Capabilities', 'buddypress' ),
-		'href'   => bp_displayed_user_domain() . 'settings/capabilities/'
-	) );
 
-	// User Admin > Delete Account
-	$wp_admin_bar->add_menu( array(
-		'parent' => $bp->user_admin_menu_id,
-		'id'     => $bp->user_admin_menu_id . '-delete-user',
-		'title'  => __( 'Delete Account', 'buddypress' ),
-		'href'   => bp_displayed_user_domain() . 'settings/delete-account/'
-	) );
+	if ( bp_is_active( 'settings' ) ) {
+
+		// User Admin > Spam/unspam
+		$wp_admin_bar->add_menu( array(
+			'parent' => $bp->user_admin_menu_id,
+			'id'     => $bp->user_admin_menu_id . '-user-capabilities',
+			'title'  => __( 'User Capabilities', 'buddypress' ),
+			'href'   => bp_displayed_user_domain() . 'settings/capabilities/'
+		) );
+
+		// User Admin > Delete Account
+		$wp_admin_bar->add_menu( array(
+			'parent' => $bp->user_admin_menu_id,
+			'id'     => $bp->user_admin_menu_id . '-delete-user',
+			'title'  => __( 'Delete Account', 'buddypress' ),
+			'href'   => bp_displayed_user_domain() . 'settings/delete-account/'
+		) );
+
+	}
+
 }
 add_action( 'admin_bar_menu', 'bp_members_admin_bar_user_admin_menu', 99 );
 
diff --git a/wp-content/plugins/buddypress/bp-members/bp-members-functions.php b/wp-content/plugins/buddypress/bp-members/bp-members-functions.php
index 2f2385be4f80eb18cc06c71c5208116540d5df39..4ce8d63cf79254107fe4d4ba78c0ec0ab164d0c5 100644
--- a/wp-content/plugins/buddypress/bp-members/bp-members-functions.php
+++ b/wp-content/plugins/buddypress/bp-members/bp-members-functions.php
@@ -120,7 +120,7 @@ function bp_core_get_users( $args = '' ) {
  *
  * @package BuddyPress Core
  * @global $current_user WordPress global variable containing current logged in user information
- * @param user_id The ID of the user.
+ * @param int $user_id The ID of the user.
  */
 function bp_core_get_user_domain( $user_id, $user_nicename = false, $user_login = false ) {
 
@@ -150,7 +150,7 @@ function bp_core_get_user_domain( $user_id, $user_nicename = false, $user_login
  * Fetch everything in the wp_users table for a user, without any usermeta.
  *
  * @package BuddyPress Core
- * @param user_id The ID of the user.
+ * @param int $user_id The ID of the user.
  * @uses BP_Core_User::get_core_userdata() Performs the query.
  */
 function bp_core_get_core_userdata( $user_id ) {
@@ -170,7 +170,7 @@ function bp_core_get_core_userdata( $user_id ) {
  *
  * @package BuddyPress Core
  * @uses bp_core_get_userid_from_user_login() Returns the user id for the username passed
- * @return The user id for the user that is currently being displayed, return zero if this is not a user home and just a normal blog.
+ * @return int The user id for the user that is currently being displayed, return zero if this is not a user home and just a normal blog.
  */
 function bp_core_get_displayed_userid( $user_login ) {
 	return apply_filters( 'bp_core_get_displayed_userid', bp_core_get_userid( $user_login ) );
@@ -180,10 +180,9 @@ function bp_core_get_displayed_userid( $user_login ) {
  * Returns the user_id for a user based on their username.
  *
  * @package BuddyPress Core
- * @param $username str Username to check.
+ * @param string $username Username to check.
  * @global $wpdb WordPress DB access object.
- * @return false on no match
- * @return int the user ID of the matched user.
+ * @return int|bool The ID of the matched user, or false.
  */
 function bp_core_get_userid( $username ) {
 	global $wpdb;
@@ -198,10 +197,9 @@ function bp_core_get_userid( $username ) {
  * Returns the user_id for a user based on their user_nicename.
  *
  * @package BuddyPress Core
- * @param $username str Username to check.
+ * @param string $username Username to check.
  * @global $wpdb WordPress DB access object.
- * @return false on no match
- * @return int the user ID of the matched user.
+ * @return int|bool The ID of the matched user, or false.
  */
 function bp_core_get_userid_from_nicename( $user_nicename ) {
 	global $wpdb;
@@ -209,18 +207,17 @@ function bp_core_get_userid_from_nicename( $user_nicename ) {
 	if ( empty( $user_nicename ) )
 		return false;
 
-	return apply_filters( 'bp_core_get_userid_from_nicename', $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->users} WHERE user_nicename = %s", $user_nicename ) ) );
+	return apply_filters( 'bp_core_get_userid_from_nicename', $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->users} WHERE user_nicename = %s", $user_nicename ) ), $user_nicename );
 }
 
 /**
  * Returns the username for a user based on their user id.
  *
  * @package BuddyPress Core
- * @param $uid int User ID to check.
+ * @param int $uid User ID to check.
  * @global $userdata WordPress user data for the current logged in user.
  * @uses get_userdata() WordPress function to fetch the userdata for a user ID
- * @return false on no match
- * @return str the username of the matched user.
+ * @return string|bool The username of the matched user, or false.
  */
 function bp_core_get_username( $user_id, $user_nicename = false, $user_login = false ) {
 	global $bp;
@@ -290,11 +287,10 @@ function bp_core_get_username( $user_id, $user_nicename = false, $user_login = f
  * @since BuddyPress (1.5)
  *
  * @package BuddyPress Core
- * @param $uid int User ID to check.
+ * @param int $uid User ID to check.
  * @global $userdata WordPress user data for the current logged in user.
  * @uses get_userdata() WordPress function to fetch the userdata for a user ID
- * @return false on no match
- * @return str the username of the matched user.
+ * @return string|bool The username of the matched user, or false.
  */
 function bp_members_get_user_nicename( $user_id ) {
 	global $bp;
@@ -343,10 +339,9 @@ function bp_members_get_user_nicename( $user_id ) {
  * Returns the email address for the user based on user ID
  *
  * @package BuddyPress Core
- * @param $uid int User ID to check.
+ * @param int $uid User ID to check.
  * @uses get_userdata() WordPress function to fetch the userdata for a user ID
- * @return false on no match
- * @return str The email for the matched user.
+ * @return string The email for the matched user. Empty string if no user matched the $uid.
  */
 function bp_core_get_user_email( $uid ) {
 
@@ -371,10 +366,9 @@ function bp_core_get_user_email( $uid ) {
  * Optional parameters will return just the name or just the URL.
  *
  * @param int $user_id User ID to check.
- * @param $no_anchor bool Disable URL and HTML and just return full name. Default false.
- * @param $just_link bool Disable full name and HTML and just return the URL text. Default false.
- * @return false on no match
- * @return str The link text based on passed parameters.
+ * @param bool $no_anchor Disable URL and HTML and just return full name. Default false.
+ * @param bool $just_link Disable full name and HTML and just return the URL text. Default false.
+ * @return string|bool The link text based on passed parameters, or false on no match.
  * @todo This function needs to be cleaned up or split into separate functions
  */
 function bp_core_get_userlink( $user_id, $no_anchor = false, $just_link = false ) {
@@ -406,7 +400,7 @@ function bp_core_get_userlink( $user_id, $no_anchor = false, $just_link = false
  * @uses get_userdata() Fetches the WP userdata for a specific user.
  * @uses xprofile_set_field_data() Will update the field data for a user based on field name and user id.
  * @uses wp_cache_set() Adds a value to the cache.
- * @return str The display name for the user in question.
+ * @return string|bool The display name for the user in question, or false if user not found.
  */
 function bp_core_get_user_displayname( $user_id_or_username ) {
 	global $bp;
@@ -462,10 +456,10 @@ add_filter( 'bp_core_get_user_displayname', 'esc_html'      );
  * Returns the user link for the user based on user email address
  *
  * @package BuddyPress Core
- * @param $email str The email address for the user.
+ * @param string $email The email address for the user.
  * @uses bp_core_get_userlink() BuddyPress function to get a userlink by user ID.
  * @uses get_user_by() WordPress function to get userdata via an email address
- * @return str The link to the users home base. False on no match.
+ * @return string The link to the users home base. False on no match.
  */
 function bp_core_get_userlink_by_email( $email ) {
 	$user = get_user_by( 'email', $email );
@@ -475,8 +469,8 @@ function bp_core_get_userlink_by_email( $email ) {
 /**
  * Returns the user link for the user based on the supplied identifier
  *
- * @param $username str If BP_ENABLE_USERNAME_COMPATIBILITY_MODE is set, this will be user_login, otherwise it will be user_nicename.
- * @return str The link to the users home base. False on no match.
+ * @param string $username If BP_ENABLE_USERNAME_COMPATIBILITY_MODE is set, this will be user_login, otherwise it will be user_nicename.
+ * @return string|bool The link to the users home base, false on no match.
  */
 function bp_core_get_userlink_by_username( $username ) {
 	if ( bp_is_username_compatibility_mode() )
@@ -654,11 +648,29 @@ function bp_is_user_spammer( $user_id = 0 ) {
 	if ( empty( $user_id ) )
 		return false;
 
+	$bp = buddypress();
+
 	// Assume user is not spam
 	$is_spammer = false;
 
-	// Get user data
-	$user = get_userdata( $user_id );
+	// Setup our user
+	$user = false;
+
+	// Get locally-cached data if available
+	switch ( $user_id ) {
+		case bp_loggedin_user_id() :
+			$user = ! empty( $bp->loggedin_user->userdata ) ? $bp->loggedin_user->userdata : false;
+			break;
+
+		case bp_displayed_user_id() :
+			$user = ! empty( $bp->displayed_user->userdata ) ? $bp->displayed_user->userdata : false;
+			break;
+	}
+
+	// Manually get userdata if still empty
+	if ( empty( $user ) ) {
+		$user = get_userdata( $user_id );
+	}
 
 	// No user found
 	if ( empty( $user ) ) {
@@ -691,11 +703,29 @@ function bp_is_user_deleted( $user_id = 0 ) {
 	if ( empty( $user_id ) )
 		return false;
 
+	$bp = buddypress();
+
 	// Assume user is not deleted
 	$is_deleted = false;
 
-	// Get user data
-	$user = get_userdata( $user_id );
+	// Setup our user
+	$user = false;
+
+	// Get locally-cached data if available
+	switch ( $user_id ) {
+		case bp_loggedin_user_id() :
+			$user = ! empty( $bp->loggedin_user->userdata ) ? $bp->loggedin_user->userdata : false;
+			break;
+
+		case bp_displayed_user_id() :
+			$user = ! empty( $bp->displayed_user->userdata ) ? $bp->displayed_user->userdata : false;
+			break;
+	}
+
+	// Manually get userdata if still empty
+	if ( empty( $user ) ) {
+		$user = get_userdata( $user_id );
+	}
 
 	// No user found
 	if ( empty( $user ) ) {
@@ -881,8 +911,8 @@ add_action( 'pre_user_login', 'bp_core_strip_username_spaces' );
  * When a user logs in, check if they have been marked as a spammer. If yes then simply
  * redirect them to the home page and stop them from logging in.
  *
- * @param obj $user Either the WP_User object or the WP_Error object
- * @return obj If the user is not a spammer, return the WP_User object. Otherwise a new WP_Error object.
+ * @param WP_User|WP_Error $user Either the WP_User object or the WP_Error object
+ * @return WP_User|WP_Error If the user is not a spammer, return the WP_User object. Otherwise a new WP_Error object.
  *
  * @since BuddyPress (1.1.2)
  */
@@ -905,7 +935,7 @@ add_filter( 'authenticate', 'bp_core_boot_spammer', 30 );
  * Deletes usermeta for the user when the user is deleted.
  *
  * @package BuddyPress Core
- * @param $user_id The user id for the user to delete usermeta for
+ * @param int $user_id The user id for the user to delete usermeta for
  * @uses bp_delete_user_meta() deletes a row from the wp_usermeta table based on meta_key
  */
 function bp_core_remove_data( $user_id ) {
@@ -1062,7 +1092,7 @@ function bp_core_validate_email_address( $user_email ) {
  * @since BuddyPress (1.7)
  * @see bp_core_validate_email_address()
  *
- * @param obj $errors WP_Error object
+ * @param WP_Error $errors WP_Error object
  * @param array $validation_results The return value of a validation function
  *   like bp_core_validate_email_address()
  */
@@ -1102,8 +1132,11 @@ function bp_core_validate_user_signup( $user_name, $user_email ) {
 
 	$illegal_names = get_site_option( 'illegal_names' );
 
-	if ( !validate_username( $user_name ) || in_array( $user_name, (array) $illegal_names ) )
-		$errors->add( 'user_name', __( 'Only lowercase letters and numbers allowed', 'buddypress' ) );
+	if ( in_array( $user_name, (array) $illegal_names ) )
+		$errors->add( 'user_name', __( 'That username is not allowed', 'buddypress' ) );
+
+	if ( ! validate_username( $user_name ) )
+		$errors->add( 'user_name', __( 'Usernames can contain only letters, numbers, ., -, *, and @', 'buddypress' ) );
 
 	if( strlen( $user_name ) < 4 )
 		$errors->add( 'user_name',  __( 'Username must be at least 4 characters', 'buddypress' ) );
@@ -1374,8 +1407,8 @@ function bp_core_signup_send_validation_email( $user_id, $user_email, $key ) {
  * Multisite has their own DB table - 'wp_signups' - dedicated for unactivated users.
  * See {@link wpmu_signup_user()} and {@link wpmu_validate_user_signup()}.
  *
- * @param obj $user Either the WP_User object or the WP_Error object
- * @return obj If the user is not a spammer, return the WP_User object. Otherwise a new WP_Error object.
+ * @param WP_User|WP_Error $user Either the WP_User object or the WP_Error object
+ * @return WP_User|WP_Error If the user is not a spammer, return the WP_User object. Otherwise a new WP_Error object.
  *
  * @since BuddyPress (1.2.2)
  */
@@ -1413,3 +1446,71 @@ function bp_core_wpsignup_redirect() {
 	bp_core_redirect( bp_get_signup_page() );
 }
 add_action( 'bp_init', 'bp_core_wpsignup_redirect' );
+
+/**
+ * Stop a logged-in user who is marked as a spammer.
+ *
+ * When an admin marks a live user as a spammer, that user can still surf
+ * around and cause havoc on the site until that person is logged out.
+ *
+ * This code checks to see if a logged-in user is marked as a spammer.  If so,
+ * we redirect the user back to wp-login.php with the 'reauth' parameter.
+ *
+ * This clears the logged-in spammer's cookies and will ask the spammer to
+ * reauthenticate.
+ *
+ * Note: A spammer cannot log back in - {@see bp_core_boot_spammer()}.
+ *
+ * Runs on 'bp_init' at priority 5 so the members component globals are setup
+ * before we do our spammer checks.
+ *
+ * This is important as the $bp->loggedin_user object is setup at priority 4.
+ *
+ * @since BuddyPress (v1.8)
+ */
+function bp_stop_live_spammer() {
+	// if we're on the login page, stop now to prevent redirect loop
+	if ( strpos( $GLOBALS['pagenow'], 'wp-login.php' ) !== false ) {
+		return;
+	}
+
+	// user isn't logged in, so stop!
+	if ( ! is_user_logged_in() ) {
+		return;
+	}
+
+	// if spammer, redirect to wp-login.php and reauthorize
+	if ( bp_is_user_spammer( bp_loggedin_user_id() ) ) {
+		// setup login args
+		$args = array(
+			// custom action used to throw an error message
+			'action' => 'bp-spam',
+
+			// reauthorize user to login
+			'reauth' => 1
+		);
+
+		// setup login URL
+		$login_url = apply_filters( 'bp_live_spammer_redirect', add_query_arg( $args, wp_login_url() ) );
+
+		// redirect user to login page
+		wp_redirect( $login_url );
+		die();
+	}
+}
+add_action( 'bp_init', 'bp_stop_live_spammer', 5 );
+
+/**
+ * Show a custom error message when a logged-in user is marked as a spammer.
+ *
+ * @since BuddyPress (v1.8)
+ */
+function bp_live_spammer_login_error() {
+	global $error;
+
+	$error = __( '<strong>ERROR</strong>: Your account has been marked as a spammer.', 'buddypress' );
+
+	// shake shake shake!
+	add_action( 'login_head', 'wp_shake_js', 12 );
+}
+add_action( 'login_form_bp-spam', 'bp_live_spammer_login_error' ); 
diff --git a/wp-content/plugins/buddypress/bp-members/bp-members-loader.php b/wp-content/plugins/buddypress/bp-members/bp-members-loader.php
index a8132b2c8de3b3057f4c36736fffeb49e753f822..eae52b7317eaecdf0819d011509972e1243bb2e5 100644
--- a/wp-content/plugins/buddypress/bp-members/bp-members-loader.php
+++ b/wp-content/plugins/buddypress/bp-members/bp-members-loader.php
@@ -31,7 +31,7 @@ class BP_Members_Component extends BP_Component {
 	 *
 	 * @global BuddyPress $bp The one true BuddyPress instance
 	 */
-	function includes() {
+	public function includes( $includes = array() ) {
 		$includes = array(
 			'actions',
 			'filters',
@@ -54,7 +54,7 @@ class BP_Members_Component extends BP_Component {
 	 * @since BuddyPress (1.5)
 	 * @global BuddyPress $bp The one true BuddyPress instance
 	 */
-	function setup_globals() {
+	public function setup_globals( $args = array() ) {
 		global $bp;
 
 		// Define a slug, if necessary
@@ -143,7 +143,7 @@ class BP_Members_Component extends BP_Component {
 	 *
 	 * @global BuddyPress $bp The one true BuddyPress instance
 	 */
-	function setup_nav() {
+	public function setup_nav( $main_nav = array(), $sub_nav = array() ) {
 		global $bp;
 
 		// Add 'Profile' to the main navigation
diff --git a/wp-content/plugins/buddypress/bp-members/bp-members-notifications.php b/wp-content/plugins/buddypress/bp-members/bp-members-notifications.php
index 0819254b1b1552efd6a57440740c86c36e24138c..5e670b771606f09a1e9238b33033b1cb87b2e19f 100644
--- a/wp-content/plugins/buddypress/bp-members/bp-members-notifications.php
+++ b/wp-content/plugins/buddypress/bp-members/bp-members-notifications.php
@@ -119,7 +119,7 @@ function bp_core_get_notifications_for_user( $user_id, $format = 'simple' ) {
 				continue;
 
 			// Callback function exists
-			if ( isset( $bp->{$component_name}->notification_callback ) && function_exists( $bp->{$component_name}->notification_callback ) ) {
+			if ( isset( $bp->{$component_name}->notification_callback ) && is_callable( $bp->{$component_name}->notification_callback ) ) {
 
 				// Function should return an object
 				if ( 'object' == $format ) {
diff --git a/wp-content/plugins/buddypress/bp-members/bp-members-screens.php b/wp-content/plugins/buddypress/bp-members/bp-members-screens.php
index aeb93e24fcb62cdfb350b8f48e01a5adf9f1409a..dada9becb59d90baa7d0df1d2630e735beda7a05 100644
--- a/wp-content/plugins/buddypress/bp-members/bp-members-screens.php
+++ b/wp-content/plugins/buddypress/bp-members/bp-members-screens.php
@@ -266,7 +266,7 @@ add_action( 'bp_screens', 'bp_core_screen_activation' );
  * The main theme compat class for BuddyPress Members.
  *
  * This class sets up the necessary theme compatability actions to safely output
- * group template parts to the_title and the_content areas of a theme.
+ * member template parts to the_title and the_content areas of a theme.
  *
  * @since BuddyPress (1.7)
  */
@@ -298,6 +298,7 @@ class BP_Members_Theme_Compat {
 
 			do_action( 'bp_members_screen_index' );
 
+			add_filter( 'bp_get_buddypress_template',                array( $this, 'directory_template_hierarchy' ) );
 			add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'directory_dummy_post' ) );
 			add_filter( 'bp_replace_the_content',                    array( $this, 'directory_content'    ) );
 
@@ -310,6 +311,7 @@ class BP_Members_Theme_Compat {
 
 			do_action( 'bp_members_screen_display_profile' );
 
+			add_filter( 'bp_get_buddypress_template',                array( $this, 'single_template_hierarchy' ) );
 			add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'single_dummy_post'    ) );
 			add_filter( 'bp_replace_the_content',                    array( $this, 'single_dummy_content' ) );
 
@@ -318,6 +320,30 @@ class BP_Members_Theme_Compat {
 
 	/** Directory *************************************************************/
 
+	/**
+	 * Add template hierarchy to theme compat for the members directory page.
+	 *
+	 * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
+	 *
+	 * @since BuddyPress (1.8)
+	 *
+	 * @param string $templates The templates from bp_get_theme_compat_templates()
+	 * @return array $templates Array of custom templates to look for.
+	 */
+	public function directory_template_hierarchy( $templates = array() ) {
+
+		// Setup our templates based on priority
+		$new_templates = apply_filters( 'bp_template_hierarchy_members_directory', array(
+			'members/index-directory.php'
+		) );
+
+		// Merge new templates with existing stack
+		// @see bp_get_theme_compat_templates()
+		$templates = array_merge( (array) $new_templates, $templates );
+
+		return $templates;
+	}
+
 	/**
 	 * Update the global $post with directory data
 	 *
@@ -348,6 +374,36 @@ class BP_Members_Theme_Compat {
 
 	/** Single ****************************************************************/
 
+	/**
+	 * Add custom template hierarchy to theme compat for member pages. 
+	 *
+	 * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
+	 *
+	 * @since BuddyPress (1.8)
+	 *
+	 * @param string $templates The templates from bp_get_theme_compat_templates()
+	 * @return array $templates Array of custom templates to look for.
+	 */
+	public function single_template_hierarchy( $templates ) {
+		// Setup some variables we're going to reference in our custom templates 
+		$user_nicename = buddypress()->displayed_user->userdata->user_nicename; 
+
+		// Setup our templates based on priority
+		$new_templates = apply_filters( 'bp_template_hierarchy_members_single_item', array(
+			'members/single/index-id-'        . sanitize_file_name( bp_displayed_user_id() ) . '.php',
+			'members/single/index-nicename-'  . sanitize_file_name( $user_nicename )         . '.php',
+			'members/single/index-action-'    . sanitize_file_name( bp_current_action() )    . '.php',
+			'members/single/index-component-' . sanitize_file_name( bp_current_component() ) . '.php',
+			'members/single/index.php'
+		) );
+
+		// Merge new templates with existing stack
+		// @see bp_get_theme_compat_templates()
+		$templates = array_merge( (array) $new_templates, $templates );
+
+		return $templates;
+	}
+
 	/**
 	 * Update the global $post with the displayed user's data
 	 *
@@ -413,12 +469,38 @@ class BP_Registration_Theme_Compat {
 		bp_update_is_directory( false, 'register' );
 
 		// Setup actions
+		add_filter( 'bp_get_buddypress_template',                array( $this, 'template_hierarchy' ) );
 		add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'dummy_post'    ) );
 		add_filter( 'bp_replace_the_content',                    array( $this, 'dummy_content' ) );
 	}
 
 	/** Template ***********************************************************/
 
+	/**
+	 * Add template hierarchy to theme compat for registration / activation pages.
+	 *
+	 * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
+	 *
+	 * @since BuddyPress (1.8)
+	 *
+	 * @param string $templates The templates from bp_get_theme_compat_templates()
+	 * @return array $templates Array of custom templates to look for.
+	 */
+	public function template_hierarchy( $templates ) {
+		$component = sanitize_file_name( bp_current_component() );
+
+		// Setup our templates based on priority
+		$new_templates = apply_filters( "bp_template_hierarchy_{$component}", array(
+			"members/index-{$component}.php"
+		) );
+
+		// Merge new templates with existing stack
+		// @see bp_get_theme_compat_templates()
+		$templates = array_merge( (array) $new_templates, $templates );
+
+		return $templates;
+	}
+
 	/**
 	 * Update the global $post with dummy data
 	 *
@@ -430,7 +512,7 @@ class BP_Registration_Theme_Compat {
 			$title = __( 'Create an Account', 'buddypress' );
 
 			if ( 'completed-confirmation' == bp_get_current_signup_step() ) {
-				$title = __( 'Sign Up Complete!', 'buddypress' );
+				$title = __( 'Check Your Email To Activate Your Account!', 'buddypress' );
 			}
 
 		// Activation page
diff --git a/wp-content/plugins/buddypress/bp-members/bp-members-template.php b/wp-content/plugins/buddypress/bp-members/bp-members-template.php
index cfc3a72224ee7202547e851e1d9f3a7d728b5699..a1c5080b7467d68a6ea858bfe3bc0b647cd3195c 100644
--- a/wp-content/plugins/buddypress/bp-members/bp-members-template.php
+++ b/wp-content/plugins/buddypress/bp-members/bp-members-template.php
@@ -275,8 +275,9 @@ function bp_has_members( $args = '' ) {
 	$search_terms = null;
 
 	// User filtering
-	if ( bp_displayed_user_id() )
+	if ( bp_is_user_friends() && ! bp_is_user_friend_requests() ) {
 		$user_id = bp_displayed_user_id();
+	}
 
 	// type: active ( default ) | random | newest | popular | online | alphabetical
 	$defaults = array(
@@ -383,8 +384,8 @@ function bp_member_user_id() {
 	 */
 	function bp_get_member_user_id() {
 		global $members_template;
-
-		return apply_filters( 'bp_get_member_user_id', $members_template->member->id );
+		$member_id = isset( $members_template->member->id ) ? (int) $members_template->member->id : false;
+		return apply_filters( 'bp_get_member_user_id', $member_id );
 	}
 
 /**
@@ -554,7 +555,7 @@ function bp_member_name() {
 	 * @package BuddyPress
 	 *
 	 * @uses apply_filters() Filter bp_get_the_member_name() to alter the function's output
-	 * @return str The user's fullname for display
+	 * @return string The user's fullname for display
 	 */
 	function bp_get_member_name() {
 		global $members_template;
diff --git a/wp-content/plugins/buddypress/bp-messages/bp-messages-classes.php b/wp-content/plugins/buddypress/bp-messages/bp-messages-classes.php
index dbdd5c05a598bf8748d8edf4d4ab19297c8af64f..78841c5718aef96c472d3d3dc65167b299f196b3 100644
--- a/wp-content/plugins/buddypress/bp-messages/bp-messages-classes.php
+++ b/wp-content/plugins/buddypress/bp-messages/bp-messages-classes.php
@@ -149,7 +149,7 @@ class BP_Messages_Thread {
 			$type_sql = " AND r.unread_count = 0 ";
 
 		if ( !empty( $search_terms ) ) {
-			$search_terms = like_escape( $wpdb->escape( $search_terms ) );
+			$search_terms = like_escape( esc_sql( $search_terms ) );
 			$search_sql   = "AND ( subject LIKE '%%$search_terms%%' OR message LIKE '%%$search_terms%%' )";
 		}
 
diff --git a/wp-content/plugins/buddypress/bp-messages/bp-messages-functions.php b/wp-content/plugins/buddypress/bp-messages/bp-messages-functions.php
index 49b9937e6171de9f1ea4194eecd862b203fb9110..1b009c931d63eeadf8e1eccf7be723e1ad0ba3b0 100644
--- a/wp-content/plugins/buddypress/bp-messages/bp-messages-functions.php
+++ b/wp-content/plugins/buddypress/bp-messages/bp-messages-functions.php
@@ -233,11 +233,11 @@ function messages_is_valid_thread( $thread_id ) {
  *
  * @package BuddyPress
  *
- * @param str $action The kind of notification being rendered
+ * @param string $action The kind of notification being rendered
  * @param int $item_id The primary item id
  * @param int $secondary_item_id The secondary item id
  * @param int $total_items The total number of messaging-related notifications waiting for the user
- * @param str $format 'string' for BuddyBar-compatible notifications; 'array' for WP Toolbar
+ * @param string $format 'string' for BuddyBar-compatible notifications; 'array' for WP Toolbar
  */
 function messages_format_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) {
 
diff --git a/wp-content/plugins/buddypress/bp-messages/bp-messages-loader.php b/wp-content/plugins/buddypress/bp-messages/bp-messages-loader.php
index 6879556683a1cb7d9b5aa7a617d868f7056639e3..4d8682b200faf69adb4352923f97002caae82652 100644
--- a/wp-content/plugins/buddypress/bp-messages/bp-messages-loader.php
+++ b/wp-content/plugins/buddypress/bp-messages/bp-messages-loader.php
@@ -38,7 +38,7 @@ class BP_Messages_Component extends BP_Component {
 	/**
 	 * Include files
 	 */
-	function includes() {
+	public function includes( $includes = array() ) {
 		// Files to include
 		$includes = array(
 			'cssjs',
@@ -64,7 +64,7 @@ class BP_Messages_Component extends BP_Component {
 	 * @since BuddyPress (1.5)
 	 * @global BuddyPress $bp The one true BuddyPress instance
 	 */
-	function setup_globals() {
+	public function setup_globals( $args = array() ) {
 		global $bp;
 
 		// Define a slug, if necessary
@@ -98,7 +98,7 @@ class BP_Messages_Component extends BP_Component {
 	 *
 	 * @global BuddyPress $bp The one true BuddyPress instance
 	 */
-	function setup_nav() {
+	public function setup_nav( $main_nav = array(), $sub_nav = array() ) {
 
 		$sub_nav = array();
 		$name    = sprintf( __( 'Messages <span>%s</span>', 'buddypress' ), bp_get_total_unread_messages_count() );
@@ -177,7 +177,7 @@ class BP_Messages_Component extends BP_Component {
 	 *
 	 * @global BuddyPress $bp The one true BuddyPress instance
 	 */
-	function setup_admin_bar() {
+	public function setup_admin_bar( $wp_admin_nav = array() ) {
 		global $bp;
 
 		// Prevent debug notices
diff --git a/wp-content/plugins/buddypress/bp-messages/bp-messages-template.php b/wp-content/plugins/buddypress/bp-messages/bp-messages-template.php
index 2c0889f0fcbda6011a70b3473247837e31ad8c2f..3c9d9108cd376c5634157fd9c8b14d2e54441e88 100644
--- a/wp-content/plugins/buddypress/bp-messages/bp-messages-template.php
+++ b/wp-content/plugins/buddypress/bp-messages/bp-messages-template.php
@@ -383,7 +383,7 @@ function bp_messages_form_action() {
 	 *
 	 * @package BuddyPress
 	 *
-	 * @return str The form action
+	 * @return string The form action
 	 */
 	function bp_get_messages_form_action() {
 		return apply_filters( 'bp_get_messages_form_action', trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/' . bp_action_variable( 0 ) ) );
@@ -639,8 +639,10 @@ function bp_send_message_button() {
 	echo bp_get_send_message_button();
 }
 	function bp_get_send_message_button() {
+		// Note: 'bp_get_send_message_button' is a legacy filter. Use
+		// 'bp_get_send_message_button_args' instead. See #4536
 		return apply_filters( 'bp_get_send_message_button',
-			bp_get_button( array(
+			bp_get_button( apply_filters( 'bp_get_send_message_button_args', array(
 				'id'                => 'private_message',
 				'component'         => 'messages',
 				'must_be_logged_in' => true,
@@ -650,7 +652,7 @@ function bp_send_message_button() {
 				'link_title'        => __( 'Send a private message to this user.', 'buddypress' ),
 				'link_text'         => __( 'Private Message', 'buddypress' ),
 				'link_class'        => 'send-message',
-			) )
+			) ) )
 		);
 	}
 
diff --git a/wp-content/plugins/buddypress/bp-messages/js/autocomplete/jquery.autocompletefb.js b/wp-content/plugins/buddypress/bp-messages/js/autocomplete/jquery.autocompletefb.js
index df125ea39e3892e74bb3b9e9b528c925411c3651..5e637a5abb507ed5ed86b2b428b086ec126d584b 100644
--- a/wp-content/plugins/buddypress/bp-messages/js/autocomplete/jquery.autocompletefb.js
+++ b/wp-content/plugins/buddypress/bp-messages/js/autocomplete/jquery.autocompletefb.js
@@ -38,8 +38,8 @@ jQuery.fn.autoCompletefb = function(options)
 			return tmp.acfb;
 		},
 		removeUsername: function(o){
-			var newID = o.parentNode.id.split('-');
-			jQuery('#send-to-usernames').removeClass(newID[1]);
+			var newID = o.parentNode.id.substr( o.parentNode.id.indexOf('-')+1 );
+			jQuery('#send-to-usernames').removeClass(newID);
 		}
 	}
 
diff --git a/wp-content/plugins/buddypress/bp-messages/js/autocomplete/jquery.autocompletefb.min.js b/wp-content/plugins/buddypress/bp-messages/js/autocomplete/jquery.autocompletefb.min.js
index 119449e1043441e5930a8c431870d9509e0827c0..ba1fb2ec77f51f8cd055527f410bb28f40682760 100644
--- a/wp-content/plugins/buddypress/bp-messages/js/autocomplete/jquery.autocompletefb.min.js
+++ b/wp-content/plugins/buddypress/bp-messages/js/autocomplete/jquery.autocompletefb.min.js
@@ -13,4 +13,4 @@
  *   http://www.opensource.org/licenses/mit-license.php
  *   http://www.gnu.org/licenses/gpl.html
  */
-jQuery.fn.autoCompletefb=function(b){var c=this;var d={ul:c,urlLookup:[""],acOptions:{},foundClass:".friend-tab",inputClass:".send-to-input"};if(b){jQuery.extend(d,b)}var a={params:d,removeFind:function(e){a.removeUsername(e);jQuery(e).unbind("click").parent().remove();jQuery(d.inputClass,c).focus();return c.acfb},removeUsername:function(f){var e=f.parentNode.id.split("-");jQuery("#send-to-usernames").removeClass(e[1])}};jQuery(d.foundClass+" img.p").click(function(){a.removeFind(this)});jQuery(d.inputClass,c).autocomplete(d.urlLookup,d.acOptions);jQuery(d.inputClass,c).result(function(n,o,m){var m=d.foundClass.replace(/\./,"");var o=String(o).split(" (");var j=o[1].substr(0,o[1].length-1);if(0===jQuery(d.inputClass).siblings("#un-"+j).length){var k="#link-"+j;var h=jQuery(k).attr("href");var i='<li class="'+m+'" id="un-'+j+'"><span><a href="'+h+'">'+o[0]+'</a></span> <span class="p">X</span></li>';var g=jQuery(d.inputClass,c).before(i);jQuery("#send-to-usernames").addClass(j);jQuery(".p",g[0].previousSibling).click(function(){a.removeFind(this)})}jQuery(d.inputClass,c).val("")});jQuery(d.inputClass,c).focus();return a};
\ No newline at end of file
+jQuery.fn.autoCompletefb=function(b){var c=this;var d={ul:c,urlLookup:[""],acOptions:{},foundClass:".friend-tab",inputClass:".send-to-input"};if(b){jQuery.extend(d,b)}var a={params:d,removeFind:function(e){a.removeUsername(e);jQuery(e).unbind("click").parent().remove();jQuery(d.inputClass,c).focus();return c.acfb},removeUsername:function(f){var e=f.parentNode.id.substr(f.parentNode.id.indexOf("-")+1);jQuery("#send-to-usernames").removeClass(e)}};jQuery(d.foundClass+" img.p").click(function(){a.removeFind(this)});jQuery(d.inputClass,c).autocomplete(d.urlLookup,d.acOptions);jQuery(d.inputClass,c).result(function(n,o,m){var m=d.foundClass.replace(/\./,"");var o=String(o).split(" (");var j=o[1].substr(0,o[1].length-1);if(0===jQuery(d.inputClass).siblings("#un-"+j).length){var k="#link-"+j;var h=jQuery(k).attr("href");var i='<li class="'+m+'" id="un-'+j+'"><span><a href="'+h+'">'+o[0]+'</a></span> <span class="p">X</span></li>';var g=jQuery(d.inputClass,c).before(i);jQuery("#send-to-usernames").addClass(j);jQuery(".p",g[0].previousSibling).click(function(){a.removeFind(this)})}jQuery(d.inputClass,c).val("")});jQuery(d.inputClass,c).focus();return a};
\ No newline at end of file
diff --git a/wp-content/plugins/buddypress/bp-settings/bp-settings-actions.php b/wp-content/plugins/buddypress/bp-settings/bp-settings-actions.php
index fd107dedfce05428eb55955a5fe26658b5a8f3be..8cca694336ec5d7a96dd66a91e173356709ece7d 100644
--- a/wp-content/plugins/buddypress/bp-settings/bp-settings-actions.php
+++ b/wp-content/plugins/buddypress/bp-settings/bp-settings-actions.php
@@ -23,7 +23,6 @@ if ( !defined( 'ABSPATH' ) ) exit;
  * users accounts already, without knowing their existing password.
  *
  * @global BuddyPress $bp
- * @return If no reason to proceed
  */
 function bp_settings_action_general() {
 
@@ -214,8 +213,6 @@ add_action( 'bp_actions', 'bp_settings_action_general' );
 
 /**
  * Handles the changing and saving of user notification settings
- *
- * @return If no reason to proceed
  */
 function bp_settings_action_notifications() {
 
@@ -260,8 +257,6 @@ add_action( 'bp_actions', 'bp_settings_action_notifications' );
 
 /**
  * Handles the setting of user capabilities, spamming, hamming, role, etc...
- *
- * @return If no reason to proceed
  */
 function bp_settings_action_capabilities() {
 
@@ -309,8 +304,6 @@ add_action( 'bp_actions', 'bp_settings_action_capabilities' );
 
 /**
  * Handles the deleting of a user
- *
- * @return If no reason to proceed
  */
 function bp_settings_action_delete_account() {
 
diff --git a/wp-content/plugins/buddypress/bp-settings/bp-settings-screens.php b/wp-content/plugins/buddypress/bp-settings/bp-settings-screens.php
index 1cc092e1fcb09305a943b281c56ae76cb363659f..5d97321ad5e0bf82e976266ba9b0281a6f34e2e1 100644
--- a/wp-content/plugins/buddypress/bp-settings/bp-settings-screens.php
+++ b/wp-content/plugins/buddypress/bp-settings/bp-settings-screens.php
@@ -14,8 +14,6 @@ if ( !defined( 'ABSPATH' ) ) exit;
  * Show the general settings template
  *
  * @since BuddyPress (1.5)
- *
- * @return If we shouldn't be here
  */
 function bp_settings_screen_general() {
 
@@ -31,8 +29,6 @@ function bp_settings_screen_general() {
  * Show the notifications settings template
  *
  * @since BuddyPress (1.5)
- *
- * @return If we shouldn't be here
  */
 function bp_settings_screen_notification() {
 
@@ -48,8 +44,6 @@ function bp_settings_screen_notification() {
  * Show the delete-account settings template
  *
  * @since BuddyPress (1.5)
- *
- * @return If we shouldn't be here
  */
 function bp_settings_screen_delete_account() {
 
@@ -66,8 +60,6 @@ function bp_settings_screen_delete_account() {
  * Show the capabilities settings template
  *
  * @since BuddyPress (1.6)
- *
- * @return If we shouldn't be here
  */
 function bp_settings_screen_capabilities() {
 
diff --git a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress-functions.php b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress-functions.php
index 2f5e672e711c4a84e2190778b0451248008f3279..07fd408836de20cf22f73f13b3a7c96f60e21dcb 100644
--- a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress-functions.php
+++ b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress-functions.php
@@ -99,7 +99,7 @@ class BP_Legacy extends BP_Theme_Compat {
 				add_action( 'bp_member_header_actions',    'bp_add_friend_button',           5 );
 
 			// Activity button
-			if ( bp_is_active( 'activity' ) )
+			if ( bp_is_active( 'activity' ) && bp_activity_do_mentions() )
 				add_action( 'bp_member_header_actions',    'bp_send_public_message_button',  20 );
 
 			// Messages button
@@ -195,26 +195,15 @@ class BP_Legacy extends BP_Theme_Compat {
 	public function enqueue_styles() {
 
 		// LTR or RTL
-		$file = is_rtl() ? 'css/buddypress-rtl.css' : 'css/buddypress.css';
+		$file = is_rtl() ? 'buddypress-rtl.css' : 'buddypress.css';
 
-		// Check child theme
-		if ( file_exists( trailingslashit( get_stylesheet_directory() ) . $file ) ) {
-			$location = trailingslashit( get_stylesheet_directory_uri() );
-			$handle   = 'bp-child-css';
+		// Locate the BP stylesheet
+		$asset = $this->locate_asset_in_stack( $file, 'css' );
 
-		// Check parent theme
-		} elseif ( file_exists( trailingslashit( get_template_directory() ) . $file ) ) {
-			$location = trailingslashit( get_template_directory_uri() );
-			$handle   = 'bp-parent-css';
-
-		// BuddyPress Theme Compatibility
-		} else {
-			$location = trailingslashit( $this->url );
-			$handle   = 'bp-legacy-css';
+		// Enqueue BuddyPress-specific styling, if found
+		if ( isset( $asset['location'], $asset['handle'] ) ) {
+			wp_enqueue_style( $asset['handle'], $asset['location'], array(), $this->version, 'screen' );
 		}
-
-		// Enqueue the BuddyPress styling
-		wp_enqueue_style( $handle, $location . $file, array(), $this->version, 'screen' );
 	}
 
 	/**
@@ -224,42 +213,33 @@ class BP_Legacy extends BP_Theme_Compat {
 	 */
 	public function enqueue_scripts() {
 
-		// LTR or RTL
-		$file = 'js/buddypress.js';
-
-		// Check child theme
-		if ( file_exists( trailingslashit( get_stylesheet_directory() ) . $file ) ) {
-			$location = trailingslashit( get_stylesheet_directory_uri() );
-			$handle   = 'bp-child-js';
+		$file = 'buddypress.js';
 
-		// Check parent theme
-		} elseif ( file_exists( trailingslashit( get_template_directory() ) . $file ) ) {
-			$location = trailingslashit( get_template_directory_uri() );
-			$handle   = 'bp-parent-js';
+		// Locate the BP JS file
+		$asset = $this->locate_asset_in_stack( $file, 'js' );
 
-		// BuddyPress Theme Compatibility
-		} else {
-			$location = trailingslashit( $this->url );
-			$handle   = 'bp-legacy-js';
+		// Enqueue the global JS, if found - AJAX will not work
+		// without it
+		if ( isset( $asset['location'], $asset['handle'] ) ) {
+			wp_enqueue_script( $asset['handle'], $asset['location'], array( 'jquery' ), $this->version );
 		}
 
-		// Enqueue the global JS - Ajax will not work without it
-		wp_enqueue_script( $handle, $location . $file, array( 'jquery' ), $this->version );
-
 		// Add words that we need to use in JS to the end of the page so they can be translated and still used.
 		$params = array(
 			'my_favs'           => __( 'My Favorites', 'buddypress' ),
 			'accepted'          => __( 'Accepted', 'buddypress' ),
 			'rejected'          => __( 'Rejected', 'buddypress' ),
 			'show_all_comments' => __( 'Show all comments for this thread', 'buddypress' ),
+			'show_x_comments'   => __( 'Show all %d comments', 'buddypress' ),
 			'show_all'          => __( 'Show all', 'buddypress' ),
 			'comments'          => __( 'comments', 'buddypress' ),
 			'close'             => __( 'Close', 'buddypress' ),
 			'view'              => __( 'View', 'buddypress' ),
 			'mark_as_fav'	    => __( 'Favorite', 'buddypress' ),
-			'remove_fav'	    => __( 'Remove Favorite', 'buddypress' )
+			'remove_fav'	    => __( 'Remove Favorite', 'buddypress' ),
+			'unsaved_changes'   => __( 'Your profile has unsaved changes. If you leave the page, the changes will be lost.', 'buddypress' ),
 		);
-		wp_localize_script( $handle, 'BP_DTheme', $params );
+		wp_localize_script( $asset['handle'], 'BP_DTheme', $params );
 
 		// Maybe enqueue comment reply JS
 		if ( is_singular() && bp_is_blog_page() && get_option( 'thread_comments' ) ) {
@@ -267,6 +247,80 @@ class BP_Legacy extends BP_Theme_Compat {
 		}
 	}
 
+	/**
+	 * Get the URL and handle of a web-accessible CSS or JS asset
+	 *
+	 * We provide two levels of customizability with respect to where CSS
+	 * and JS files can be stored: (1) the child theme/parent theme/theme
+	 * compat hierarchy, and (2) the "template stack" of /buddypress/css/,
+	 * /community/css/, and /css/. In this way, CSS and JS assets can be
+	 * overloaded, and default versions provided, in exactly the same way
+	 * as corresponding PHP templates.
+	 *
+	 * We are duplicating some of the logic that is currently found in
+	 * bp_locate_template() and the _template_stack() functions. Those
+	 * functions were built with PHP templates in mind, and will require
+	 * refactoring in order to provide "stack" functionality for assets
+	 * that must be accessible both using file_exists() (the file path)
+	 * and at a public URI.
+	 *
+	 * This method is marked private, with the understanding that the
+	 * implementation is subject to change or removal in an upcoming
+	 * release, in favor of a unified _template_stack() system. Plugin
+	 * and theme authors should not attempt to use what follows.
+	 *
+	 * @since BuddyPress (1.8)
+	 * @access private
+	 * @param string $file A filename like buddypress.cs
+	 * @param string $type css|js
+	 * @return array An array of data for the wp_enqueue_* function:
+	 *   'handle' (eg 'bp-child-css') and a 'location' (the URI of the
+	 *   asset)
+	 */
+	private function locate_asset_in_stack( $file, $type = 'css' ) {
+		// Child, parent, theme compat
+		$locations = array();
+
+		// No need to check child if template == stylesheet
+		if ( is_child_theme() ) {
+			$locations['bp-child'] = array(
+				'dir' => get_stylesheet_directory(),
+				'uri' => get_stylesheet_directory_uri(),
+			);
+		}
+
+		$locations['bp-parent'] = array(
+			'dir' => get_template_directory(),
+			'uri' => get_template_directory_uri(),
+		);
+
+		$locations['bp-legacy'] = array(
+			'dir' => bp_get_theme_compat_dir(),
+			'uri' => bp_get_theme_compat_url(),
+		);
+
+		// Subdirectories within the top-level $locations directories
+		$subdirs = array(
+			'buddypress/' . $type,
+			'community/' . $type,
+			$type,
+		);
+
+		$retval = array();
+
+		foreach ( $locations as $location_type => $location ) {
+			foreach ( $subdirs as $subdir ) {
+				if ( file_exists( trailingslashit( $location['dir'] ) . trailingslashit( $subdir ) . $file ) ) {
+					$retval['location'] = trailingslashit( $location['uri'] ) . trailingslashit( $subdir ) . $file;
+					$retval['handle']   = $location_type . '-' . $type;
+					break 2;
+				}
+			}
+		}
+
+		return $retval;
+	}
+
 	/**
 	 * Put some scripts in the header, like AJAX url for wp-lists
 	 *
@@ -416,6 +470,12 @@ function bp_legacy_theme_ajax_querystring( $query_string, $object ) {
 	if ( ! empty( $_POST['page'] ) && '-1' != $_POST['page'] )
 		$qs[] = 'page=' . absint( $_POST['page'] );
 
+	// exludes activity just posted and avoids duplicate ids
+	if ( ! empty( $_POST['exclude_just_posted'] ) ) {
+		$just_posted = wp_parse_id_list( $_POST['exclude_just_posted'] );
+		$qs[] = 'exclude=' . implode( ',', $just_posted );
+	}
+
 	$object_search_text = bp_get_search_default_text( $object );
  	if ( ! empty( $_POST['search_terms'] ) && $object_search_text != $_POST['search_terms'] && 'false' != $_POST['search_terms'] && 'undefined' != $_POST['search_terms'] )
 		$qs[] = 'search_terms=' . $_POST['search_terms'];
@@ -457,19 +517,26 @@ function bp_legacy_theme_object_template_loader() {
 	if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
 		return;
 
+	// Bail if no object passed
+	if ( empty( $_POST['object'] ) )
+		return;
+
+	// Sanitize the object
+	$object = sanitize_title( $_POST['object'] );
+
+	// Bail if object is not an active component to prevent arbitrary file inclusion
+	if ( ! bp_is_active( $object ) )
+		return;
+
  	/**
 	 * AJAX requests happen too early to be seen by bp_update_is_directory()
 	 * so we do it manually here to ensure templates load with the correct
 	 * context. Without this check, templates will load the 'single' version
 	 * of themselves rather than the directory version.
 	 */
-
 	if ( ! bp_current_action() )
 		bp_update_is_directory( true, bp_current_component() );
 
-	// Sanitize the post object
-	$object = esc_attr( $_POST['object'] );
-
 	// Locate the object template
 	bp_get_template_part( "$object/$object-loop" );
 	exit();
@@ -819,7 +886,6 @@ function bp_legacy_theme_get_single_activity_content() {
 /**
  * Invites a friend to join a group via a POST request.
  *
- * @return unknown
  * @since BuddyPress (1.2)
  * @todo Audit return types
  */
diff --git a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity/comment.php b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity/comment.php
index d8bf0f8e67282c91521f29693a2807d698627f54..a4c9b60d9575abe746abdb38e42069a342f3bfb6 100644
--- a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity/comment.php
+++ b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity/comment.php
@@ -24,7 +24,7 @@
 	<div class="acomment-meta">
 		<?php
 		/* translators: 1: user profile link, 2: user name, 3: activity permalink, 4: activity timestamp */
-		printf( __( '<a href="%1$s">%2$s</a> replied <a href="%3$s" class="activity-time-since"><span class="time-since">%4$s</span></a>', 'buddypress' ), bp_get_activity_comment_user_link(), bp_get_activity_comment_name(), bp_get_activity_thread_permalink(), bp_get_activity_comment_date_recorded() );
+		printf( __( '<a href="%1$s">%2$s</a> replied <a href="%3$s" class="activity-time-since"><span class="time-since">%4$s</span></a>', 'buddypress' ), bp_get_activity_comment_user_link(), bp_get_activity_comment_name(), bp_get_activity_comment_permalink(), bp_get_activity_comment_date_recorded() );
 		?>
 	</div>
 
diff --git a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity/index.php b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity/index.php
index beaff81442db89927be114ea928dfdeac08d7afd..ce0423e754d38e3e313a44d93643559cb77a431e 100644
--- a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity/index.php
+++ b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity/index.php
@@ -16,7 +16,7 @@
 		<ul>
 			<?php do_action( 'bp_before_activity_type_tab_all' ); ?>
 
-			<li class="selected" id="activity-all"><a href="<?php bp_activity_directory_permalink(); ?>" title="<?php _e( 'The public activity for everyone on this site.', 'buddypress' ); ?>"><?php printf( __( 'All Members <span>%s</span>', 'buddypress' ), bp_get_total_member_count() ); ?></a></li>
+			<li class="selected" id="activity-all"><a href="<?php bp_activity_directory_permalink(); ?>" title="<?php _e( 'The public activity for everyone on this site.', 'buddypress' ); ?>"><?php printf( __( 'All Members <span>%s</span>', 'buddypress' ), number_format_i18n( bp_get_total_member_count() ) ); ?></a></li>
 
 			<?php if ( is_user_logged_in() ) : ?>
 
@@ -26,7 +26,7 @@
 
 					<?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
 
-						<li id="activity-friends"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/'; ?>" title="<?php _e( 'The activity of my friends only.', 'buddypress' ); ?>"><?php printf( __( 'My Friends <span>%s</span>', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ); ?></a></li>
+						<li id="activity-friends"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/'; ?>" title="<?php _e( 'The activity of my friends only.', 'buddypress' ); ?>"><?php printf( __( 'My Friends <span>%s</span>', 'buddypress' ), number_format_i18n( bp_get_total_friend_count( bp_loggedin_user_id() ) ) ); ?></a></li>
 
 					<?php endif; ?>
 
@@ -38,7 +38,7 @@
 
 					<?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
 
-						<li id="activity-groups"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/'; ?>" title="<?php _e( 'The activity of groups I am a member of.', 'buddypress' ); ?>"><?php printf( __( 'My Groups <span>%s</span>', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
+						<li id="activity-groups"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/'; ?>" title="<?php _e( 'The activity of groups I am a member of.', 'buddypress' ); ?>"><?php printf( __( 'My Groups <span>%s</span>', 'buddypress' ), number_format_i18n( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) ); ?></a></li>
 
 					<?php endif; ?>
 
@@ -48,13 +48,17 @@
 
 				<?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?>
 
-					<li id="activity-favorites"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/favorites/'; ?>" title="<?php _e( "The activity I've marked as a favorite.", 'buddypress' ); ?>"><?php printf( __( 'My Favorites <span>%s</span>', 'buddypress' ), bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
+					<li id="activity-favorites"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/favorites/'; ?>" title="<?php _e( "The activity I've marked as a favorite.", 'buddypress' ); ?>"><?php printf( __( 'My Favorites <span>%s</span>', 'buddypress' ), number_format_i18n( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) ); ?></a></li>
 
 				<?php endif; ?>
 
-				<?php do_action( 'bp_before_activity_type_tab_mentions' ); ?>
+				<?php if ( bp_activity_do_mentions() ) : ?>
 
-				<li id="activity-mentions"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/'; ?>" title="<?php _e( 'Activity that I have been mentioned in.', 'buddypress' ); ?>"><?php _e( 'Mentions', 'buddypress' ); ?><?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?> <strong><?php printf( __( '<span>%s new</span>', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ); ?></strong><?php endif; ?></a></li>
+					<?php do_action( 'bp_before_activity_type_tab_mentions' ); ?>
+
+					<li id="activity-mentions"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/'; ?>" title="<?php _e( 'Activity that I have been mentioned in.', 'buddypress' ); ?>"><?php _e( 'Mentions', 'buddypress' ); ?><?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?> <strong><span><?php printf( _nx( '%s new', '%s new', bp_get_total_mention_count_for_user( bp_loggedin_user_id() ), 'Number of new activity mentions', 'buddypress' ), number_format_i18n( bp_get_total_mention_count_for_user( bp_loggedin_user_id()  )) ); ?></span></strong><?php endif; ?></a></li>
+
+				<?php endif; ?>
 
 			<?php endif; ?>
 
diff --git a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/groups/single/admin.php b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/groups/single/admin.php
index a5e6c588c4110d4ad0177bf0d0ca6b77ec1b150d..449a7bfa5170e9ec1c66067717343541bde3a764 100644
--- a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/groups/single/admin.php
+++ b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/groups/single/admin.php
@@ -22,9 +22,9 @@
 	<?php do_action( 'groups_custom_group_fields_editable' ); ?>
 
 	<p>
-		<label for="group-notifiy-members"><?php _e( 'Notify group members of changes via email', 'buddypress' ); ?></label>
-		<input type="radio" name="group-notify-members" value="1" /> <?php _e( 'Yes', 'buddypress' ); ?>&nbsp;
-		<input type="radio" name="group-notify-members" value="0" checked="checked" /> <?php _e( 'No', 'buddypress' ); ?>&nbsp;
+		<label for="group-notifiy-members">
+			<input type="checkbox" name="group-notify-members" value="1" /> <?php _e( 'Notify group members of these changes via email', 'buddypress' ); ?>
+		</label>
 	</p>
 
 	<?php do_action( 'bp_after_group_details_admin' ); ?>
@@ -87,30 +87,30 @@
 		</label>
 	</div>
 
-	<hr /> 
-	 
-	<h4><?php _e( 'Group Invitations', 'buddypress' ); ?></h4> 
+	<hr />
 
-	<p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ); ?></p> 
+	<h4><?php _e( 'Group Invitations', 'buddypress' ); ?></h4>
 
-	<div class="radio"> 
-		<label> 
-			<input type="radio" name="group-invite-status" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> /> 
-			<strong><?php _e( 'All group members', 'buddypress' ); ?></strong> 
-		</label> 
+	<p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ); ?></p>
 
-		<label> 
-			<input type="radio" name="group-invite-status" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> /> 
-			<strong><?php _e( 'Group admins and mods only', 'buddypress' ); ?></strong> 
+	<div class="radio">
+		<label>
+			<input type="radio" name="group-invite-status" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> />
+			<strong><?php _e( 'All group members', 'buddypress' ); ?></strong>
 		</label>
-		
-		<label> 
-			<input type="radio" name="group-invite-status" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> /> 
-			<strong><?php _e( 'Group admins only', 'buddypress' ); ?></strong> 
-		</label> 
- 	</div> 
 
-	<hr /> 
+		<label>
+			<input type="radio" name="group-invite-status" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> />
+			<strong><?php _e( 'Group admins and mods only', 'buddypress' ); ?></strong>
+		</label>
+
+		<label>
+			<input type="radio" name="group-invite-status" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> />
+			<strong><?php _e( 'Group admins only', 'buddypress' ); ?></strong>
+		</label>
+ 	</div>
+
+	<hr />
 
 	<?php do_action( 'bp_after_group_settings_admin' ); ?>
 
@@ -172,14 +172,14 @@
 <?php if ( bp_is_group_admin_screen( 'manage-members' ) ) : ?>
 
 	<?php do_action( 'bp_before_group_manage_members_admin' ); ?>
-	
+
 	<div class="bp-widget">
 		<h4><?php _e( 'Administrators', 'buddypress' ); ?></h4>
 
 		<?php if ( bp_has_members( '&include='. bp_group_admin_ids() ) ) : ?>
-		
+
 		<ul id="admins-list" class="item-list single-line">
-			
+
 			<?php while ( bp_members() ) : bp_the_member(); ?>
 			<li>
 				<?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_member_name() ) ) ); ?>
@@ -188,26 +188,26 @@
 					<?php if ( count( bp_group_admin_ids( false, 'array' ) ) > 1 ) : ?>
 					<span class="small">
 						<a class="button confirm admin-demote-to-member" href="<?php bp_group_member_demote_link( bp_get_member_user_id() ); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a>
-					</span>			
+					</span>
 					<?php endif; ?>
-				</h5>		
+				</h5>
 			</li>
 			<?php endwhile; ?>
-		
+
 		</ul>
-		
+
 		<?php endif; ?>
 
 	</div>
-	
+
 	<?php if ( bp_group_has_moderators() ) : ?>
 		<div class="bp-widget">
-			<h4><?php _e( 'Moderators', 'buddypress' ); ?></h4>		
-			
+			<h4><?php _e( 'Moderators', 'buddypress' ); ?></h4>
+
 			<?php if ( bp_has_members( '&include=' . bp_group_mod_ids() ) ) : ?>
 				<ul id="mods-list" class="item-list single-line">
-				
-					<?php while ( bp_members() ) : bp_the_member(); ?>					
+
+					<?php while ( bp_members() ) : bp_the_member(); ?>
 					<li>
 						<?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_member_name() ) ) ); ?>
 						<h5>
@@ -215,13 +215,13 @@
 							<span class="small">
 								<a href="<?php bp_group_member_promote_admin_link( array( 'user_id' => bp_get_member_user_id() ) ); ?>" class="button confirm mod-promote-to-admin" title="<?php _e( 'Promote to Admin', 'buddypress' ); ?>"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a>
 								<a class="button confirm mod-demote-to-member" href="<?php bp_group_member_demote_link( bp_get_member_user_id() ); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a>
-							</span>		
-						</h5>		
-					</li>	
-					<?php endwhile; ?>			
-				
+							</span>
+						</h5>
+					</li>
+					<?php endwhile; ?>
+
 				</ul>
-			
+
 			<?php endif; ?>
 		</div>
 	<?php endif ?>
diff --git a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/activate.php b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/activate.php
index eea8e38ff03a6ed382d434cdaa2d25335531f474..9460a35dd5bb20c139454184067138da299656a1 100644
--- a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/activate.php
+++ b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/activate.php
@@ -13,7 +13,7 @@
 			<?php if ( isset( $_GET['e'] ) ) : ?>
 				<p><?php _e( 'Your account was activated successfully! Your account details have been sent to you in a separate email.', 'buddypress' ); ?></p>
 			<?php else : ?>
-				<p><?php _e( 'Your account was activated successfully! You can now log in with the username and password you provided when you signed up.', 'buddypress' ); ?></p>
+				<p><?php printf( __( 'Your account was activated successfully! You can now <a href="%s">log in</a> with the username and password you provided when you signed up.', 'buddypress' ), wp_login_url( bp_get_root_domain() ) ); ?></p>
 			<?php endif; ?>
 
 		<?php else : ?>
diff --git a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/index.php b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/index.php
index 86b30cf44f3ca2cfc5403ab390f353f9fe68dc92..eef885794f387d59205565efe87e4c228ff27cbd 100644
--- a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/index.php
+++ b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/index.php
@@ -10,6 +10,8 @@
 		<?php bp_directory_members_search_form(); ?>
 	</div><!-- #members-dir-search -->
 
+	<?php do_action( 'bp_before_directory_members_tabs' ); ?>
+
 	<form action="" method="post" id="members-directory-form" class="dir-form">
 
 		<div class="item-list-tabs" role="navigation">
diff --git a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/register.php b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/register.php
index 60baffda69462d8502e4681414a5de89cf843e89..e619221bd10b580bdfba5de52fe2dc95b9bf4bd0 100644
--- a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/register.php
+++ b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/register.php
@@ -69,7 +69,7 @@
 							<?php if ( 'textbox' == bp_get_the_profile_field_type() ) : ?>
 
 								<label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
-								<?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
+								<?php do_action( bp_get_the_profile_field_errors_action() ); ?>
 								<input type="text" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" value="<?php bp_the_profile_field_edit_value(); ?>" />
 
 							<?php endif; ?>
@@ -77,7 +77,7 @@
 							<?php if ( 'textarea' == bp_get_the_profile_field_type() ) : ?>
 
 								<label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
-								<?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
+								<?php do_action( bp_get_the_profile_field_errors_action() ); ?>
 								<textarea rows="5" cols="40" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_edit_value(); ?></textarea>
 
 							<?php endif; ?>
@@ -85,7 +85,7 @@
 							<?php if ( 'selectbox' == bp_get_the_profile_field_type() ) : ?>
 
 								<label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
-								<?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
+								<?php do_action( bp_get_the_profile_field_errors_action() ); ?>
 								<select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>">
 									<?php bp_the_profile_field_options(); ?>
 								</select>
@@ -95,7 +95,7 @@
 							<?php if ( 'multiselectbox' == bp_get_the_profile_field_type() ) : ?>
 
 								<label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
-								<?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
+								<?php do_action( bp_get_the_profile_field_errors_action() ); ?>
 								<select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" multiple="multiple">
 									<?php bp_the_profile_field_options(); ?>
 								</select>
@@ -107,7 +107,7 @@
 								<div class="radio">
 									<span class="label"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></span>
 
-									<?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
+									<?php do_action( bp_get_the_profile_field_errors_action() ); ?>
 									<?php bp_the_profile_field_options(); ?>
 
 									<?php if ( !bp_get_the_profile_field_is_required() ) : ?>
@@ -122,7 +122,7 @@
 								<div class="checkbox">
 									<span class="label"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></span>
 
-									<?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
+									<?php do_action( bp_get_the_profile_field_errors_action() ); ?>
 									<?php bp_the_profile_field_options(); ?>
 								</div>
 
@@ -132,7 +132,7 @@
 
 								<div class="datebox">
 									<label for="<?php bp_the_profile_field_input_name(); ?>_day"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
-									<?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
+									<?php do_action( bp_get_the_profile_field_errors_action() ); ?>
 
 									<select name="<?php bp_the_profile_field_input_name(); ?>_day" id="<?php bp_the_profile_field_input_name(); ?>_day">
 										<?php bp_the_profile_field_options( 'type=day' ); ?>
@@ -210,7 +210,7 @@
 						<?php if ( is_subdomain_install() ) : ?>
 							http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> .<?php bp_blogs_subdomain_base(); ?>
 						<?php else : ?>
-							<?php echo site_url(); ?>/ <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" />
+							<?php echo home_url( '/' ); ?> <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" />
 						<?php endif; ?>
 
 						<label for="signup_blog_title"><?php _e( 'Site Title', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
diff --git a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/home.php b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/home.php
index 9fcf24ec135baecf432abba0244833a1c5894899..72b6d5ade0ff7f0c92a0a4295d3a56706cdb166a 100644
--- a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/home.php
+++ b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/home.php
@@ -20,7 +20,7 @@
 		</div>
 	</div><!-- #item-nav -->
 
-	<div id="item-body">
+	<div id="item-body" role="main">
 
 		<?php do_action( 'bp_before_member_body' );
 
diff --git a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/member-header.php b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/member-header.php
index 9bd1c1d4bfad4493f3456f649382bf195e3cb171..a02511ab41ed46b219271f9c9573da0ed8a32a2f 100644
--- a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/member-header.php
+++ b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/member-header.php
@@ -21,7 +21,10 @@
 
 <div id="item-header-content">
 
-	<h2 class="user-nicename">@<?php bp_displayed_user_username(); ?></h2>
+	<?php if ( bp_is_active( 'activity' ) && bp_activity_do_mentions() ) : ?>
+		<h2 class="user-nicename">@<?php bp_displayed_user_username(); ?></h2>
+	<?php endif; ?>
+
 	<span class="activity"><?php bp_last_activity( bp_displayed_user_id() ); ?></span>
 
 	<?php do_action( 'bp_before_member_header_meta' ); ?>
diff --git a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/profile.php b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/profile.php
index 928f926d4ce93c8d3b802d9adccee992d676ae96..7f8927ec34b5aea320c87986200e5bb97bca69da 100644
--- a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/profile.php
+++ b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/profile.php
@@ -9,17 +9,11 @@
 
 ?>
 
-<?php if ( bp_is_my_profile() ) : ?>
-
-	<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
-		<ul>
-
-			<?php bp_get_options_nav(); ?>
-
-		</ul>
-	</div><!-- .item-list-tabs -->
-
-<?php endif; ?>
+<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
+	<ul>
+		<?php bp_get_options_nav(); ?>
+	</ul>
+</div><!-- .item-list-tabs -->
 
 <?php do_action( 'bp_before_profile_content' ); ?>
 
diff --git a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/settings/capabilities.php b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/settings/capabilities.php
index 9c84ee96260890184c721b3937020a944b78ce45..660f08fa83f188b0e96b07dc65ffae5b3686bc58 100644
--- a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/settings/capabilities.php
+++ b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/settings/capabilities.php
@@ -1,34 +1,22 @@
-<div id="buddypress">
+<?php do_action( 'bp_before_member_settings_template' ); ?>
 
-	<?php do_action( 'bp_before_member_settings_template' ); ?>
+<form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/capabilities/'; ?>" name="account-capabilities-form" id="account-capabilities-form" class="standard-form" method="post">
 
-	<div id="item-body" role="main">
+	<?php do_action( 'bp_members_capabilities_account_before_submit' ); ?>
 
-		<?php do_action( 'bp_before_member_body' ); ?>
+	<label>
+		<input type="checkbox" name="user-spammer" id="user-spammer" value="1" <?php checked( bp_is_user_spammer( bp_displayed_user_id() ) ); ?> />
+		 <?php _e( 'This user is a spammer.', 'buddypress' ); ?>
+	</label>
 
-		<form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/capabilities/'; ?>" name="account-capabilities-form" id="account-capabilities-form" class="standard-form" method="post">
+	<div class="submit">
+		<input type="submit" value="<?php _e( 'Save', 'buddypress' ); ?>" id="capabilities-submit" name="capabilities-submit" />
+	</div>
 
-			<?php do_action( 'bp_members_capabilities_account_before_submit' ); ?>
+	<?php do_action( 'bp_members_capabilities_account_after_submit' ); ?>
 
-			<label>
-				<input type="checkbox" name="user-spammer" id="user-spammer" value="1" <?php checked( bp_is_user_spammer( bp_displayed_user_id() ) ); ?> />
-				 <?php _e( 'This user is a spammer.', 'buddypress' ); ?>
-			</label>
+	<?php wp_nonce_field( 'capabilities' ); ?>
 
-			<div class="submit">
-				<input type="submit" value="<?php _e( 'Save', 'buddypress' ); ?>" id="capabilities-submit" name="capabilities-submit" />
-			</div>
+</form>
 
-			<?php do_action( 'bp_members_capabilities_account_after_submit' ); ?>
-
-			<?php wp_nonce_field( 'capabilities' ); ?>
-
-		</form>
-
-		<?php do_action( 'bp_after_member_body' ); ?>
-
-	</div><!-- #item-body -->
-
-	<?php do_action( 'bp_after_member_settings_template' ); ?>
-
-</div><!-- #buddypress -->
+<?php do_action( 'bp_after_member_settings_template' ); ?>
diff --git a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php
index 386d53f2a520f5ea6d3b9f56a95041961c0f45b5..4503a7be09e9e2af6995228b5163d54e95253263 100644
--- a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php
+++ b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php
@@ -1,48 +1,36 @@
-<div id="buddypress">
+<?php do_action( 'bp_before_member_settings_template' ); ?>
 
-	<?php do_action( 'bp_before_member_settings_template' ); ?>
+<div id="message" class="info">
 
-	<div id="item-body" role="main">
+	<?php if ( bp_is_my_profile() ) : ?>
 
-		<?php do_action( 'bp_before_member_body' ); ?>
+		<p><?php _e( 'Deleting your account will delete all of the content you have created. It will be completely irrecoverable.', 'buddypress' ); ?></p>
 
-		<div id="message" class="info">
+	<?php else : ?>
 
-			<?php if ( bp_is_my_profile() ) : ?>
+		<p><?php _e( 'Deleting this account will delete all of the content it has created. It will be completely irrecoverable.', 'buddypress' ); ?></p>
 
-				<p><?php _e( 'Deleting your account will delete all of the content you have created. It will be completely irrecoverable.', 'buddypress' ); ?></p>
+	<?php endif; ?>
 
-			<?php else : ?>
+</div>
 
-				<p><?php _e( 'Deleting this account will delete all of the content it has created. It will be completely irrecoverable.', 'buddypress' ); ?></p>
+<form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/delete-account'; ?>" name="account-delete-form" id="account-delete-form" class="standard-form" method="post">
 
-			<?php endif; ?>
+	<?php do_action( 'bp_members_delete_account_before_submit' ); ?>
 
-		</div>
+	<label>
+		<input type="checkbox" name="delete-account-understand" id="delete-account-understand" value="1" onclick="if(this.checked) { document.getElementById('delete-account-button').disabled = ''; } else { document.getElementById('delete-account-button').disabled = 'disabled'; }" />
+		 <?php _e( 'I understand the consequences.', 'buddypress' ); ?>
+	</label>
 
-		<form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/delete-account'; ?>" name="account-delete-form" id="account-delete-form" class="standard-form" method="post">
+	<div class="submit">
+		<input type="submit" disabled="disabled" value="<?php _e( 'Delete Account', 'buddypress' ); ?>" id="delete-account-button" name="delete-account-button" />
+	</div>
 
-			<?php do_action( 'bp_members_delete_account_before_submit' ); ?>
+	<?php do_action( 'bp_members_delete_account_after_submit' ); ?>
 
-			<label>
-				<input type="checkbox" name="delete-account-understand" id="delete-account-understand" value="1" onclick="if(this.checked) { document.getElementById('delete-account-button').disabled = ''; } else { document.getElementById('delete-account-button').disabled = 'disabled'; }" />
-				 <?php _e( 'I understand the consequences.', 'buddypress' ); ?>
-			</label>
+	<?php wp_nonce_field( 'delete-account' ); ?>
 
-			<div class="submit">
-				<input type="submit" disabled="disabled" value="<?php _e( 'Delete Account', 'buddypress' ); ?>" id="delete-account-button" name="delete-account-button" />
-			</div>
+</form>
 
-			<?php do_action( 'bp_members_delete_account_after_submit' ); ?>
-
-			<?php wp_nonce_field( 'delete-account' ); ?>
-
-		</form>
-
-		<?php do_action( 'bp_after_member_body' ); ?>
-
-	</div><!-- #item-body -->
-
-	<?php do_action( 'bp_after_member_settings_template' ); ?>
-
-</div><!-- #buddypress -->
\ No newline at end of file
+<?php do_action( 'bp_after_member_settings_template' ); ?>
diff --git a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/settings/general.php b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/settings/general.php
index 5587889c1d24cb3dfc3f06ef92b17a142e690b66..ecaf9447034f0e2fa5eeac98c13099332965d1fd 100644
--- a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/settings/general.php
+++ b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/settings/general.php
@@ -1,45 +1,31 @@
-<div id="buddypress">
+<?php do_action( 'bp_before_member_settings_template' ); ?>
 
-	<?php do_action( 'bp_before_member_settings_template' ); ?>
+<form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/general'; ?>" method="post" class="standard-form" id="settings-form">
 
-	<div id="item-body" role="main">
+	<?php if ( !is_super_admin() ) : ?>
 
-		<?php do_action( 'bp_before_member_body' ); ?>
+		<label for="pwd"><?php _e( 'Current Password <span>(required to update email or change current password)</span>', 'buddypress' ); ?></label>
+		<input type="password" name="pwd" id="pwd" size="16" value="" class="settings-input small" /> &nbsp;<a href="<?php echo wp_lostpassword_url(); ?>" title="<?php _e( 'Password Lost and Found', 'buddypress' ); ?>"><?php _e( 'Lost your password?', 'buddypress' ); ?></a>
 
-		<?php do_action( 'bp_template_content' ); ?>
+	<?php endif; ?>
 
-		<form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/general'; ?>" method="post" class="standard-form" id="settings-form">
+	<label for="email"><?php _e( 'Account Email', 'buddypress' ); ?></label>
+	<input type="text" name="email" id="email" value="<?php echo bp_get_displayed_user_email(); ?>" class="settings-input" />
 
-			<?php if ( !is_super_admin() ) : ?>
+	<label for="pass1"><?php _e( 'Change Password <span>(leave blank for no change)</span>', 'buddypress' ); ?></label>
+	<input type="password" name="pass1" id="pass1" size="16" value="" class="settings-input small" /> &nbsp;<?php _e( 'New Password', 'buddypress' ); ?><br />
+	<input type="password" name="pass2" id="pass2" size="16" value="" class="settings-input small" /> &nbsp;<?php _e( 'Repeat New Password', 'buddypress' ); ?>
 
-				<label for="pwd"><?php _e( 'Current Password <span>(required to update email or change current password)</span>', 'buddypress' ); ?></label>
-				<input type="password" name="pwd" id="pwd" size="16" value="" class="settings-input small" /> &nbsp;<a href="<?php echo site_url( add_query_arg( array( 'action' => 'lostpassword' ), 'wp-login.php' ), 'login' ); ?>" title="<?php _e( 'Password Lost and Found', 'buddypress' ); ?>"><?php _e( 'Lost your password?', 'buddypress' ); ?></a>
+	<?php do_action( 'bp_core_general_settings_before_submit' ); ?>
 
-			<?php endif; ?>
+	<div class="submit">
+		<input type="submit" name="submit" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" id="submit" class="auto" />
+	</div>
 
-			<label for="email"><?php _e( 'Account Email', 'buddypress' ); ?></label>
-			<input type="text" name="email" id="email" value="<?php echo bp_get_displayed_user_email(); ?>" class="settings-input" />
+	<?php do_action( 'bp_core_general_settings_after_submit' ); ?>
 
-			<label for="pass1"><?php _e( 'Change Password <span>(leave blank for no change)</span>', 'buddypress' ); ?></label>
-			<input type="password" name="pass1" id="pass1" size="16" value="" class="settings-input small" /> &nbsp;<?php _e( 'New Password', 'buddypress' ); ?><br />
-			<input type="password" name="pass2" id="pass2" size="16" value="" class="settings-input small" /> &nbsp;<?php _e( 'Repeat New Password', 'buddypress' ); ?>
+	<?php wp_nonce_field( 'bp_settings_general' ); ?>
 
-			<?php do_action( 'bp_core_general_settings_before_submit' ); ?>
+</form>
 
-			<div class="submit">
-				<input type="submit" name="submit" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" id="submit" class="auto" />
-			</div>
-
-			<?php do_action( 'bp_core_general_settings_after_submit' ); ?>
-
-			<?php wp_nonce_field( 'bp_settings_general' ); ?>
-
-		</form>
-
-		<?php do_action( 'bp_after_member_body' ); ?>
-
-	</div><!-- #item-body -->
-
-	<?php do_action( 'bp_after_member_settings_template' ); ?>
-
-</div><!-- #buddypress -->
\ No newline at end of file
+<?php do_action( 'bp_after_member_settings_template' ); ?>
diff --git a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/settings/notifications.php b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/settings/notifications.php
index dc30170423e59298ce0d3d0c18c632c54e7063b8..53a496d1e6fe7490fe3069e4f475b4beba802bcd 100644
--- a/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/settings/notifications.php
+++ b/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/settings/notifications.php
@@ -1,34 +1,20 @@
-<div id="buddypress">
+<?php do_action( 'bp_before_member_settings_template' ); ?>
 
-	<?php do_action( 'bp_before_member_settings_template' ); ?>
+<form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/notifications'; ?>" method="post" class="standard-form" id="settings-form">
+	<p><?php _e( 'Send a notification by email when:', 'buddypress' ); ?></p>
 
-	<div id="item-body" role="main">
+	<?php do_action( 'bp_notification_settings' ); ?>
 
-		<?php do_action( 'bp_before_member_body' ); ?>
+	<?php do_action( 'bp_members_notification_settings_before_submit' ); ?>
 
-		<?php do_action( 'bp_template_content' ); ?>
+	<div class="submit">
+		<input type="submit" name="submit" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" id="submit" class="auto" />
+	</div>
 
-		<form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/notifications'; ?>" method="post" class="standard-form" id="settings-form">
-			<p><?php _e( 'Send a notification by email when:', 'buddypress' ); ?></p>
+	<?php do_action( 'bp_members_notification_settings_after_submit' ); ?>
 
-			<?php do_action( 'bp_notification_settings' ); ?>
+	<?php wp_nonce_field('bp_settings_notifications' ); ?>
 
-			<?php do_action( 'bp_members_notification_settings_before_submit' ); ?>
+</form>
 
-			<div class="submit">
-				<input type="submit" name="submit" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" id="submit" class="auto" />
-			</div>
-
-			<?php do_action( 'bp_members_notification_settings_after_submit' ); ?>
-
-			<?php wp_nonce_field('bp_settings_notifications' ); ?>
-
-		</form>
-
-		<?php do_action( 'bp_after_member_body' ); ?>
-
-	</div><!-- #item-body -->
-
-	<?php do_action( 'bp_after_member_settings_template' ); ?>
-
-</div><!-- #buddypress -->
\ No newline at end of file
+<?php do_action( 'bp_after_member_settings_template' ); ?>
diff --git a/wp-content/plugins/buddypress/bp-templates/bp-legacy/css/buddypress-rtl.css b/wp-content/plugins/buddypress/bp-templates/bp-legacy/css/buddypress-rtl.css
index 9ffb82b327ce5c6c9c03951b4e399f9652326b2c..d5ba9af11043cf0fe21ce79252523fcf5d9d3f42 100644
--- a/wp-content/plugins/buddypress/bp-templates/bp-legacy/css/buddypress-rtl.css
+++ b/wp-content/plugins/buddypress/bp-templates/bp-legacy/css/buddypress-rtl.css
@@ -1,39 +1,38 @@
 /*--------------------------------------------------------------
-Hello, this is the BuddyPress Legacy (RTL) stylesheet.
+Hello, this is the BuddyPress Legacy stylesheet.
 
 ----------------------------------------------------------------
 >>> TABLE OF CONTENTS:
 ----------------------------------------------------------------
-4.0 - Navigation
-	4.1 - Pagination
-5.0 - WordPress
-	5.1 - Alignments
-	5.2 - Comments
-	5.3 - Gallery
-	5.4 - Images
-	5.5 - Posts
-6.0 - BuddyPress
-	6.1 - Activity
-		6.1.1 - Activity Listing
-		6.1.2 - Activity Comments
-	6.2 - Toolbar
-	6.3 - Directories - Members, Groups, Blogs, Forums
-	6.4 - Error / Success Messages
-	6.5 - Forms
-	6.6 - Ajax Loading
-	6.7 - Topics and Tables - Forums and General
-	6.8 - Headers, Lists and Tabs - Activity, Groups, Blogs, Forums
-	6.9 - Private Messaging Threads
-	6.10 - Extended Profiles
-	6.11 - Widgets
-7.0 - Media Queries
-	7.1 - Smartphones Landscape
-	7.2 - Smartphones Portrait
-	7.3 - Smartphones - smaller screen sizes
+1.0 - Navigation
+	1.1 - Pagination
+2.0 - WordPress
+	2.1 - Images
+3.0 - BuddyPress
+	3.1 - Activity
+		3.1.1 - Activity Listing
+		3.1.2 - Activity Comments
+	3.2 - Toolbar
+	3.3 - Directories - Members, Groups, Blogs, Forums
+	3.4 - Error / Success Messages
+	3.5 - Forms
+	3.6 - Ajax Loading
+	3.7 - Topics and Tables - Forums and General
+	3.8 - Headers, Lists and Tabs - Activity, Groups, Blogs, Forums
+	3.9 - Private Messaging Threads
+	3.10 - Extended Profiles
+	3.11 - Widgets
+4.0 - Media Queries
+	4.1 - Smartphones Landscape
+	4.2 - Smartphones Portrait
+	4.3 - Smartphones - smaller screen sizes
 --------------------------------------------------------------*/
 
 /*--------------------------------------------------------------
-4.1 - Pagination
+1 - Navigation
+--------------------------------------------------------------*/
+/*--------------------------------------------------------------
+1.1 - Pagination
 --------------------------------------------------------------*/
 #buddypress div.pagination {
 	background: transparent;
@@ -72,9 +71,11 @@ Hello, this is the BuddyPress Legacy (RTL) stylesheet.
 #buddypress .paged #nav-above {
 	display: block;
 }
-
 /*--------------------------------------------------------------
-5.4 - Images
+2 - WordPress
+--------------------------------------------------------------*/
+/*--------------------------------------------------------------
+2.1 - Images
 --------------------------------------------------------------*/
 #buddypress img.wp-smiley {
 	border: none !important;
@@ -85,10 +86,10 @@ Hello, this is the BuddyPress Legacy (RTL) stylesheet.
 }
 
 /*--------------------------------------------------------------
-6.0 - BuddyPress
+3.0 - BuddyPress
 --------------------------------------------------------------*/
 /*--------------------------------------------------------------
-6.1 - Activity
+3.1 - Activity
 --------------------------------------------------------------*/
 #buddypress #activity-stream {
 	margin-top: -5px;
@@ -111,7 +112,7 @@ Hello, this is the BuddyPress Legacy (RTL) stylesheet.
 }
 #buddypress form#whats-new-form #whats-new-content {
 	margin-right: 55px;
-	padding: 0 20px 20px 0;
+	padding: 0 0 20px 20px;
 }
 #buddypress form#whats-new-form p.activity-greeting {
 	line-height: 0.5em;
@@ -120,10 +121,6 @@ Hello, this is the BuddyPress Legacy (RTL) stylesheet.
 }
 #buddypress form#whats-new-form textarea {
 	background: #fff;
-	border: 1px inset #ccc;
-	-moz-border-radius: 3px;
-	-webkit-border-radius: 3px;
-	border-radius: 3px;
 	color: #555;
 	font-family: inherit;
 	font-size: 90%;
@@ -152,13 +149,10 @@ body.no-js #buddypress #whats-new-options {
 #buddypress #whats-new:focus {
 	border-color: rgba(31, 179, 221, 0.9) !important;
 	outline-color: rgba(31, 179, 221, 0.9);
-	box-shadow: 0 0 7px         rgba(31, 179, 221, 0.7);
-	-moz-box-shadow: 0 0 7px    rgba(31, 179, 221, 0.7);
-	-webkit-box-shadow: 0 0 7px rgba(31, 179, 221, 0.7);
 }
 
 /*--------------------------------------------------------------
-6.1.1 - Activity Listing
+3.1.1 - Activity Listing
 --------------------------------------------------------------*/
 #buddypress ul.activity-list li {
 	overflow: hidden;
@@ -269,7 +263,7 @@ body.activity-permalink #buddypress .activity-list li .activity-header > p {
 }
 #buddypress .activity-list li.new_forum_post .activity-content .activity-inner,
 #buddypress .activity-list li.new_forum_topic .activity-content .activity-inner {
-	border-left: 2px solid #EAEAEA;
+	border-right: 2px solid #EAEAEA;
 	margin-right: 5px;
 	padding-right: 10px;
 }
@@ -309,7 +303,7 @@ body.activity-permalink #buddypress .activity-content blockquote {
 
 
 /*--------------------------------------------------------------
-6.1.2 - Activity Comments
+3.1.2 - Activity Comments
 --------------------------------------------------------------*/
 #buddypress div.activity-meta {
 	margin: 18px 0 0;
@@ -318,7 +312,6 @@ body.activity-permalink #buddypress div.activity-meta {
 	margin-bottom: 6px;
 }
 #buddypress div.activity-meta a {
-	font: normal 11px/20px Arial, Tahoma, Verdana, sans-serif;
 	padding: 4px 8px;
 }
 #buddypress a.activity-time-since {
@@ -338,7 +331,6 @@ body.activity-permalink #buddypress div.activity-meta {
 #buddypress a.bp-primary-action span,
 #buddypress #reply-title small a span {
 	background: #999;
-	border-radius: 3px;
 	color: #fff;
 	font-size: 90%;
 	margin-right: 2px;
@@ -443,7 +435,6 @@ body.activity-permalink #buddypress div.activity-comments div.acomment-content {
 #buddypress div.activity-comments form .ac-textarea {
 	background: #fff;
 	border: 1px inset #ccc;
-	border-radius: 3px;
 	margin-bottom: 10px;
 	padding: 8px;
 }
@@ -489,7 +480,7 @@ body.activity-permalink #buddypress div.activity-comments div.acomment-content {
 }
 
 /*--------------------------------------------------------------
-6.3 - Directories - Members, Groups, Blogs, Forums
+3.3 - Directories - Members, Groups, Blogs, Forums
 --------------------------------------------------------------*/
 #buddypress div.dir-search {
 	float: left;
@@ -505,7 +496,7 @@ body.activity-permalink #buddypress div.activity-comments div.acomment-content {
 }
 
 /*--------------------------------------------------------------
-6.4 - Errors / Success Messages
+3.4 - Errors / Success Messages
 --------------------------------------------------------------*/
 #buddypress div#message {
 	margin: 0 0 15px;
@@ -523,22 +514,19 @@ body.activity-permalink #buddypress div.activity-comments div.acomment-content {
 	padding: 10px 15px;
 }
 #buddypress div#message.error p {
-	background-color: #db1717;
-	border-color: #a71a1a;
+	background-color: #ffa;
+	border: 1px solid #960;
 	clear: right;
-	color: #fff;
+	color: #960;
 }
 #buddypress div#message.updated p {
-	background-color: #8ff57a;
-	border-color: #80cf70;
-	color: #1a6a00;
+	background-color: #efc;
+	border: 1px solid #591;
+	color: #591;
 }
 #buddypress .standard-form#signup_form div div.error {
-	background: #e41717;
-	-moz-border-radius: 3px;
-	-webkit-border-radius: 3px;
-	border-radius: 3px;
-	color: #fff;
+	background: #faa;
+	color: #a00;
 	margin: 0 0 10px 0;
 	padding: 6px;
 	width: 90%;
@@ -557,7 +545,7 @@ body.activity-permalink #buddypress div.activity-comments div.acomment-content {
 	font-weight: bold;
 }
 #sitewide-notice #message {
-	left: 2%;
+	right: 2%;
 	position: fixed;
 	top: 1em;
 	width: 96%;
@@ -572,15 +560,31 @@ body.activity-permalink #buddypress div.activity-comments div.acomment-content {
 }
 
 /*--------------------------------------------------------------
-6.5 - Forms
+3.5 - Forms
 --------------------------------------------------------------*/
 #buddypress .standard-form textarea,
 #buddypress .standard-form input[type=text],
+#buddypress .standard-form input[type=text],
+#buddypress .standard-form input[type=color],
+#buddypress .standard-form input[type=date],
+#buddypress .standard-form input[type=datetime],
+#buddypress .standard-form input[type=datetime-local],
+#buddypress .standard-form input[type=email],
+#buddypress .standard-form input[type=month],
+#buddypress .standard-form input[type=number],
+#buddypress .standard-form input[type=range],
+#buddypress .standard-form input[type=search],
+#buddypress .standard-form input[type=tel],
+#buddypress .standard-form input[type=time],
+#buddypress .standard-form input[type=url],
+#buddypress .standard-form input[type=week],
 #buddypress .standard-form select,
 #buddypress .standard-form input[type=password],
+#buddypress .dir-search input[type=search],
 #buddypress .dir-search input[type=text] {
-	border: 1px inset #ccc;
-	border-radius: 3px;
+	border: 1px solid #ccc;
+	background: #fafafa;
+	border-radius: 0;
 	color: #888;
 	font: inherit;
 	font-size: 100%;
@@ -710,25 +714,14 @@ body.activity-permalink #buddypress div.activity-comments div.acomment-content {
 #buddypress .comment-reply-link,
 a.bp-title-button {
 	background: #fff; /* Old browsers */
-	background: -moz-linear-gradient(top, #ffffff 0%, #ededed 100%); /* FF3.6+ */
-	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#ededed)); /* Chrome,Safari4+ */
-	background: -webkit-linear-gradient(top, #ffffff 0%,#ededed 100%); /* Chrome10+,Safari5.1+ */
-	background: -o-linear-gradient(top, #ffffff 0%,#ededed 100%); /* Opera11.10+ */
-	background: -ms-linear-gradient(top, #ffffff 0%,#ededed 100%); /* IE10+ */
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
-	background: linear-gradient(top, #ffffff 0%,#ededed 100%); /* W3C */
 	border: 1px solid #ccc;
-	-moz-border-radius: 3px;
-	-webkit-border-radius: 3px;
-	border-radius: 3px;
 	color: #777;
+	font-size: .8rem;
 	cursor: pointer;
-	font: normal 12px/20px Arial, Tahoma, Verdana, sans-serif;
 	outline: none;
 	padding: 4px 10px;
 	text-align: center;
 	text-decoration: none;
-	line-height: 14px;
 }
 #buddypress button:hover,
 #buddypress a.button:hover,
@@ -741,30 +734,45 @@ a.bp-title-button {
 #buddypress div.generic-button a:hover,
 #buddypress .comment-reply-link:hover {
 	background: #ededed;
-	background: -moz-linear-gradient(top, #ffffff 0%, #e0e0e0 100%); /* FF3.6+ */
-	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#e0e0e0)); /* Chrome,Safari4+ */
-	background: -webkit-linear-gradient(top, #ffffff 0%,#e0e0e0 100%); /* Chrome10+,Safari5.1+ */
-	background: -o-linear-gradient(top, #ffffff 0%,#e0e0e0 100%); /* Opera11.10+ */
-	background: -ms-linear-gradient(top, #ffffff 0%,#e0e0e0 100%); /* IE10+ */
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e0e0e0',GradientType=0 ); /* IE6-9 */
-	background: linear-gradient(top, #ffffff 0%,#e0e0e0 100%); /* W3C */
 	border: 1px solid #bbb;
 	color: #555;
 	outline: none;
 	text-decoration: none;
 }
 
+#buddypress form.standard-form .right-menu {
+	float: right;
+}
+
+#buddypress form.standard-form .right-menu #invite-list ul{
+	margin: 1%;
+	list-style: none;
+}
+
+#buddypress form.standard-form .right-menu #invite-list ul li {
+	margin: 0 1% 0 0;
+}
+
+#buddypress form.standard-form .main-column {
+	margin-right: 190px;
+}
+
+#buddypress form.standard-form .main-column ul#friend-list {
+	clear:none;
+}
+
+#buddypress form.standard-form .main-column ul#friend-list h4 {
+	clear:none;
+}
+
 /*--------------------------------------------------------------
-6.6 - Ajax Loading
+3.6 - Ajax Loading
 --------------------------------------------------------------*/
 #buddypress a.loading,
 #buddypress input.loading {
 	-webkit-animation: loader-pulsate .5s infinite ease-in-out alternate;
 	-moz-animation: loader-pulsate .5s infinite ease-in-out alternate;
 	border-color: #aaa;
-	-moz-box-shadow: 0 0 6px #ccc;
-	-webkit-box-shadow: 0 0 6px #ccc;
-	box-shadow: 0 0 6px #ccc;
 }
 @-webkit-keyframes loader-pulsate {
 	from {
@@ -819,19 +827,12 @@ a.bp-title-button {
 #buddypress button.disabled:hover,
 #buddypress div.pending a:hover,
 #buddypress a.disabled:hover {
-	background: -moz-linear-gradient(top, #ffffff 0%, #ededed 100%); /* FF3.6+ */
-	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#ededed)); /* Chrome,Safari4+ */
-	background: -webkit-linear-gradient(top, #ffffff 0%,#ededed 100%); /* Chrome10+,Safari5.1+ */
-	background: -o-linear-gradient(top, #ffffff 0%,#ededed 100%); /* Opera11.10+ */
-	background: -ms-linear-gradient(top, #ffffff 0%,#ededed 100%); /* IE10+ */
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
-	background: linear-gradient(top, #ffffff 0%,#ededed 100%); /* W3C */
-    border-color: #eee;
+	border-color: #eee;
     color: #bbb;
 }
 
 /*--------------------------------------------------------------
-6.7 - Forums, Tables and Topics
+3.7 - Forums, Tables and Topics
 --------------------------------------------------------------*/
 #buddypress ul#topic-post-list {
 	margin: 0;
@@ -859,7 +860,7 @@ a.bp-title-button {
 	font-size: 80%;
 	position: absolute;
 	top: 15px;
-	right: 25px;
+	left: 25px;
 }
 #buddypress div#topic-meta {
 	margin: 0;
@@ -867,7 +868,7 @@ a.bp-title-button {
 	position: relative;
 }
 #buddypress div#topic-meta div.admin-links {
-	right: 19px;
+	left: 19px;
 	top: -36px;
 }
 #buddypress div#topic-meta h3 {
@@ -907,7 +908,7 @@ a.bp-title-button {
 	vertical-align: middle;
 }
 #buddypress table tr td.label {
-	border-right: 1px solid #eaeaea;
+	border-left: 1px solid #eaeaea;
 	font-weight: bold;
 	width: 25%;
 }
@@ -1011,7 +1012,7 @@ a.bp-title-button {
 }
 
 /*-------------------------------------------------------------------------
-6.8 - Headers, Lists and Tabs - Activity, Groups, Blogs, Forums, Profiles
+3.8 - Headers, Lists and Tabs - Activity, Groups, Blogs, Forums, Profiles
 -------------------------------------------------------------------------*/
 #buddypress .item-body {
 	margin: 20px 0;
@@ -1030,20 +1031,10 @@ a.bp-title-button {
 }
 #buddypress div#message p,
 #sitewide-notice p {
-	border: 1px solid #e1ca82;
-	-moz-border-radius: 3px;
-	-webkit-border-radius: 3px;
-	border-radius: 3px;
 	font-weight: normal;
 	margin-top: 3px;
 	text-decoration: none;
-	background: #ffeaa6;
-	background-image: -webkit-linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
-	background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255, 255, 255, .5)), color-stop(100%,rgba(255, 255, 255, 0))); /* Chrome,Safari4+ */
-	background-image: -moz-linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
-	background-image: -ms-linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
-	background-image: -o-linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
-	background-image: linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
+	background: #ffff00;
 }
 #buddypress div#item-header {
 	overflow: hidden;
@@ -1076,9 +1067,6 @@ a.bp-title-button {
 }
 #buddypress div#item-header h2 span.highlight span {
 	background: #a1dcfa;
-	-moz-border-radius: 3px;
-	-webkit-border-radius: 3px;
-	border-radius: 3px;
 	color: #fff;
 	cursor: pointer;
 	font-weight: bold;
@@ -1086,7 +1074,7 @@ a.bp-title-button {
 	margin-bottom: 2px;
 	padding: 1px 4px;
 	position: relative;
-	right: -2px;
+	left: -2px;
 	top: -2px;
 	vertical-align: middle;
 }
@@ -1179,7 +1167,7 @@ body.activity-permalink #buddypress ul.item-list li.activity-item {
 #buddypress ul.item-list li div.action {
 	position: absolute;
 	top: 15px;
-	right: 0;
+	left: 0;
 	text-align: left;
 }
 #buddypress ul.item-list li div.meta {
@@ -1274,7 +1262,7 @@ body.activity-permalink #buddypress ul.item-list li.activity-item {
 
 
 /*--------------------------------------------------------------
-6.9 - Private Messaging Threads
+3.9 - Private Messaging Threads
 --------------------------------------------------------------*/
 #buddypress table#message-threads tr.unread td {
 	background: #fff9db;
@@ -1285,7 +1273,6 @@ body.activity-permalink #buddypress ul.item-list li.activity-item {
 #buddypress li span.unread-count,
 #buddypress tr.unread span.unread-count {
 	background: #dd0000;
-	border-radius: 3px;
 	color: #fff;
 	font-weight: bold;
 	padding: 2px 8px;
@@ -1313,7 +1300,7 @@ body.activity-permalink #buddypress ul.item-list li.activity-item {
 }
 #buddypress div#message-thread img.avatar {
 	float: right;
-	margin: 0 0 0 10px;
+	margin: 0 10px 0 0;
 	vertical-align: middle;
 }
 #buddypress div#message-thread strong {
@@ -1344,7 +1331,7 @@ body.activity-permalink #buddypress ul.item-list li.activity-item {
 }
 
 /*--------------------------------------------------------------
-6.10 - Extended Profiles
+3.10 - Extended Profiles
 --------------------------------------------------------------*/
 
 #buddypress div.profile h4 {
@@ -1391,7 +1378,7 @@ body.register #buddypress div.page ul {
 }
 
 /*--------------------------------------------------------------
-6.11 - Widgets
+3.11 - Widgets
 --------------------------------------------------------------*/
 
 .widget.buddypress div.item-avatar img.avatar {
@@ -1438,10 +1425,10 @@ body.register #buddypress div.page ul {
 }
 
 /*--------------------------------------------------------------
-7.0 - Media Queries
+4.0 - Media Queries
 --------------------------------------------------------------*/
 /*--------------------------------------------------------------
-7.1 - Smartphones - landscape
+4.1 - Smartphones - landscape
 --------------------------------------------------------------*/
 @media screen and (max-device-width: 480px), screen and (-webkit-min-device-pixel-ratio: 2) {
 	-webkit-text-size-adjust: none;
@@ -1459,10 +1446,17 @@ body.register #buddypress div.page ul {
 	a.bp-title-button {
 		margin-right: 10px;
 	}
+	#buddypress form.standard-form .main-column div.action{
+		position: relative;
+		margin-bottom:1em;
+	}
+	#buddypress form.standard-form .main-column ul#friend-list h4{
+		width:100%;
+	}
 }
 
 /*--------------------------------------------------------------
-7.2 - Smartphones - portrait
+4.2 - Smartphones - portrait
 --------------------------------------------------------------*/
 @media only screen and (max-width: 320px) {
 	#buddypress div.dir-search {
@@ -1482,7 +1476,7 @@ body.register #buddypress div.page ul {
 		margin-right: 70px;
 		position: relative;
 		top: 0;
-		right: 0;
+		left: 0;
 		text-align: right;
 	}
 	#buddypress ul.item-list li div.item-desc {
@@ -1507,7 +1501,7 @@ body.register #buddypress div.page ul {
 }
 
 /*--------------------------------------------------------------
-7.2 - Smartphones - smaller screen sizes
+4.2 - Smartphones - smaller screen sizes
 --------------------------------------------------------------*/
 @media only screen and (max-width: 240px) {
 	#buddypress div.dir-search {
@@ -1533,4 +1527,4 @@ body.register #buddypress div.page ul {
 		float: right;
 		margin: 10px 0 20px;
 	}
-}
\ No newline at end of file
+}
diff --git a/wp-content/plugins/buddypress/bp-templates/bp-legacy/css/buddypress.css b/wp-content/plugins/buddypress/bp-templates/bp-legacy/css/buddypress.css
index 34919c4247161b4cc0a3baf34f5d8965acc559cd..6b41a6ffc4b5275fa28853d056289d6d625d536d 100644
--- a/wp-content/plugins/buddypress/bp-templates/bp-legacy/css/buddypress.css
+++ b/wp-content/plugins/buddypress/bp-templates/bp-legacy/css/buddypress.css
@@ -4,36 +4,35 @@ Hello, this is the BuddyPress Legacy stylesheet.
 ----------------------------------------------------------------
 >>> TABLE OF CONTENTS:
 ----------------------------------------------------------------
-4.0 - Navigation
-	4.1 - Pagination
-5.0 - WordPress
-	5.1 - Alignments
-	5.2 - Comments
-	5.3 - Gallery
-	5.4 - Images
-	5.5 - Posts
-6.0 - BuddyPress
-	6.1 - Activity
-		6.1.1 - Activity Listing
-		6.1.2 - Activity Comments
-	6.2 - Toolbar
-	6.3 - Directories - Members, Groups, Blogs, Forums
-	6.4 - Error / Success Messages
-	6.5 - Forms
-	6.6 - Ajax Loading
-	6.7 - Topics and Tables - Forums and General
-	6.8 - Headers, Lists and Tabs - Activity, Groups, Blogs, Forums
-	6.9 - Private Messaging Threads
-	6.10 - Extended Profiles
-	6.11 - Widgets
-7.0 - Media Queries
-	7.1 - Smartphones Landscape
-	7.2 - Smartphones Portrait
-	7.3 - Smartphones - smaller screen sizes
+1.0 - Navigation
+	1.1 - Pagination
+2.0 - WordPress
+	2.1 - Images
+3.0 - BuddyPress
+	3.1 - Activity
+		3.1.1 - Activity Listing
+		3.1.2 - Activity Comments
+	3.2 - Toolbar
+	3.3 - Directories - Members, Groups, Blogs, Forums
+	3.4 - Error / Success Messages
+	3.5 - Forms
+	3.6 - Ajax Loading
+	3.7 - Topics and Tables - Forums and General
+	3.8 - Headers, Lists and Tabs - Activity, Groups, Blogs, Forums
+	3.9 - Private Messaging Threads
+	3.10 - Extended Profiles
+	3.11 - Widgets
+4.0 - Media Queries
+	4.1 - Smartphones Landscape
+	4.2 - Smartphones Portrait
+	4.3 - Smartphones - smaller screen sizes
 --------------------------------------------------------------*/
 
 /*--------------------------------------------------------------
-4.1 - Pagination
+1 - Navigation
+--------------------------------------------------------------*/
+/*--------------------------------------------------------------
+1.1 - Pagination
 --------------------------------------------------------------*/
 #buddypress div.pagination {
 	background: transparent;
@@ -72,9 +71,11 @@ Hello, this is the BuddyPress Legacy stylesheet.
 #buddypress .paged #nav-above {
 	display: block;
 }
-
 /*--------------------------------------------------------------
-5.4 - Images
+2 - WordPress
+--------------------------------------------------------------*/
+/*--------------------------------------------------------------
+2.1 - Images
 --------------------------------------------------------------*/
 #buddypress img.wp-smiley {
 	border: none !important;
@@ -85,10 +86,10 @@ Hello, this is the BuddyPress Legacy stylesheet.
 }
 
 /*--------------------------------------------------------------
-6.0 - BuddyPress
+3.0 - BuddyPress
 --------------------------------------------------------------*/
 /*--------------------------------------------------------------
-6.1 - Activity
+3.1 - Activity
 --------------------------------------------------------------*/
 #buddypress #activity-stream {
 	margin-top: -5px;
@@ -120,10 +121,6 @@ Hello, this is the BuddyPress Legacy stylesheet.
 }
 #buddypress form#whats-new-form textarea {
 	background: #fff;
-	border: 1px inset #ccc;
-	-moz-border-radius: 3px;
-	-webkit-border-radius: 3px;
-	border-radius: 3px;
 	color: #555;
 	font-family: inherit;
 	font-size: 90%;
@@ -152,13 +149,10 @@ body.no-js #buddypress #whats-new-options {
 #buddypress #whats-new:focus {
 	border-color: rgba(31, 179, 221, 0.9) !important;
 	outline-color: rgba(31, 179, 221, 0.9);
-	box-shadow: 0 0 7px         rgba(31, 179, 221, 0.7);
-	-moz-box-shadow: 0 0 7px    rgba(31, 179, 221, 0.7);
-	-webkit-box-shadow: 0 0 7px rgba(31, 179, 221, 0.7);
 }
 
 /*--------------------------------------------------------------
-6.1.1 - Activity Listing
+3.1.1 - Activity Listing
 --------------------------------------------------------------*/
 #buddypress ul.activity-list li {
 	overflow: hidden;
@@ -309,7 +303,7 @@ body.activity-permalink #buddypress .activity-content blockquote {
 
 
 /*--------------------------------------------------------------
-6.1.2 - Activity Comments
+3.1.2 - Activity Comments
 --------------------------------------------------------------*/
 #buddypress div.activity-meta {
 	margin: 18px 0 0;
@@ -318,7 +312,6 @@ body.activity-permalink #buddypress div.activity-meta {
 	margin-bottom: 6px;
 }
 #buddypress div.activity-meta a {
-	font: normal 11px/20px Arial, Tahoma, Verdana, sans-serif;
 	padding: 4px 8px;
 }
 #buddypress a.activity-time-since {
@@ -338,7 +331,6 @@ body.activity-permalink #buddypress div.activity-meta {
 #buddypress a.bp-primary-action span,
 #buddypress #reply-title small a span {
 	background: #999;
-	border-radius: 3px;
 	color: #fff;
 	font-size: 90%;
 	margin-left: 2px;
@@ -443,7 +435,6 @@ body.activity-permalink #buddypress div.activity-comments div.acomment-content {
 #buddypress div.activity-comments form .ac-textarea {
 	background: #fff;
 	border: 1px inset #ccc;
-	border-radius: 3px;
 	margin-bottom: 10px;
 	padding: 8px;
 }
@@ -489,7 +480,7 @@ body.activity-permalink #buddypress div.activity-comments div.acomment-content {
 }
 
 /*--------------------------------------------------------------
-6.3 - Directories - Members, Groups, Blogs, Forums
+3.3 - Directories - Members, Groups, Blogs, Forums
 --------------------------------------------------------------*/
 #buddypress div.dir-search {
 	float: right;
@@ -505,7 +496,7 @@ body.activity-permalink #buddypress div.activity-comments div.acomment-content {
 }
 
 /*--------------------------------------------------------------
-6.4 - Errors / Success Messages
+3.4 - Errors / Success Messages
 --------------------------------------------------------------*/
 #buddypress div#message {
 	margin: 0 0 15px;
@@ -523,22 +514,19 @@ body.activity-permalink #buddypress div.activity-comments div.acomment-content {
 	padding: 10px 15px;
 }
 #buddypress div#message.error p {
-	background-color: #db1717;
-	border-color: #a71a1a;
+	background-color: #fdc;
+	border: 1px solid #a00;
 	clear: left;
-	color: #fff;
+	color: #800;
 }
 #buddypress div#message.updated p {
-	background-color: #8ff57a;
-	border-color: #80cf70;
-	color: #1a6a00;
+	background-color: #efc;
+	border: 1px solid #591;
+	color: #250;
 }
 #buddypress .standard-form#signup_form div div.error {
-	background: #e41717;
-	-moz-border-radius: 3px;
-	-webkit-border-radius: 3px;
-	border-radius: 3px;
-	color: #fff;
+	background: #faa;
+	color: #a00;
 	margin: 0 0 10px 0;
 	padding: 6px;
 	width: 90%;
@@ -572,15 +560,31 @@ body.activity-permalink #buddypress div.activity-comments div.acomment-content {
 }
 
 /*--------------------------------------------------------------
-6.5 - Forms
+3.5 - Forms
 --------------------------------------------------------------*/
 #buddypress .standard-form textarea,
 #buddypress .standard-form input[type=text],
+#buddypress .standard-form input[type=text],
+#buddypress .standard-form input[type=color],
+#buddypress .standard-form input[type=date],
+#buddypress .standard-form input[type=datetime],
+#buddypress .standard-form input[type=datetime-local],
+#buddypress .standard-form input[type=email],
+#buddypress .standard-form input[type=month],
+#buddypress .standard-form input[type=number],
+#buddypress .standard-form input[type=range],
+#buddypress .standard-form input[type=search],
+#buddypress .standard-form input[type=tel],
+#buddypress .standard-form input[type=time],
+#buddypress .standard-form input[type=url],
+#buddypress .standard-form input[type=week],
 #buddypress .standard-form select,
 #buddypress .standard-form input[type=password],
+#buddypress .dir-search input[type=search],
 #buddypress .dir-search input[type=text] {
-	border: 1px inset #ccc;
-	border-radius: 3px;
+	border: 1px solid #ccc;
+	background: #fafafa;
+	border-radius: 0;
 	color: #888;
 	font: inherit;
 	font-size: 100%;
@@ -710,25 +714,14 @@ body.activity-permalink #buddypress div.activity-comments div.acomment-content {
 #buddypress .comment-reply-link,
 a.bp-title-button {
 	background: #fff; /* Old browsers */
-	background: -moz-linear-gradient(top, #ffffff 0%, #ededed 100%); /* FF3.6+ */
-	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#ededed)); /* Chrome,Safari4+ */
-	background: -webkit-linear-gradient(top, #ffffff 0%,#ededed 100%); /* Chrome10+,Safari5.1+ */
-	background: -o-linear-gradient(top, #ffffff 0%,#ededed 100%); /* Opera11.10+ */
-	background: -ms-linear-gradient(top, #ffffff 0%,#ededed 100%); /* IE10+ */
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
-	background: linear-gradient(top, #ffffff 0%,#ededed 100%); /* W3C */
 	border: 1px solid #ccc;
-	-moz-border-radius: 3px;
-	-webkit-border-radius: 3px;
-	border-radius: 3px;
 	color: #777;
+	font-size: .8rem;
 	cursor: pointer;
-	font: normal 12px/20px Arial, Tahoma, Verdana, sans-serif;
 	outline: none;
 	padding: 4px 10px;
 	text-align: center;
 	text-decoration: none;
-	line-height: 14px;
 }
 #buddypress button:hover,
 #buddypress a.button:hover,
@@ -741,30 +734,45 @@ a.bp-title-button {
 #buddypress div.generic-button a:hover,
 #buddypress .comment-reply-link:hover {
 	background: #ededed;
-	background: -moz-linear-gradient(top, #ffffff 0%, #e0e0e0 100%); /* FF3.6+ */
-	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#e0e0e0)); /* Chrome,Safari4+ */
-	background: -webkit-linear-gradient(top, #ffffff 0%,#e0e0e0 100%); /* Chrome10+,Safari5.1+ */
-	background: -o-linear-gradient(top, #ffffff 0%,#e0e0e0 100%); /* Opera11.10+ */
-	background: -ms-linear-gradient(top, #ffffff 0%,#e0e0e0 100%); /* IE10+ */
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e0e0e0',GradientType=0 ); /* IE6-9 */
-	background: linear-gradient(top, #ffffff 0%,#e0e0e0 100%); /* W3C */
 	border: 1px solid #bbb;
 	color: #555;
 	outline: none;
 	text-decoration: none;
 }
 
+#buddypress form.standard-form .left-menu {
+	float: left;
+}
+
+#buddypress form.standard-form .left-menu #invite-list ul{
+	margin:1%;
+	list-style: none;
+}
+
+#buddypress form.standard-form .left-menu #invite-list ul li {
+	margin:0 0 0 1%;
+}
+
+#buddypress form.standard-form .main-column {
+	margin-left: 190px;
+}
+
+#buddypress form.standard-form .main-column ul#friend-list {
+	clear:none;
+}
+
+#buddypress form.standard-form .main-column ul#friend-list h4 {
+	clear:none;
+}
+
 /*--------------------------------------------------------------
-6.6 - Ajax Loading
+3.6 - Ajax Loading
 --------------------------------------------------------------*/
 #buddypress a.loading,
 #buddypress input.loading {
 	-webkit-animation: loader-pulsate .5s infinite ease-in-out alternate;
 	-moz-animation: loader-pulsate .5s infinite ease-in-out alternate;
 	border-color: #aaa;
-	-moz-box-shadow: 0 0 6px #ccc;
-	-webkit-box-shadow: 0 0 6px #ccc;
-	box-shadow: 0 0 6px #ccc;
 }
 @-webkit-keyframes loader-pulsate {
 	from {
@@ -819,19 +827,12 @@ a.bp-title-button {
 #buddypress button.disabled:hover,
 #buddypress div.pending a:hover,
 #buddypress a.disabled:hover {
-	background: -moz-linear-gradient(top, #ffffff 0%, #ededed 100%); /* FF3.6+ */
-	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#ededed)); /* Chrome,Safari4+ */
-	background: -webkit-linear-gradient(top, #ffffff 0%,#ededed 100%); /* Chrome10+,Safari5.1+ */
-	background: -o-linear-gradient(top, #ffffff 0%,#ededed 100%); /* Opera11.10+ */
-	background: -ms-linear-gradient(top, #ffffff 0%,#ededed 100%); /* IE10+ */
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
-	background: linear-gradient(top, #ffffff 0%,#ededed 100%); /* W3C */
-    border-color: #eee;
+	border-color: #eee;
     color: #bbb;
 }
 
 /*--------------------------------------------------------------
-6.7 - Forums, Tables and Topics
+3.7 - Forums, Tables and Topics
 --------------------------------------------------------------*/
 #buddypress ul#topic-post-list {
 	margin: 0;
@@ -1011,7 +1012,7 @@ a.bp-title-button {
 }
 
 /*-------------------------------------------------------------------------
-6.8 - Headers, Lists and Tabs - Activity, Groups, Blogs, Forums, Profiles
+3.8 - Headers, Lists and Tabs - Activity, Groups, Blogs, Forums, Profiles
 -------------------------------------------------------------------------*/
 #buddypress .item-body {
 	margin: 20px 0;
@@ -1030,20 +1031,13 @@ a.bp-title-button {
 }
 #buddypress div#message p,
 #sitewide-notice p {
-	border: 1px solid #e1ca82;
-	-moz-border-radius: 3px;
-	-webkit-border-radius: 3px;
-	border-radius: 3px;
 	font-weight: normal;
 	margin-top: 3px;
 	text-decoration: none;
-	background: #ffeaa6;
-	background-image: -webkit-linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
-	background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255, 255, 255, .5)), color-stop(100%,rgba(255, 255, 255, 0))); /* Chrome,Safari4+ */
-	background-image: -moz-linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
-	background-image: -ms-linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
-	background-image: -o-linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
-	background-image: linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
+	background-color: #ffd;
+	border: 1px solid #cb2;
+	color: #440;
+	
 }
 #buddypress div#item-header {
 	overflow: hidden;
@@ -1076,9 +1070,6 @@ a.bp-title-button {
 }
 #buddypress div#item-header h2 span.highlight span {
 	background: #a1dcfa;
-	-moz-border-radius: 3px;
-	-webkit-border-radius: 3px;
-	border-radius: 3px;
 	color: #fff;
 	cursor: pointer;
 	font-weight: bold;
@@ -1274,7 +1265,7 @@ body.activity-permalink #buddypress ul.item-list li.activity-item {
 
 
 /*--------------------------------------------------------------
-6.9 - Private Messaging Threads
+3.9 - Private Messaging Threads
 --------------------------------------------------------------*/
 #buddypress table#message-threads tr.unread td {
 	background: #fff9db;
@@ -1285,7 +1276,6 @@ body.activity-permalink #buddypress ul.item-list li.activity-item {
 #buddypress li span.unread-count,
 #buddypress tr.unread span.unread-count {
 	background: #dd0000;
-	border-radius: 3px;
 	color: #fff;
 	font-weight: bold;
 	padding: 2px 8px;
@@ -1344,7 +1334,7 @@ body.activity-permalink #buddypress ul.item-list li.activity-item {
 }
 
 /*--------------------------------------------------------------
-6.10 - Extended Profiles
+3.10 - Extended Profiles
 --------------------------------------------------------------*/
 
 #buddypress div.profile h4 {
@@ -1391,7 +1381,7 @@ body.register #buddypress div.page ul {
 }
 
 /*--------------------------------------------------------------
-6.11 - Widgets
+3.11 - Widgets
 --------------------------------------------------------------*/
 
 .widget.buddypress div.item-avatar img.avatar {
@@ -1438,10 +1428,10 @@ body.register #buddypress div.page ul {
 }
 
 /*--------------------------------------------------------------
-7.0 - Media Queries
+4.0 - Media Queries
 --------------------------------------------------------------*/
 /*--------------------------------------------------------------
-7.1 - Smartphones - landscape
+4.1 - Smartphones - landscape
 --------------------------------------------------------------*/
 @media screen and (max-device-width: 480px), screen and (-webkit-min-device-pixel-ratio: 2) {
 	-webkit-text-size-adjust: none;
@@ -1459,10 +1449,17 @@ body.register #buddypress div.page ul {
 	a.bp-title-button {
 		margin-left: 10px;
 	}
+	#buddypress form.standard-form .main-column div.action{
+		position: relative;
+		margin-bottom:1em;
+	}
+	#buddypress form.standard-form .main-column ul#friend-list h4{
+		width:100%;
+	}
 }
 
 /*--------------------------------------------------------------
-7.2 - Smartphones - portrait
+4.2 - Smartphones - portrait
 --------------------------------------------------------------*/
 @media only screen and (max-width: 320px) {
 	#buddypress div.dir-search {
@@ -1507,7 +1504,7 @@ body.register #buddypress div.page ul {
 }
 
 /*--------------------------------------------------------------
-7.2 - Smartphones - smaller screen sizes
+4.2 - Smartphones - smaller screen sizes
 --------------------------------------------------------------*/
 @media only screen and (max-width: 240px) {
 	#buddypress div.dir-search {
@@ -1525,7 +1522,7 @@ body.register #buddypress div.page ul {
 		height: auto;
 	}
 	#buddypress ul.item-list li div.action,
-	#buddypress li div.item{ 
+	#buddypress li div.item{
 		margin-left: 45px;
 	}
 	h1 a.bp-title-button {
@@ -1533,4 +1530,4 @@ body.register #buddypress div.page ul {
 		float: left;
 		margin: 10px 0 20px;
 	}
-}
\ No newline at end of file
+}
diff --git a/wp-content/plugins/buddypress/bp-templates/bp-legacy/js/buddypress.js b/wp-content/plugins/buddypress/bp-templates/bp-legacy/js/buddypress.js
index 2d5beb02e1e37d19f3bb0ed36baaae9f516f8d6b..11099409f19907298aa6b1dd22ee5c0f1a34e595 100644
--- a/wp-content/plugins/buddypress/bp-templates/bp-legacy/js/buddypress.js
+++ b/wp-content/plugins/buddypress/bp-templates/bp-legacy/js/buddypress.js
@@ -21,24 +21,26 @@ jq(document).ready( function() {
 	bp_init_objects( objects );
 
 	/* @mention Compose Scrolling */
-	if ( jq.query.get('r') && jq('#whats-new').length ) {
+	var $whats_new = jq('#whats-new');
+	if ( jq.query.get('r') && $whats_new.length ) {
 		jq('#whats-new-options').animate({
 			height:'40px'
 		});
 		jq("#whats-new-form textarea").animate({
 			height:'50px'
 		});
-		jq.scrollTo( jq('#whats-new'), 500, {
+		jq.scrollTo( $whats_new, 500, {
 			offset:-125,
 			easing:'easeOutQuad'
 		} );
-		jq('#whats-new').focus();
+		var whats_new_content = $whats_new.val();
+		$whats_new.val('').focus().val(whats_new_content);
 	}
 
 	/**** Activity Posting ********************************************************/
 
 	/* Textarea focus */
-	jq('#whats-new').focus( function(){
+	$whats_new.focus( function(){
 		jq("#whats-new-options").animate({
 			height:'40px'
 		});
@@ -46,12 +48,31 @@ jq(document).ready( function() {
 			height:'50px'
 		});
 		jq("#aw-whats-new-submit").prop("disabled", false);
+		
+		var $whats_new_form = jq("form#whats-new-form");
+		if ( $whats_new_form.hasClass("submitted") ) {
+			$whats_new_form.removeClass("submitted");	
+		}
+	});
+
+	/* On blur, shrink if it's empty */
+	$whats_new.blur( function(){
+		if (!this.value.match(/\S+/)) {
+			this.value = "";
+			jq("#whats-new-options").animate({
+				height:'40px'
+			});
+			jq("form#whats-new-form textarea").animate({
+				height:'20px'
+			});
+			jq("#aw-whats-new-submit").prop("disabled", true);
+		}
 	});
 
 	/* New posts */
 	jq("#aw-whats-new-submit").on( 'click', function() {
 		var button = jq(this);
-		var form = button.parent().parent().parent().parent();
+		var form = button.closest("form#whats-new-form");
 
 		form.children().each( function() {
 			if ( jq.nodeName(this, "textarea") || jq.nodeName(this, "input") )
@@ -62,6 +83,7 @@ jq(document).ready( function() {
 		jq('div.error').remove();
 		button.addClass('loading');
 		button.prop('disabled', true);
+		form.addClass("submitted");
 
 		/* Default POST values */
 		var object = '';
@@ -75,7 +97,7 @@ jq(document).ready( function() {
 
 		jq.post( ajaxurl, {
 			action: 'post_update',
-			'cookie': encodeURIComponent(document.cookie),
+			'cookie': bp_get_cookies(),
 			'_wpnonce_post_update': jq("#_wpnonce_post_update").val(),
 			'content': content,
 			'object': object,
@@ -102,7 +124,7 @@ jq(document).ready( function() {
 				}
 
 				jq("#activity-stream").prepend(response);
-				jq("#activity-stream li:first").addClass('new-update');
+				jq("#activity-stream li:first").addClass('new-update just-posted');
 
 				if ( 0 != jq("#latest-update").length ) {
 					var l = jq("#activity-stream li.new-update .activity-content .activity-inner p").html();
@@ -195,7 +217,7 @@ jq(document).ready( function() {
 
 			jq.post( ajaxurl, {
 				action: 'activity_mark_' + type,
-				'cookie': encodeURIComponent(document.cookie),
+				'cookie': bp_get_cookies(),
 				'id': parent_id
 			},
 			function(response) {
@@ -252,7 +274,7 @@ jq(document).ready( function() {
 
 			jq.post( ajaxurl, {
 				action: 'delete_activity',
-				'cookie': encodeURIComponent(document.cookie),
+				'cookie': bp_get_cookies(),
 				'id': id,
 				'_wpnonce': nonce
 			},
@@ -304,10 +326,17 @@ jq(document).ready( function() {
 
 			var oldest_page = ( jq.cookie('bp-activity-oldestpage') * 1 ) + 1;
 
+			var just_posted = [];
+			
+			jq('.activity-list li.just-posted').each( function(){
+				just_posted.push( jq(this).attr('id').replace( 'activity-','' ) );
+			});
+
 			jq.post( ajaxurl, {
 				action: 'activity_get_older_updates',
-				'cookie': encodeURIComponent(document.cookie),
-				'page': oldest_page
+				'cookie': bp_get_cookies(),
+				'page': oldest_page,
+				'exclude_just_posted': just_posted.join(',')
 			},
 			function(response)
 			{
@@ -422,7 +451,7 @@ jq(document).ready( function() {
 
 			var ajaxdata = {
 				action: 'new_activity_comment',
-				'cookie': encodeURIComponent(document.cookie),
+				'cookie': bp_get_cookies(),
 				'_wpnonce_new_activity_comment': jq("#_wpnonce_new_activity_comment").val(),
 				'comment_id': comment_id,
 				'form_id': form_id[2],
@@ -443,26 +472,34 @@ jq(document).ready( function() {
 				if ( response[0] + response[1] == '-1' ) {
 					form.append( jq( response.substr( 2, response.length ) ).hide().fadeIn( 200 ) );
 				} else {
+					var activity_comments = form.parent();
 					form.fadeOut( 200, function() {
-						if ( 0 == form.parent().children('ul').length ) {
-							if ( form.parent().hasClass('activity-comments') ) {
-								form.parent().prepend('<ul></ul>');
+						if ( 0 == activity_comments.children('ul').length ) {
+							if ( activity_comments.hasClass('activity-comments') ) {
+								activity_comments.prepend('<ul></ul>');
 							} else {
-								form.parent().append('<ul></ul>');
+								activity_comments.append('<ul></ul>');
 							}
 						}
 
 						/* Preceeding whitespace breaks output with jQuery 1.9.0 */
 						var the_comment = jq.trim( response );
 
-						form.parent().children('ul').append( jq( the_comment ).hide().fadeIn( 200 ) );
+						activity_comments.children('ul').append( jq( the_comment ).hide().fadeIn( 200 ) );
 						form.children('textarea').val('');
-						form.parent().parent().addClass('has-comments');
+						activity_comments.parent().addClass('has-comments');
 					} );
 					jq( '#' + form.attr('id') + ' textarea').val('');
 
 					/* Increase the "Reply (X)" button count */
 					jq('#activity-' + form_id[2] + ' a.acomment-reply span').html( Number( jq('#activity-' + form_id[2] + ' a.acomment-reply span').html() ) + 1 );
+
+					// Increment the 'Show all x comments' string, if present
+					var show_all_a = activity_comments.find('.show-all').find('a');
+					if ( show_all_a ) {
+						var new_count = jq('li#activity-' + form_id[2] + ' a.acomment-reply span').html();
+						show_all_a.html( BP_DTheme.show_x_comments.replace( '%d', new_count ) );
+					}
 				}
 
 				jq(target).prop("disabled", false);
@@ -495,7 +532,7 @@ jq(document).ready( function() {
 
 			jq.post( ajaxurl, {
 				action: 'delete_activity_comment',
-				'cookie': encodeURIComponent(document.cookie),
+				'cookie': bp_get_cookies(),
 				'_wpnonce': nonce,
 				'id': comment_id
 			},
@@ -510,12 +547,20 @@ jq(document).ready( function() {
 						if ( !jq(this).is(':hidden') )
 							child_count++;
 					});
-					comment_li.fadeOut(200);
+					comment_li.fadeOut(200, function() {
+						comment_li.remove();
+					});
 
 					/* Decrease the "Reply (X)" button count */
 					var count_span = jq('#' + comment_li.parents('#activity-stream > li').attr('id') + ' a.acomment-reply span');
 					var new_count = count_span.html() - ( 1 + child_count );
 					count_span.html(new_count);
+					
+					// Change the 'Show all x comments' text
+					var show_all_a = comment_li.siblings('.show-all').find('a');
+					if ( show_all_a ) {
+						show_all_a.html( BP_DTheme.show_x_comments.replace( '%d', new_count ) );
+					}
 
 					/* If that was the last comment for the item, remove the has-comments class to clean up the styling */
 					if ( 0 == new_count ) {
@@ -772,7 +817,7 @@ jq(document).ready( function() {
 		jq.post( ajaxurl, {
 			action: 'groups_invite_user',
 			'friend_action': friend_action,
-			'cookie': encodeURIComponent(document.cookie),
+			'cookie': bp_get_cookies(),
 			'_wpnonce': jq("#_wpnonce_invite_uninvite_user").val(),
 			'friend_id': friend_id,
 			'group_id': jq("#group_id").val()
@@ -805,7 +850,7 @@ jq(document).ready( function() {
 		jq.post( ajaxurl, {
 			action: 'groups_invite_user',
 			'friend_action': 'uninvite',
-			'cookie': encodeURIComponent(document.cookie),
+			'cookie': bp_get_cookies(),
 			'_wpnonce': jq("#_wpnonce_invite_uninvite_user").val(),
 			'friend_id': friend_id,
 			'group_id': jq("#group_id").val()
@@ -834,14 +879,29 @@ jq(document).ready( function() {
 
 	jq('.field-visibility-settings-close').on( 'click', function() {
 		var settings_div = jq(this).parent();
+		var vis_setting_text = settings_div.find('input:checked').parent().text();
 
-		jq(settings_div).slideUp( 400, function(){
-			jq(settings_div).siblings('.field-visibility-settings-toggle').fadeIn(800);
-		});
+		settings_div.slideUp( 400, function() {
+			settings_div.siblings('.field-visibility-settings-toggle').fadeIn(800);
+			settings_div.siblings('.field-visibility-settings-toggle').children('.current-visibility-level').html(vis_setting_text);
+		} );
 
 		return false;
 	} );
 
+	jq("#profile-edit-form input:not(:submit), #profile-edit-form textarea, #profile-edit-form select, #signup_form input:not(:submit), #signup_form textarea, #signup_form select").change( function() {
+		var shouldconfirm = true;
+
+		jq('#profile-edit-form input:submit, #signup_form input:submit').on( 'click', function() {
+			shouldconfirm = false;
+		});
+		
+		window.onbeforeunload = function(e) {
+			if ( shouldconfirm ) {
+				return BP_DTheme.unsaved_changes;
+			}
+		};
+	});
 
 	/** Friendship Requests **************************************/
 
@@ -872,7 +932,7 @@ jq(document).ready( function() {
 
 		jq.post( ajaxurl, {
 			action: action,
-			'cookie': encodeURIComponent(document.cookie),
+			'cookie': bp_get_cookies(),
 			'id': id,
 			'_wpnonce': nonce
 		},
@@ -914,7 +974,7 @@ jq(document).ready( function() {
 
 		jq.post( ajaxurl, {
 			action: 'addremove_friend',
-			'cookie': encodeURIComponent(document.cookie),
+			'cookie': bp_get_cookies(),
 			'fid': fid,
 			'_wpnonce': nonce
 		},
@@ -963,7 +1023,7 @@ jq(document).ready( function() {
 
 		jq.post( ajaxurl, {
 			action: 'joinleave_group',
-			'cookie': encodeURIComponent(document.cookie),
+			'cookie': bp_get_cookies(),
 			'gid': gid,
 			'_wpnonce': nonce
 		},
@@ -986,7 +1046,7 @@ jq(document).ready( function() {
 
 	/** Button disabling ************************************************/
 
-	jq('.pending').click(function() {
+	jq('#buddypress').on( 'click', '.pending', function() {
 		return false;
 	});
 
@@ -1020,7 +1080,7 @@ jq(document).ready( function() {
 
 			jq.post( ajaxurl, {
 				action: 'messages_send_reply',
-				'cookie': encodeURIComponent(document.cookie),
+				'cookie': bp_get_cookies(),
 				'_wpnonce': jq("#send_message_nonce").val(),
 
 				'content': jq("#message_content").val(),
@@ -1306,7 +1366,7 @@ function bp_filter_request( object, filter, scope, target, search_terms, page, e
 
 	bp_ajax_request = jq.post( ajaxurl, {
 		action: object + '_filter',
-		'cookie': encodeURIComponent(document.cookie),
+		'cookie': bp_get_cookies(),
 		'object': object,
 		'filter': filter,
 		'search_terms': search_terms,
@@ -1354,7 +1414,7 @@ function bp_activity_request(scope, filter) {
 
 	bp_ajax_request = jq.post( ajaxurl, {
 		action: 'activity_widget_filter',
-		'cookie': encodeURIComponent(document.cookie),
+		'cookie': bp_get_cookies(),
 		'_wpnonce_activity_filter': jq("#_wpnonce_activity_filter").val(),
 		'scope': scope,
 		'filter': filter
@@ -1404,8 +1464,8 @@ function bp_legacy_theme_hide_comments() {
 				jq(this).addClass('hidden');
 				jq(this).toggle();
 
-				if ( !i )
-					jq(this).before( '<li class="show-all"><a href="#' + parent_li.attr('id') + '/show-all/" title="' + BP_DTheme.show_all_comments + '">' + BP_DTheme.show_all + ' ' + comment_count + ' ' + BP_DTheme.comments + '</a></li>' );
+				if ( !i ) 
+					jq(this).before( '<li class="show-all"><a href="#' + parent_li.attr('id') + '/show-all/" title="' + BP_DTheme.show_all_comments + '">' + BP_DTheme.show_x_comments.replace( '%d', comment_count ) + '</a></li>' );
 			}
 		});
 
@@ -1448,6 +1508,31 @@ function clear(container) {
 	return;
 }
 
+/* Returns a querystring of BP cookies (cookies beginning with 'bp-') */
+function bp_get_cookies() {
+	// get all cookies and split into an array
+	var allCookies   = document.cookie.split(";");
+
+	var bpCookies    = {};
+	var cookiePrefix = 'bp-';
+
+	// loop through cookies
+	for (var i = 0; i < allCookies.length; i++) {
+		var cookie    = allCookies[i];
+		var delimiter = cookie.indexOf("=");
+		var name      = unescape( cookie.slice(0, delimiter) ).trim();
+		var value     = unescape( cookie.slice(delimiter + 1) );
+
+		// if BP cookie, store it
+		if ( name.indexOf(cookiePrefix) == 0 ) {
+			bpCookies[name] = value;
+		}
+	}
+
+	// returns BP cookies as querystring
+	return encodeURIComponent( jq.param(bpCookies) );
+}
+
 /* ScrollTo plugin - just inline and minified */
 ;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,e,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
 
diff --git a/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/ajax.php b/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/ajax.php
index 0108313265a1ea89c6ff0f5077b42c0624cd046e..c6bab0183df90a4c69caf8e38e3b22c48af53bc5 100644
--- a/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/ajax.php
+++ b/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/ajax.php
@@ -126,6 +126,12 @@ function bp_dtheme_ajax_querystring( $query_string, $object ) {
 	if ( ! empty( $_POST['page'] ) && '-1' != $_POST['page'] )
 		$qs[] = 'page=' . absint( $_POST['page'] );
 
+	// exludes activity just posted and avoids duplicate ids
+	if ( ! empty( $_POST['exclude_just_posted'] ) ) {
+		$just_posted = wp_parse_id_list( $_POST['exclude_just_posted'] );
+		$qs[] = 'exclude=' . implode( ',', $just_posted );
+	}
+
 	$object_search_text = bp_get_search_default_text( $object );
  	if ( ! empty( $_POST['search_terms'] ) && $object_search_text != $_POST['search_terms'] && 'false' != $_POST['search_terms'] && 'undefined' != $_POST['search_terms'] )
 		$qs[] = 'search_terms=' . $_POST['search_terms'];
@@ -168,19 +174,26 @@ function bp_dtheme_object_template_loader() {
 	if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
 		return;
 
+	// Bail if no object passed
+	if ( empty( $_POST['object'] ) )
+		return;
+
+	// Sanitize the object
+	$object = sanitize_title( $_POST['object'] );
+
+	// Bail if object is not an active component
+	if ( ! bp_is_active( $object ) )
+		return;
+
  	/**
 	 * AJAX requests happen too early to be seen by bp_update_is_directory()
 	 * so we do it manually here to ensure templates load with the correct
 	 * context. Without this check, templates will load the 'single' version
 	 * of themselves rather than the directory version.
 	 */
-
 	if ( ! bp_current_action() )
 		bp_update_is_directory( true, bp_current_component() );
 
-	// Sanitize the post object
-	$object = esc_attr( $_POST['object'] );
-
 	// Locate the object template
 	locate_template( array( "$object/$object-loop.php" ), true );
 	exit;
@@ -536,7 +549,6 @@ function bp_dtheme_get_single_activity_content() {
 /**
  * Invites a friend to join a group via a POST request.
  *
- * @return unknown
  * @since BuddyPress (1.2)
  * @todo Audit return types
  */
diff --git a/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/css/default.css b/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/css/default.css
index c347fca18d109675ed97d68c5e2d6760e1ed3187..88da968cb9b8fa722449a6e41b608bb1e8e5d71b 100644
--- a/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/css/default.css
+++ b/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/css/default.css
@@ -1573,8 +1573,22 @@ ul.button-nav li.current a {
 --------------------------------------------------------------*/
 .standard-form textarea,
 .standard-form input[type=text],
+.standard-form input[type=color],
+.standard-form input[type=date],
+.standard-form input[type=datetime],
+.standard-form input[type=datetime-local],
+.standard-form input[type=email],
+.standard-form input[type=month],
+.standard-form input[type=number],
+.standard-form input[type=range],
+.standard-form input[type=search],
+.standard-form input[type=tel],
+.standard-form input[type=time],
+.standard-form input[type=url],
+.standard-form input[type=week],
 .standard-form select,
 .standard-form input[type=password],
+.dir-search input[type=search]
 .dir-search input[type=text] {
 	border: 1px inset #ccc;
 	-moz-border-radius: 3px;
diff --git a/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/global.js b/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/global.js
index 1a3a6e2c88686a623a8b00cbe4d116575066522b..706e8048cd876812372627da9ac35204891cb9c4 100644
--- a/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/global.js
+++ b/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/global.js
@@ -46,12 +46,31 @@ jq(document).ready( function() {
 			height:'50px'
 		});
 		jq("#aw-whats-new-submit").prop("disabled", false);
+
+		var $whats_new_form = jq("form#whats-new-form");
+		if ( $whats_new_form.hasClass("submitted") ) {
+			$whats_new_form.removeClass("submitted");	
+		}
+	});
+
+	/* On blur, shrink if it's empty */
+	jq('#whats-new').blur( function(){
+		if (!this.value.match(/\S+/)) {
+			this.value = "";
+			jq("#whats-new-options").animate({
+				height:'40px'
+			});
+			jq("form#whats-new-form textarea").animate({
+				height:'20px'
+			});
+			jq("#aw-whats-new-submit").prop("disabled", true);
+		}
 	});
 
 	/* New posts */
 	jq("input#aw-whats-new-submit").click( function() {
 		var button = jq(this);
-		var form = button.parent().parent().parent().parent();
+		var form = button.closest("form#whats-new-form");
 
 		form.children().each( function() {
 			if ( jq.nodeName(this, "textarea") || jq.nodeName(this, "input") )
@@ -62,6 +81,7 @@ jq(document).ready( function() {
 		jq('div.error').remove();
 		button.addClass('loading');
 		button.prop('disabled', true);
+		form.addClass("submitted");
 
 		/* Default POST values */
 		var object = '';
@@ -75,7 +95,7 @@ jq(document).ready( function() {
 
 		jq.post( ajaxurl, {
 			action: 'post_update',
-			'cookie': encodeURIComponent(document.cookie),
+			'cookie': bp_get_cookies(),
 			'_wpnonce_post_update': jq("input#_wpnonce_post_update").val(),
 			'content': content,
 			'object': object,
@@ -102,7 +122,7 @@ jq(document).ready( function() {
 				}
 
 				jq("ul#activity-stream").prepend(response);
-				jq("ul#activity-stream li:first").addClass('new-update');
+				jq("ul#activity-stream li:first").addClass('new-update just-posted');
 
 				if ( 0 != jq("#latest-update").length ) {
 					var l = jq("ul#activity-stream li.new-update .activity-content .activity-inner p").html();
@@ -195,7 +215,7 @@ jq(document).ready( function() {
 
 			jq.post( ajaxurl, {
 				action: 'activity_mark_' + type,
-				'cookie': encodeURIComponent(document.cookie),
+				'cookie': bp_get_cookies(),
 				'id': parent_id
 			},
 			function(response) {
@@ -249,7 +269,7 @@ jq(document).ready( function() {
 
 			jq.post( ajaxurl, {
 				action: 'delete_activity',
-				'cookie': encodeURIComponent(document.cookie),
+				'cookie': bp_get_cookies(),
 				'id': id,
 				'_wpnonce': nonce
 			},
@@ -301,10 +321,17 @@ jq(document).ready( function() {
 
 			var oldest_page = ( jq.cookie('bp-activity-oldestpage') * 1 ) + 1;
 
+			var just_posted = [];
+			
+			jq('.activity-list li.just-posted').each( function(){
+				just_posted.push( jq(this).attr('id').replace( 'activity-','' ) );
+			});
+
 			jq.post( ajaxurl, {
 				action: 'activity_get_older_updates',
-				'cookie': encodeURIComponent(document.cookie),
-				'page': oldest_page
+				'cookie': bp_get_cookies(),
+				'page': oldest_page,
+				'exclude_just_posted': just_posted.join(',')
 			},
 			function(response)
 			{
@@ -416,7 +443,7 @@ jq(document).ready( function() {
 
 			var ajaxdata = {
 				action: 'new_activity_comment',
-				'cookie': encodeURIComponent(document.cookie),
+				'cookie': bp_get_cookies(),
 				'_wpnonce_new_activity_comment': jq("input#_wpnonce_new_activity_comment").val(),
 				'comment_id': comment_id,
 				'form_id': form_id[2],
@@ -436,27 +463,35 @@ jq(document).ready( function() {
 				if ( response[0] + response[1] == '-1' ) {
 					form.append( jq( response.substr( 2, response.length ) ).hide().fadeIn( 200 ) );
 				} else {
+					var activity_comments = form.parent();
 					form.fadeOut( 200, function() {
-						if ( 0 == form.parent().children('ul').length ) {
-							if ( form.parent().hasClass('activity-comments') ) {
-								form.parent().prepend('<ul></ul>');
+						if ( 0 == activity_comments.children('ul').length ) {
+							if ( activity_comments.hasClass('activity-comments') ) {
+								activity_comments.prepend('<ul></ul>');
 							} else {
-								form.parent().append('<ul></ul>');
+								activity_comments.append('<ul></ul>');
 							}
 						}
 
 						/* Preceeding whitespace breaks output with jQuery 1.9.0 */
 						var the_comment = jq.trim( response );
 
-						form.parent().children('ul').append( jq( the_comment ).hide().fadeIn( 200 ) );
+						activity_comments.children('ul').append( jq( the_comment ).hide().fadeIn( 200 ) );
 						form.children('textarea').val('');
-						form.parent().parent().addClass('has-comments');
+						activity_comments.parent().addClass('has-comments');
 					} );
 
 					jq( 'form#' + form.attr('id') + ' textarea').val('');
 
 					/* Increase the "Reply (X)" button count */
 					jq('li#activity-' + form_id[2] + ' a.acomment-reply span').html( Number( jq('li#activity-' + form_id[2] + ' a.acomment-reply span').html() ) + 1 );
+
+					// Increment the 'Show all x comments' string, if present
+					var show_all_a = activity_comments.find('.show-all').find('a');
+					if ( show_all_a ) {
+						var new_count = jq('li#activity-' + form_id[2] + ' a.acomment-reply span').html();
+						show_all_a.html( BP_DTheme.show_x_comments.replace( '%d', new_count ) );
+					}
 				}
 
 				jq(target).prop("disabled", false);
@@ -488,7 +523,7 @@ jq(document).ready( function() {
 
 			jq.post( ajaxurl, {
 				action: 'delete_activity_comment',
-				'cookie': encodeURIComponent(document.cookie),
+				'cookie': bp_get_cookies(),
 				'_wpnonce': nonce,
 				'id': comment_id
 			},
@@ -504,12 +539,20 @@ jq(document).ready( function() {
 						if ( !jq(this).is(':hidden') )
 							child_count++;
 					});
-					comment_li.fadeOut(200);
+					comment_li.fadeOut(200, function() {
+						comment_li.remove();
+					});
 
 					/* Decrease the "Reply (X)" button count */
 					var count_span = jq('li#' + comment_li.parents('ul#activity-stream > li').attr('id') + ' a.acomment-reply span');
 					var new_count = count_span.html() - ( 1 + child_count );
 					count_span.html(new_count);
+	
+					// Change the 'Show all x comments' text
+					var show_all_a = comment_li.siblings('.show-all').find('a');
+					if ( show_all_a ) {
+						show_all_a.html( BP_DTheme.show_x_comments.replace( '%d', new_count ) );
+					}
 
 					/* If that was the last comment for the item, remove the has-comments class to clean up the styling */
 					if ( 0 == new_count ) {
@@ -760,7 +803,7 @@ jq(document).ready( function() {
 		jq.post( ajaxurl, {
 			action: 'groups_invite_user',
 			'friend_action': friend_action,
-			'cookie': encodeURIComponent(document.cookie),
+			'cookie': bp_get_cookies(),
 			'_wpnonce': jq("input#_wpnonce_invite_uninvite_user").val(),
 			'friend_id': friend_id,
 			'group_id': jq("input#group_id").val()
@@ -783,7 +826,7 @@ jq(document).ready( function() {
 	});
 
 	/* Remove a user from the list of users to invite to a group */
-	jq("#friend-list li a.remove").on('click', function() {
+	jq("#friend-list").on('click', 'li a.remove', function() {
 		jq('.ajax-loader').toggle();
 
 		var friend_id = jq(this).attr('id');
@@ -793,7 +836,7 @@ jq(document).ready( function() {
 		jq.post( ajaxurl, {
 			action: 'groups_invite_user',
 			'friend_action': 'uninvite',
-			'cookie': encodeURIComponent(document.cookie),
+			'cookie': bp_get_cookies(),
 			'_wpnonce': jq("input#_wpnonce_invite_uninvite_user").val(),
 			'friend_id': friend_id,
 			'group_id': jq("input#group_id").val()
@@ -830,6 +873,19 @@ jq(document).ready( function() {
 		return false;
 	} );
 
+	jq("#profile-edit-form input:not(:submit), #profile-edit-form textarea, #profile-edit-form select, #signup_form input:not(:submit), #signup_form textarea, #signup_form select").change( function() {
+		var shouldconfirm = true;
+
+		jq('#profile-edit-form input:submit, #signup_form input:submit').on( 'click', function() {
+			shouldconfirm = false;
+		});
+		
+		window.onbeforeunload = function(e) {
+			if ( shouldconfirm ) {
+				return BP_DTheme.unsaved_changes;
+			}
+		};
+	});
 
 	/** Friendship Requests **************************************/
 
@@ -860,7 +916,7 @@ jq(document).ready( function() {
 
 		jq.post( ajaxurl, {
 			action: action,
-			'cookie': encodeURIComponent(document.cookie),
+			'cookie': bp_get_cookies(),
 			'id': id,
 			'_wpnonce': nonce
 		},
@@ -902,7 +958,7 @@ jq(document).ready( function() {
 
 		jq.post( ajaxurl, {
 			action: 'addremove_friend',
-			'cookie': encodeURIComponent(document.cookie),
+			'cookie': bp_get_cookies(),
 			'fid': fid,
 			'_wpnonce': nonce
 		},
@@ -951,7 +1007,7 @@ jq(document).ready( function() {
 
 		jq.post( ajaxurl, {
 			action: 'joinleave_group',
-			'cookie': encodeURIComponent(document.cookie),
+			'cookie': bp_get_cookies(),
 			'gid': gid,
 			'_wpnonce': nonce
 		},
@@ -1008,7 +1064,7 @@ jq(document).ready( function() {
 
 			jq.post( ajaxurl, {
 				action: 'messages_send_reply',
-				'cookie': encodeURIComponent(document.cookie),
+				'cookie': bp_get_cookies(),
 				'_wpnonce': jq("input#send_message_nonce").val(),
 
 				'content': jq("#message_content").val(),
@@ -1289,7 +1345,7 @@ function bp_filter_request( object, filter, scope, target, search_terms, page, e
 
 	bp_ajax_request = jq.post( ajaxurl, {
 		action: object + '_filter',
-		'cookie': encodeURIComponent(document.cookie),
+		'cookie': bp_get_cookies(),
 		'object': object,
 		'filter': filter,
 		'search_terms': search_terms,
@@ -1337,7 +1393,7 @@ function bp_activity_request(scope, filter) {
 
 	bp_ajax_request = jq.post( ajaxurl, {
 		action: 'activity_widget_filter',
-		'cookie': encodeURIComponent(document.cookie),
+		'cookie': bp_get_cookies(),
 		'_wpnonce_activity_filter': jq("input#_wpnonce_activity_filter").val(),
 		'scope': scope,
 		'filter': filter
@@ -1388,7 +1444,7 @@ function bp_dtheme_hide_comments() {
 				jq(this).toggle();
 
 				if ( !i )
-					jq(this).before( '<li class="show-all"><a href="#' + parent_li.attr('id') + '/show-all/" title="' + BP_DTheme.show_all_comments + '">' + BP_DTheme.show_all + ' ' + comment_count + ' ' + BP_DTheme.comments + '</a></li>' );
+					jq(this).before( '<li class="show-all"><a href="#' + parent_li.attr('id') + '/show-all/" title="' + BP_DTheme.show_all_comments + '">' + BP_DTheme.show_x_comments.replace( '%d', comment_count ) + '</a></li>' );
 			}
 		});
 
@@ -1431,6 +1487,31 @@ function clear(container) {
 	return;
 }
 
+/* Returns a querystring of BP cookies (cookies beginning with 'bp-') */
+function bp_get_cookies() {
+	// get all cookies and split into an array
+	var allCookies   = document.cookie.split(";");
+
+	var bpCookies    = {};
+	var cookiePrefix = 'bp-';
+
+	// loop through cookies
+	for (var i = 0; i < allCookies.length; i++) {
+		var cookie    = allCookies[i];
+		var delimiter = cookie.indexOf("=");
+		var name      = unescape( cookie.slice(0, delimiter) ).trim();
+		var value     = unescape( cookie.slice(delimiter + 1) );
+
+		// if BP cookie, store it
+		if ( name.indexOf(cookiePrefix) == 0 ) {
+			bpCookies[name] = value;
+		}
+	}
+
+	// returns BP cookies as querystring
+	return encodeURIComponent( jq.param(bpCookies) );
+}
+
 /* ScrollTo plugin - just inline and minified */
 ;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,e,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
 
diff --git a/wp-content/plugins/buddypress/bp-themes/bp-default/activity/comment.php b/wp-content/plugins/buddypress/bp-themes/bp-default/activity/comment.php
index a7f341df3947e7948c06b29dbebcff09c4f46954..c7eb491133b9aeabb3a1ccbbdd2edb0464d1d8a9 100644
--- a/wp-content/plugins/buddypress/bp-themes/bp-default/activity/comment.php
+++ b/wp-content/plugins/buddypress/bp-themes/bp-default/activity/comment.php
@@ -27,7 +27,7 @@
 	<div class="acomment-meta">
 		<?php
 		/* translators: 1: user profile link, 2: user name, 3: activity permalink, 4: activity timestamp */
-		printf( __( '<a href="%1$s">%2$s</a> replied <a href="%3$s" class="activity-time-since"><span class="time-since">%4$s</span></a>', 'buddypress' ), bp_get_activity_comment_user_link(), bp_get_activity_comment_name(), bp_get_activity_thread_permalink(), bp_get_activity_comment_date_recorded() );
+		printf( __( '<a href="%1$s">%2$s</a> replied <a href="%3$s" class="activity-time-since"><span class="time-since">%4$s</span></a>', 'buddypress' ), bp_get_activity_comment_user_link(), bp_get_activity_comment_name(), bp_get_activity_comment_permalink(), bp_get_activity_comment_date_recorded() );
 		?>
 	</div>
 
diff --git a/wp-content/plugins/buddypress/bp-themes/bp-default/activity/index.php b/wp-content/plugins/buddypress/bp-themes/bp-default/activity/index.php
index bbcdbb24ac24a4e4196fcf39955061a635f95af3..f943edb805c899ffd16c4e2eccbde2f3737908ff 100644
--- a/wp-content/plugins/buddypress/bp-themes/bp-default/activity/index.php
+++ b/wp-content/plugins/buddypress/bp-themes/bp-default/activity/index.php
@@ -72,9 +72,13 @@ get_header( 'buddypress' ); ?>
 
 						<?php endif; ?>
 
-						<?php do_action( 'bp_before_activity_type_tab_mentions' ); ?>
+						<?php if ( bp_activity_do_mentions() ) : ?>
 
-						<li id="activity-mentions"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/'; ?>" title="<?php _e( 'Activity that I have been mentioned in.', 'buddypress' ); ?>"><?php _e( 'Mentions', 'buddypress' ); ?><?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?> <strong><?php printf( __( '<span>%s new</span>', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ); ?></strong><?php endif; ?></a></li>
+							<?php do_action( 'bp_before_activity_type_tab_mentions' ); ?>
+
+							<li id="activity-mentions"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/'; ?>" title="<?php _e( 'Activity that I have been mentioned in.', 'buddypress' ); ?>"><?php _e( 'Mentions', 'buddypress' ); ?><?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?> <strong><span><?php printf( _nx( '%s new', '%s new', bp_get_total_mention_count_for_user( bp_loggedin_user_id() ), 'Number of new activity mentions', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ); ?></span></strong><?php endif; ?></a></li>
+
+						<?php endif; ?>
 
 					<?php endif; ?>
 
diff --git a/wp-content/plugins/buddypress/bp-themes/bp-default/comments.php b/wp-content/plugins/buddypress/bp-themes/bp-default/comments.php
index c9698e19297a39e30e8d20b56bd0a4e73b2154e1..cf59ca041422ee322097ca354b5b49492a00819b 100644
--- a/wp-content/plugins/buddypress/bp-themes/bp-default/comments.php
+++ b/wp-content/plugins/buddypress/bp-themes/bp-default/comments.php
@@ -52,7 +52,7 @@
 	<?php if ( ! comments_open() ) : ?>
 		<?php if ( pings_open() ) : ?>
 			<p class="comments-closed pings-open">
-				<?php printf( __( 'Comments are closed, but <a href="%1$s" title="Trackback URL for this post">trackbacks</a> and pingbacks are open.', 'buddypress' ), trackback_url( '0' ) ); ?>
+				<?php printf( __( 'Comments are closed, but <a href="%1$s" title="Trackback URL for this post">trackbacks</a> and pingbacks are open.', 'buddypress' ), get_trackback_url() ); ?>
 			</p>
 		<?php else : ?>
 			<p class="comments-closed">
diff --git a/wp-content/plugins/buddypress/bp-themes/bp-default/functions.php b/wp-content/plugins/buddypress/bp-themes/bp-default/functions.php
index 6f2eaa19238534d49a8f62430f5360017c99746a..a4b39cc296e9d4398bb5b45b0c96e7a8b8912ac2 100644
--- a/wp-content/plugins/buddypress/bp-themes/bp-default/functions.php
+++ b/wp-content/plugins/buddypress/bp-themes/bp-default/functions.php
@@ -119,7 +119,7 @@ function bp_dtheme_setup() {
 			add_action( 'bp_member_header_actions',    'bp_add_friend_button',           5 );
 
 		// Activity button
-		if ( bp_is_active( 'activity' ) )
+		if ( bp_is_active( 'activity' ) && bp_activity_do_mentions() )
 			add_action( 'bp_member_header_actions',    'bp_send_public_message_button',  20 );
 
 		// Messages button
@@ -159,12 +159,14 @@ function bp_dtheme_enqueue_scripts() {
 		'accepted'          => __( 'Accepted', 'buddypress' ),
 		'rejected'          => __( 'Rejected', 'buddypress' ),
 		'show_all_comments' => __( 'Show all comments for this thread', 'buddypress' ),
+		'show_x_comments'   => __( 'Show all %d comments', 'buddypress' ),
 		'show_all'          => __( 'Show all', 'buddypress' ),
 		'comments'          => __( 'comments', 'buddypress' ),
 		'close'             => __( 'Close', 'buddypress' ),
 		'view'              => __( 'View', 'buddypress' ),
 		'mark_as_fav'	    => __( 'Favorite', 'buddypress' ),
-		'remove_fav'	    => __( 'Remove Favorite', 'buddypress' )
+		'remove_fav'	    => __( 'Remove Favorite', 'buddypress' ),
+		'unsaved_changes'   => __( 'Your profile has unsaved changes. If you leave the page, the changes will be lost.', 'buddypress' ),
 	);
 	wp_localize_script( 'dtheme-ajax-js', 'BP_DTheme', $params );
 
@@ -519,7 +521,7 @@ if ( !function_exists( 'bp_dtheme_page_on_front' ) ) :
 /**
  * Return the ID of a page set as the home page.
  *
- * @return false|int ID of page set as the home page
+ * @return int|bool ID of page set as the home page
  * @since BuddyPress (1.2)
  */
 function bp_dtheme_page_on_front() {
@@ -717,7 +719,7 @@ function bp_dtheme_sidebar_login_redirect_to() {
 	$redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
 	$redirect_to = apply_filters( 'bp_no_access_redirect', $redirect_to ); ?>
 
-	<input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" />
+	<input type="hidden" name="redirect_to" value="<?php echo esc_url( $redirect_to ); ?>" />
 
 <?php
 }
diff --git a/wp-content/plugins/buddypress/bp-themes/bp-default/groups/single/admin.php b/wp-content/plugins/buddypress/bp-themes/bp-default/groups/single/admin.php
index e1698f9e783b3231666ae4ad3042eb8754275df2..8a6d42dfb74e561cf7e0e39b5e83a4df779b3fc6 100644
--- a/wp-content/plugins/buddypress/bp-themes/bp-default/groups/single/admin.php
+++ b/wp-content/plugins/buddypress/bp-themes/bp-default/groups/single/admin.php
@@ -22,9 +22,9 @@
 	<?php do_action( 'groups_custom_group_fields_editable' ); ?>
 
 	<p>
-		<label for="group-notifiy-members"><?php _e( 'Notify group members of changes via email', 'buddypress' ); ?></label>
-		<input type="radio" name="group-notify-members" value="1" /> <?php _e( 'Yes', 'buddypress' ); ?>&nbsp;
-		<input type="radio" name="group-notify-members" value="0" checked="checked" /> <?php _e( 'No', 'buddypress' ); ?>&nbsp;
+		<label for="group-notifiy-members">
+			<input type="checkbox" name="group-notify-members" value="1" /> <?php _e( 'Notify group members of these changes via email', 'buddypress' ); ?>
+		</label>
 	</p>
 
 	<?php do_action( 'bp_after_group_details_admin' ); ?>
@@ -87,30 +87,30 @@
 		</label>
 	</div>
 
-	<hr /> 
-	 
-	<h4><?php _e( 'Group Invitations', 'buddypress' ); ?></h4> 
+	<hr />
 
-	<p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ); ?></p> 
+	<h4><?php _e( 'Group Invitations', 'buddypress' ); ?></h4>
 
-	<div class="radio"> 
-		<label> 
-			<input type="radio" name="group-invite-status" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> /> 
-			<strong><?php _e( 'All group members', 'buddypress' ); ?></strong> 
-		</label> 
+	<p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ); ?></p>
 
-		<label> 
-			<input type="radio" name="group-invite-status" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> /> 
-			<strong><?php _e( 'Group admins and mods only', 'buddypress' ); ?></strong> 
+	<div class="radio">
+		<label>
+			<input type="radio" name="group-invite-status" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> />
+			<strong><?php _e( 'All group members', 'buddypress' ); ?></strong>
 		</label>
-		
-		<label> 
-			<input type="radio" name="group-invite-status" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> /> 
-			<strong><?php _e( 'Group admins only', 'buddypress' ); ?></strong> 
-		</label> 
- 	</div> 
 
-	<hr /> 
+		<label>
+			<input type="radio" name="group-invite-status" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> />
+			<strong><?php _e( 'Group admins and mods only', 'buddypress' ); ?></strong>
+		</label>
+
+		<label>
+			<input type="radio" name="group-invite-status" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> />
+			<strong><?php _e( 'Group admins only', 'buddypress' ); ?></strong>
+		</label>
+ 	</div>
+
+	<hr />
 
 	<?php do_action( 'bp_after_group_settings_admin' ); ?>
 
@@ -172,14 +172,14 @@
 <?php if ( bp_is_group_admin_screen( 'manage-members' ) ) : ?>
 
 	<?php do_action( 'bp_before_group_manage_members_admin' ); ?>
-	
+
 	<div class="bp-widget">
 		<h4><?php _e( 'Administrators', 'buddypress' ); ?></h4>
 
 		<?php if ( bp_has_members( '&include='. bp_group_admin_ids() ) ) : ?>
-		
+
 		<ul id="admins-list" class="item-list single-line">
-			
+
 			<?php while ( bp_members() ) : bp_the_member(); ?>
 			<li>
 				<?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_member_name() ) ) ); ?>
@@ -188,26 +188,26 @@
 					<?php if ( count( bp_group_admin_ids( false, 'array' ) ) > 1 ) : ?>
 					<span class="small">
 						<a class="button confirm admin-demote-to-member" href="<?php bp_group_member_demote_link( bp_get_member_user_id() ); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a>
-					</span>			
+					</span>
 					<?php endif; ?>
-				</h5>		
+				</h5>
 			</li>
 			<?php endwhile; ?>
-		
+
 		</ul>
-		
+
 		<?php endif; ?>
 
 	</div>
-	
+
 	<?php if ( bp_group_has_moderators() ) : ?>
 		<div class="bp-widget">
-			<h4><?php _e( 'Moderators', 'buddypress' ); ?></h4>		
-			
+			<h4><?php _e( 'Moderators', 'buddypress' ); ?></h4>
+
 			<?php if ( bp_has_members( '&include=' . bp_group_mod_ids() ) ) : ?>
 				<ul id="mods-list" class="item-list single-line">
-				
-					<?php while ( bp_members() ) : bp_the_member(); ?>					
+
+					<?php while ( bp_members() ) : bp_the_member(); ?>
 					<li>
 						<?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_member_name() ) ) ); ?>
 						<h5>
@@ -215,13 +215,13 @@
 							<span class="small">
 								<a href="<?php bp_group_member_promote_admin_link( array( 'user_id' => bp_get_member_user_id() ) ); ?>" class="button confirm mod-promote-to-admin" title="<?php _e( 'Promote to Admin', 'buddypress' ); ?>"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a>
 								<a class="button confirm mod-demote-to-member" href="<?php bp_group_member_demote_link( bp_get_member_user_id() ); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a>
-							</span>		
-						</h5>		
-					</li>	
-					<?php endwhile; ?>			
-				
+							</span>
+						</h5>
+					</li>
+					<?php endwhile; ?>
+
 				</ul>
-			
+
 			<?php endif; ?>
 		</div>
 	<?php endif ?>
diff --git a/wp-content/plugins/buddypress/bp-themes/bp-default/groups/single/home.php b/wp-content/plugins/buddypress/bp-themes/bp-default/groups/single/home.php
index fe2743ac0e1e3e4d85cd4d17809b88d61ac81e7c..977c354bd58441e4876a0be807dab00b3e8f8ede 100644
--- a/wp-content/plugins/buddypress/bp-themes/bp-default/groups/single/home.php
+++ b/wp-content/plugins/buddypress/bp-themes/bp-default/groups/single/home.php
@@ -37,7 +37,7 @@
 				 */
 
 				// Group is visible
-				if ( bp_group_is_visible() ) : 
+				if ( bp_group_is_visible() ) :
 
 					// Looking at home location
 					if ( bp_is_group_home() ) :
@@ -45,7 +45,7 @@
 						// Use custom front if one exists
 						$custom_front = locate_template( array( 'groups/single/front.php' ) );
 						if     ( ! empty( $custom_front   ) ) : load_template( $custom_front, true );
-						
+
 						// Default to activity
 						elseif ( bp_is_active( 'activity' ) ) : locate_template( array( 'groups/single/activity.php' ), true );
 
@@ -80,10 +80,9 @@
 
 				// Group is not visible
 				elseif ( ! bp_group_is_visible() ) :
-
 					// Membership request
 					if ( bp_is_group_membership_request() ) :
-						locate_template( array( 'groups/single/request-membership' ), true );
+						locate_template( array( 'groups/single/request-membership.php' ), true );
 
 					// The group is not visible, show the status message
 					else :
@@ -97,7 +96,7 @@
 						<?php do_action( 'bp_after_group_status_message' );
 
 					endif;
-				endif;			
+				endif;
 
 				do_action( 'bp_after_group_body' ); ?>
 
diff --git a/wp-content/plugins/buddypress/bp-themes/bp-default/members/index.php b/wp-content/plugins/buddypress/bp-themes/bp-default/members/index.php
index 3a9b797496e7363b0cbc590118c68a97b0672d5c..e2673d8c489e751d4add429a48cd47c511b43e71 100644
--- a/wp-content/plugins/buddypress/bp-themes/bp-default/members/index.php
+++ b/wp-content/plugins/buddypress/bp-themes/bp-default/members/index.php
@@ -28,6 +28,8 @@ get_header( 'buddypress' ); ?>
 
 			</div><!-- #members-dir-search -->
 
+			<?php do_action( 'bp_before_directory_members_tabs' ); ?>
+
 			<div class="item-list-tabs" role="navigation">
 				<ul>
 					<li class="selected" id="members-all"><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_members_root_slug() ); ?>"><?php printf( __( 'All Members <span>%s</span>', 'buddypress' ), bp_get_total_member_count() ); ?></a></li>
diff --git a/wp-content/plugins/buddypress/bp-themes/bp-default/members/single/member-header.php b/wp-content/plugins/buddypress/bp-themes/bp-default/members/single/member-header.php
index 1728555435caf3f4aeee6b29df32b47424b58048..cfdc4a0cfb0c3b88c7e1fe193480f55fa2bbb18c 100644
--- a/wp-content/plugins/buddypress/bp-themes/bp-default/members/single/member-header.php
+++ b/wp-content/plugins/buddypress/bp-themes/bp-default/members/single/member-header.php
@@ -25,7 +25,10 @@
 		<a href="<?php bp_displayed_user_link(); ?>"><?php bp_displayed_user_fullname(); ?></a>
 	</h2>
 
-	<span class="user-nicename">@<?php bp_displayed_user_username(); ?></span>
+	<?php if ( bp_is_active( 'activity' ) && bp_activity_do_mentions() ) : ?>
+		<span class="user-nicename">@<?php bp_displayed_user_username(); ?></span>
+	<?php endif; ?>
+
 	<span class="activity"><?php bp_last_activity( bp_displayed_user_id() ); ?></span>
 
 	<?php do_action( 'bp_before_member_header_meta' ); ?>
diff --git a/wp-content/plugins/buddypress/bp-themes/bp-default/members/single/profile.php b/wp-content/plugins/buddypress/bp-themes/bp-default/members/single/profile.php
index 8c023e11ba2f20682af4c29ee4085ef123162934..4f4e14c2cd68457aa2f2adbeffdbd21b5d920a5d 100644
--- a/wp-content/plugins/buddypress/bp-themes/bp-default/members/single/profile.php
+++ b/wp-content/plugins/buddypress/bp-themes/bp-default/members/single/profile.php
@@ -9,17 +9,11 @@
 
 ?>
 
-<?php if ( bp_is_my_profile() ) : ?>
-
-	<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
-		<ul>
-
-			<?php bp_get_options_nav(); ?>
-
-		</ul>
-	</div><!-- .item-list-tabs -->
-
-<?php endif; ?>
+<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
+	<ul>
+		<?php bp_get_options_nav(); ?>
+	</ul>
+</div><!-- .item-list-tabs -->
 
 <?php do_action( 'bp_before_profile_content' ); ?>
 
diff --git a/wp-content/plugins/buddypress/bp-themes/bp-default/members/single/settings/general.php b/wp-content/plugins/buddypress/bp-themes/bp-default/members/single/settings/general.php
index f3bc0261c13a0962d7e7b1eaa4d216386bc601c1..2b410f0288283148d2b446fe7613fd7bb2deef04 100644
--- a/wp-content/plugins/buddypress/bp-themes/bp-default/members/single/settings/general.php
+++ b/wp-content/plugins/buddypress/bp-themes/bp-default/members/single/settings/general.php
@@ -55,7 +55,7 @@ get_header( 'buddypress' ); ?>
 					<?php if ( !is_super_admin() ) : ?>
 
 						<label for="pwd"><?php _e( 'Current Password <span>(required to update email or change current password)</span>', 'buddypress' ); ?></label>
-						<input type="password" name="pwd" id="pwd" size="16" value="" class="settings-input small" /> &nbsp;<a href="<?php echo site_url( add_query_arg( array( 'action' => 'lostpassword' ), 'wp-login.php' ), 'login' ); ?>" title="<?php _e( 'Password Lost and Found', 'buddypress' ); ?>"><?php _e( 'Lost your password?', 'buddypress' ); ?></a>
+						<input type="password" name="pwd" id="pwd" size="16" value="" class="settings-input small" /> &nbsp;<a href="<?php echo wp_lostpassword_url(); ?>" title="<?php _e( 'Password Lost and Found', 'buddypress' ); ?>"><?php _e( 'Lost your password?', 'buddypress' ); ?></a>
 
 					<?php endif; ?>
 
diff --git a/wp-content/plugins/buddypress/bp-themes/bp-default/registration/activate.php b/wp-content/plugins/buddypress/bp-themes/bp-default/registration/activate.php
index bbc60cba3a476a51734976af127283908a851254..d2eddc4a32fe8a86058c61b86524c27255799ead 100644
--- a/wp-content/plugins/buddypress/bp-themes/bp-default/registration/activate.php
+++ b/wp-content/plugins/buddypress/bp-themes/bp-default/registration/activate.php
@@ -22,7 +22,7 @@
 				<?php if ( isset( $_GET['e'] ) ) : ?>
 					<p><?php _e( 'Your account was activated successfully! Your account details have been sent to you in a separate email.', 'buddypress' ); ?></p>
 				<?php else : ?>
-					<p><?php _e( 'Your account was activated successfully! You can now log in with the username and password you provided when you signed up.', 'buddypress' ); ?></p>
+					<p><?php printf( __( 'Your account was activated successfully! You can now <a href="%s">log in</a> with the username and password you provided when you signed up.', 'buddypress' ), wp_login_url( bp_get_root_domain() ) ); ?></p>
 				<?php endif; ?>
 
 			<?php else : ?>
diff --git a/wp-content/plugins/buddypress/bp-themes/bp-default/registration/register.php b/wp-content/plugins/buddypress/bp-themes/bp-default/registration/register.php
index 20efa5febc52a688a65f713b5a59072936c5923e..f70442e02d860b1587d097c5d8472ac520b1c1c9 100644
--- a/wp-content/plugins/buddypress/bp-themes/bp-default/registration/register.php
+++ b/wp-content/plugins/buddypress/bp-themes/bp-default/registration/register.php
@@ -74,7 +74,7 @@
 								<?php if ( 'textbox' == bp_get_the_profile_field_type() ) : ?>
 
 									<label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
-									<?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
+									<?php do_action( bp_get_the_profile_field_errors_action() ); ?>
 									<input type="text" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" value="<?php bp_the_profile_field_edit_value(); ?>" />
 
 								<?php endif; ?>
@@ -82,7 +82,7 @@
 								<?php if ( 'textarea' == bp_get_the_profile_field_type() ) : ?>
 
 									<label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
-									<?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
+									<?php do_action( bp_get_the_profile_field_errors_action() ); ?>
 									<textarea rows="5" cols="40" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_edit_value(); ?></textarea>
 
 								<?php endif; ?>
@@ -90,7 +90,7 @@
 								<?php if ( 'selectbox' == bp_get_the_profile_field_type() ) : ?>
 
 									<label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
-									<?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
+									<?php do_action( bp_get_the_profile_field_errors_action() ); ?>
 									<select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>">
 										<?php bp_the_profile_field_options(); ?>
 									</select>
@@ -100,7 +100,7 @@
 								<?php if ( 'multiselectbox' == bp_get_the_profile_field_type() ) : ?>
 
 									<label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
-									<?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
+									<?php do_action( bp_get_the_profile_field_errors_action() ); ?>
 									<select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" multiple="multiple">
 										<?php bp_the_profile_field_options(); ?>
 									</select>
@@ -112,7 +112,7 @@
 									<div class="radio">
 										<span class="label"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></span>
 
-										<?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
+										<?php do_action( bp_get_the_profile_field_errors_action() ); ?>
 										<?php bp_the_profile_field_options(); ?>
 
 										<?php if ( !bp_get_the_profile_field_is_required() ) : ?>
@@ -127,7 +127,7 @@
 									<div class="checkbox">
 										<span class="label"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></span>
 
-										<?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
+										<?php do_action( bp_get_the_profile_field_errors_action() ); ?>
 										<?php bp_the_profile_field_options(); ?>
 									</div>
 
@@ -137,7 +137,7 @@
 
 									<div class="datebox">
 										<label for="<?php bp_the_profile_field_input_name(); ?>_day"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
-										<?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
+										<?php do_action( bp_get_the_profile_field_errors_action() ); ?>
 
 										<select name="<?php bp_the_profile_field_input_name(); ?>_day" id="<?php bp_the_profile_field_input_name(); ?>_day">
 											<?php bp_the_profile_field_options( 'type=day' ); ?>
@@ -215,7 +215,7 @@
 							<?php if ( is_subdomain_install() ) : ?>
 								http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> .<?php bp_blogs_subdomain_base(); ?>
 							<?php else : ?>
-								<?php echo site_url(); ?>/ <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" />
+								<?php echo home_url( '/' ); ?> <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" />
 							<?php endif; ?>
 
 							<label for="signup_blog_title"><?php _e( 'Site Title', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
@@ -250,7 +250,7 @@
 
 			<?php if ( 'completed-confirmation' == bp_get_current_signup_step() ) : ?>
 
-				<h2><?php _e( 'Sign Up Complete!', 'buddypress' ); ?></h2>
+				<h2><?php _e( 'Check Your Email To Activate Your Account!', 'buddypress' ); ?></h2>
 
 				<?php do_action( 'template_notices' ); ?>
 				<?php do_action( 'bp_before_registration_confirmed' ); ?>
diff --git a/wp-content/plugins/buddypress/bp-themes/bp-default/rtl.css b/wp-content/plugins/buddypress/bp-themes/bp-default/rtl.css
index 1c6e57c45cdd84d9b705abad7155217a3d7be818..f6ca05b9521d07c8f94ea79a12b07106614571a8 100644
--- a/wp-content/plugins/buddypress/bp-themes/bp-default/rtl.css
+++ b/wp-content/plugins/buddypress/bp-themes/bp-default/rtl.css
@@ -2,7 +2,7 @@
  * Theme Name: BuddyPress Default
  * Theme URI: http://buddypress.org/extend/themes/
  * Description: Clean and stylish, BuddyPress Default lets you build a social network straight out of the box. Make it yours with a custom menu, header image, and background. Along with five widgetized areas (one in the sidebar, four in the footer), BP-Default supports featured images (as custom header images on posts and pages) and is furnished with an optional one-column page template that removes the sidebar, and a stylesheet for the admin Visual Editor.
- * Version: 1.7.2
+ * Version: 1.8.1
  * Author: the BuddyPress team
  * Author URI: http://buddypress.org
  * License: GNU General Public License
@@ -21,4 +21,4 @@
  *
  * This file intentionally left blank. CSS is enqueued in functions.php
  *
- */
\ No newline at end of file
+ */
diff --git a/wp-content/plugins/buddypress/bp-themes/bp-default/sidebar.php b/wp-content/plugins/buddypress/bp-themes/bp-default/sidebar.php
index f3dc868354d9105cd1c74e96f785beaf0eeb5691..f04786811c6e925424197c20fce27a7690ff20e6 100644
--- a/wp-content/plugins/buddypress/bp-themes/bp-default/sidebar.php
+++ b/wp-content/plugins/buddypress/bp-themes/bp-default/sidebar.php
@@ -49,8 +49,10 @@
 
 			<p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="sidebar-rememberme" value="forever" tabindex="99" /> <?php _e( 'Remember Me', 'buddypress' ); ?></label></p>
 
-			<?php do_action( 'bp_sidebar_login_form' ); ?>
 			<input type="submit" name="wp-submit" id="sidebar-wp-submit" value="<?php _e( 'Log In', 'buddypress' ); ?>" tabindex="100" />
+
+			<?php do_action( 'bp_sidebar_login_form' ); ?>
+
 			<input type="hidden" name="testcookie" value="1" />
 		</form>
 
diff --git a/wp-content/plugins/buddypress/bp-themes/bp-default/style.css b/wp-content/plugins/buddypress/bp-themes/bp-default/style.css
index 1c6e57c45cdd84d9b705abad7155217a3d7be818..f6ca05b9521d07c8f94ea79a12b07106614571a8 100644
--- a/wp-content/plugins/buddypress/bp-themes/bp-default/style.css
+++ b/wp-content/plugins/buddypress/bp-themes/bp-default/style.css
@@ -2,7 +2,7 @@
  * Theme Name: BuddyPress Default
  * Theme URI: http://buddypress.org/extend/themes/
  * Description: Clean and stylish, BuddyPress Default lets you build a social network straight out of the box. Make it yours with a custom menu, header image, and background. Along with five widgetized areas (one in the sidebar, four in the footer), BP-Default supports featured images (as custom header images on posts and pages) and is furnished with an optional one-column page template that removes the sidebar, and a stylesheet for the admin Visual Editor.
- * Version: 1.7.2
+ * Version: 1.8.1
  * Author: the BuddyPress team
  * Author URI: http://buddypress.org
  * License: GNU General Public License
@@ -21,4 +21,4 @@
  *
  * This file intentionally left blank. CSS is enqueued in functions.php
  *
- */
\ No newline at end of file
+ */
diff --git a/wp-content/plugins/buddypress/bp-xprofile/admin/js/admin.js b/wp-content/plugins/buddypress/bp-xprofile/admin/js/admin.js
index b465e18c8392d1c704844a10226889cfd1bf9082..ac2184eef1f4ee516b551e89d7340b12c38ce0bf 100644
--- a/wp-content/plugins/buddypress/bp-xprofile/admin/js/admin.js
+++ b/wp-content/plugins/buddypress/bp-xprofile/admin/js/admin.js
@@ -48,6 +48,9 @@ function add_option(forWhat) {
 	// re-initialize the sorable ui
 	enableSortableFieldOptions( forWhat );
 
+	// set focus on newly created element
+	document.getElementById(forWhat + "_option" + theId).focus();
+
 	theId++;
 
 	document.getElementById(forWhat + "_option_number").value = theId;
@@ -106,6 +109,9 @@ function destroySortableFieldOptions() {
 
 jQuery( document ).ready( function() {
 
+	// Set focus in Field Title, if we're on the right page
+	jQuery( '#bp-xprofile-add-field #title' ).focus();
+	
 	// Set up deleting options ajax
 	jQuery( 'a.ajax-option-delete' ).on( 'click', function() {
 		var theId = this.id.split( '-' );
diff --git a/wp-content/plugins/buddypress/bp-xprofile/admin/js/admin.min.js b/wp-content/plugins/buddypress/bp-xprofile/admin/js/admin.min.js
index f66eba7cca47cd01da4a76781a8e34461211ef70..44a0856917cecaf07b8c0e9bf6276d98b995091e 100644
--- a/wp-content/plugins/buddypress/bp-xprofile/admin/js/admin.min.js
+++ b/wp-content/plugins/buddypress/bp-xprofile/admin/js/admin.min.js
@@ -1 +1 @@
-function add_option(g){var j=document.getElementById(g+"_more");var l=document.getElementById(g+"_option_number").value;var a=document.createElement("p");var h=document.createElement("input");var k=document.createElement("span");var e=document.createTextNode("\u00A0\u039E\u00A0");var b=document.createElement("input");var f=document.createElement("span");var d=document.createTextNode(" Default Value ");a.setAttribute("id",g+"_div"+l);a.setAttribute("class","sortable");h.setAttribute("type","text");h.setAttribute("name",g+"_option["+l+"]");h.setAttribute("id",g+"_option"+l);k.appendChild(e);if(g=="checkbox"||g=="multiselectbox"){b.setAttribute("type","checkbox");b.setAttribute("name","isDefault_"+g+"_option["+l+"]")}else{b.setAttribute("type","radio");b.setAttribute("name","isDefault_"+g+"_option")}b.setAttribute("value",l);f.appendChild(d);var c=document.createElement("a");var i=document.createTextNode("[x]");c.setAttribute("href","javascript:hide('"+g+"_div"+l+"')");c.setAttribute("class","delete");c.appendChild(i);a.appendChild(k);a.appendChild(h);a.appendChild(document.createTextNode(" "));a.appendChild(b);a.appendChild(f);a.appendChild(c);j.appendChild(a);enableSortableFieldOptions(g);l++;document.getElementById(g+"_option_number").value=l}function show_options(a){document.getElementById("radio").style.display="none";document.getElementById("selectbox").style.display="none";document.getElementById("multiselectbox").style.display="none";document.getElementById("checkbox").style.display="none";if(a=="radio"){document.getElementById("radio").style.display=""}if(a=="selectbox"){document.getElementById("selectbox").style.display=""}if(a=="multiselectbox"){document.getElementById("multiselectbox").style.display=""}if(a=="checkbox"){document.getElementById("checkbox").style.display=""}}function hide(a){if(!document.getElementById(a)){return false}document.getElementById(a).style.display="none";document.getElementById(a).value=""}var fixHelper=function(b,a){a.children().each(function(){jQuery(this).width(jQuery(this).width())});return a};function enableSortableFieldOptions(a){if(jQuery("#"+a+" p.sortable").length>1){jQuery(".options-box").sortable({items:"p.sortable",tolerance:"pointer",axis:"y",handle:"span"});jQuery(".sortable span").css("cursor","move")}}function destroySortableFieldOptions(){jQuery(".options-box").sortable("destroy");jQuery(".sortable span").css("cursor","default")}jQuery(document).ready(function(){jQuery("a.ajax-option-delete").on("click",function(){var d=this.id.split("-");d=d[1];jQuery.post(ajaxurl,{action:"xprofile_delete_option",cookie:encodeURIComponent(document.cookie),_wpnonce:jQuery("input#_wpnonce").val(),option_id:d},function(e){})});jQuery('[id^="sort_order_"]').change(function(){if(jQuery(this).val()!="custom"){destroySortableFieldOptions()}else{enableSortableFieldOptions(jQuery("#fieldtype :selected").val())}});jQuery("ul#field-group-tabs").show();jQuery("ul#field-group-tabs").sortable({cursor:"move",axis:"x",opacity:0.6,items:"li",tolerance:"pointer",update:function(){jQuery.post(ajaxurl,{action:"xprofile_reorder_groups",cookie:encodeURIComponent(document.cookie),_wpnonce_reorder_groups:jQuery("input#_wpnonce_reorder_groups").val(),group_order:jQuery(this).sortable("serialize")},function(d){})}}).disableSelection();jQuery("fieldset.field-group").sortable({cursor:"move",opacity:0.3,items:"fieldset",tolerance:"pointer",update:function(){jQuery.post(ajaxurl,{action:"xprofile_reorder_fields",cookie:encodeURIComponent(document.cookie),_wpnonce_reorder_fields:jQuery("input#_wpnonce_reorder_fields").val(),field_order:jQuery(this).sortable("serialize"),field_group_id:jQuery(this).attr("id")},function(d){})}}).disableSelection().css("cursor","move");enableSortableFieldOptions(jQuery("#fieldtype :selected").val());var b;var a=jQuery("#tabs").tabs();c(a);function c(d){b=jQuery("ul:first li",d).droppable({accept:".connectedSortable fieldset",hoverClass:"ui-state-hover",activeClass:"ui-state-acceptable",touch:"pointer",tolerance:"pointer",drop:function(g,h){var e=jQuery(this);var f=jQuery(e.find("a").attr("href")).find(".connectedSortable");jQuery(e).removeClass("drop-candidate");h.draggable.hide("slow",function(){d.tabs("option","active",b.index(e));jQuery(this).appendTo(f).show("slow").animate({opacity:"1"},500);f=jQuery(e.find("a").attr("href")).find(".connectedSortable");jQuery(f).find("p.nofields").hide("slow");jQuery.post(ajaxurl,{action:"xprofile_reorder_fields",cookie:encodeURIComponent(document.cookie),_wpnonce_reorder_fields:jQuery("input#_wpnonce_reorder_fields").val(),field_order:jQuery(f).sortable("serialize"),field_group_id:jQuery(f).attr("id")},function(i){})})},over:function(e,f){jQuery(this).addClass("drop-candidate")},out:function(e,f){jQuery(this).removeClass("drop-candidate")}})}});
\ No newline at end of file
+function add_option(g){var j=document.getElementById(g+"_more");var l=document.getElementById(g+"_option_number").value;var a=document.createElement("p");var h=document.createElement("input");var k=document.createElement("span");var e=document.createTextNode("\u00A0\u039E\u00A0");var b=document.createElement("input");var f=document.createElement("span");var d=document.createTextNode(" Default Value ");a.setAttribute("id",g+"_div"+l);a.setAttribute("class","sortable");h.setAttribute("type","text");h.setAttribute("name",g+"_option["+l+"]");h.setAttribute("id",g+"_option"+l);k.appendChild(e);if(g=="checkbox"||g=="multiselectbox"){b.setAttribute("type","checkbox");b.setAttribute("name","isDefault_"+g+"_option["+l+"]")}else{b.setAttribute("type","radio");b.setAttribute("name","isDefault_"+g+"_option")}b.setAttribute("value",l);f.appendChild(d);var c=document.createElement("a");var i=document.createTextNode("[x]");c.setAttribute("href","javascript:hide('"+g+"_div"+l+"')");c.setAttribute("class","delete");c.appendChild(i);a.appendChild(k);a.appendChild(h);a.appendChild(document.createTextNode(" "));a.appendChild(b);a.appendChild(f);a.appendChild(c);j.appendChild(a);enableSortableFieldOptions(g);document.getElementById(g+"_option"+l).focus();l++;document.getElementById(g+"_option_number").value=l}function show_options(a){document.getElementById("radio").style.display="none";document.getElementById("selectbox").style.display="none";document.getElementById("multiselectbox").style.display="none";document.getElementById("checkbox").style.display="none";if(a=="radio"){document.getElementById("radio").style.display=""}if(a=="selectbox"){document.getElementById("selectbox").style.display=""}if(a=="multiselectbox"){document.getElementById("multiselectbox").style.display=""}if(a=="checkbox"){document.getElementById("checkbox").style.display=""}}function hide(a){if(!document.getElementById(a)){return false}document.getElementById(a).style.display="none";document.getElementById(a).value=""}var fixHelper=function(b,a){a.children().each(function(){jQuery(this).width(jQuery(this).width())});return a};function enableSortableFieldOptions(a){if(jQuery("#"+a+" p.sortable").length>1){jQuery(".options-box").sortable({items:"p.sortable",tolerance:"pointer",axis:"y",handle:"span"});jQuery(".sortable span").css("cursor","move")}}function destroySortableFieldOptions(){jQuery(".options-box").sortable("destroy");jQuery(".sortable span").css("cursor","default")}jQuery(document).ready(function(){jQuery("#bp-xprofile-add-field #title").focus();jQuery("a.ajax-option-delete").on("click",function(){var d=this.id.split("-");d=d[1];jQuery.post(ajaxurl,{action:"xprofile_delete_option",cookie:encodeURIComponent(document.cookie),_wpnonce:jQuery("input#_wpnonce").val(),option_id:d},function(e){})});jQuery('[id^="sort_order_"]').change(function(){if(jQuery(this).val()!="custom"){destroySortableFieldOptions()}else{enableSortableFieldOptions(jQuery("#fieldtype :selected").val())}});jQuery("ul#field-group-tabs").show();jQuery("ul#field-group-tabs").sortable({cursor:"move",axis:"x",opacity:0.6,items:"li",tolerance:"pointer",update:function(){jQuery.post(ajaxurl,{action:"xprofile_reorder_groups",cookie:encodeURIComponent(document.cookie),_wpnonce_reorder_groups:jQuery("input#_wpnonce_reorder_groups").val(),group_order:jQuery(this).sortable("serialize")},function(d){})}}).disableSelection();jQuery("fieldset.field-group").sortable({cursor:"move",opacity:0.3,items:"fieldset",tolerance:"pointer",update:function(){jQuery.post(ajaxurl,{action:"xprofile_reorder_fields",cookie:encodeURIComponent(document.cookie),_wpnonce_reorder_fields:jQuery("input#_wpnonce_reorder_fields").val(),field_order:jQuery(this).sortable("serialize"),field_group_id:jQuery(this).attr("id")},function(d){})}}).disableSelection().css("cursor","move");enableSortableFieldOptions(jQuery("#fieldtype :selected").val());var b;var a=jQuery("#tabs").tabs();c(a);function c(d){b=jQuery("ul:first li",d).droppable({accept:".connectedSortable fieldset",hoverClass:"ui-state-hover",activeClass:"ui-state-acceptable",touch:"pointer",tolerance:"pointer",drop:function(g,h){var e=jQuery(this);var f=jQuery(e.find("a").attr("href")).find(".connectedSortable");jQuery(e).removeClass("drop-candidate");h.draggable.hide("slow",function(){d.tabs("option","active",b.index(e));jQuery(this).appendTo(f).show("slow").animate({opacity:"1"},500);f=jQuery(e.find("a").attr("href")).find(".connectedSortable");jQuery(f).find("p.nofields").hide("slow");jQuery.post(ajaxurl,{action:"xprofile_reorder_fields",cookie:encodeURIComponent(document.cookie),_wpnonce_reorder_fields:jQuery("input#_wpnonce_reorder_fields").val(),field_order:jQuery(f).sortable("serialize"),field_group_id:jQuery(f).attr("id")},function(i){})})},over:function(e,f){jQuery(this).addClass("drop-candidate")},out:function(e,f){jQuery(this).removeClass("drop-candidate")}})}});
\ No newline at end of file
diff --git a/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-activity.php b/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-activity.php
index 5f0deff7ee87e620c4607ec717438c81e7c196e6..01ffcc38cbd4ce62295bae37a9dfbaa0d9db4681 100644
--- a/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-activity.php
+++ b/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-activity.php
@@ -31,7 +31,7 @@ add_action( 'bp_register_activity_actions', 'xprofile_register_activity_actions'
  *
  * @package BuddyPress
  * @subpackage XProfileActivity
- * @param $args Array containing all variables used after extract() call
+ * @param string $args String containing all variables used after extract() call
  * @global $bp The global BuddyPress settings variable created in bp_core_current_times()
  * @uses bp_activity_add() Adds an entry to the activity component tables for a specific activity
  */
@@ -77,7 +77,7 @@ function xprofile_record_activity( $args = '' ) {
  * it will be removed from the users activity stream and sitewide stream (if installed)
  *
  * @package BuddyPress XProfile
- * @param $args Array containing all variables used after extract() call
+ * @param string $args Containing all variables used after extract() call
  * @global BuddyPress $bp The one true BuddyPress instance
  * @uses bp_activity_delete() Deletes an entry to the activity component tables for a specific activity
  */
diff --git a/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-admin.php b/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-admin.php
index 8235ea05d57efc85119f7bcc1bafbf449a4b1391..95151eaecb9668d871ebc1442987547fb92f0d3a 100644
--- a/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-admin.php
+++ b/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-admin.php
@@ -69,7 +69,7 @@ function xprofile_admin( $message = '', $type = 'error' ) {
 
 		<h2>
 			<?php _e( 'Profile Fields', 'buddypress'); ?>
-			<a id="add_group" class="add-new-h2" href="admin.php?page=bp-profile-setup&amp;mode=add_group"><?php _e( 'Add New Field Group', 'buddypress' ); ?></a>
+			<a id="add_group" class="add-new-h2" href="users.php?page=bp-profile-setup&amp;mode=add_group"><?php _e( 'Add New Field Group', 'buddypress' ); ?></a>
 		</h2>
 
 		<p><?php echo sprintf( __( 'Fields in the "%s" group will appear on the signup page.', 'buddypress' ), esc_html( stripslashes( bp_get_option( 'bp-xprofile-base-group-name' ) ) ) ) ?></p>
@@ -110,12 +110,12 @@ function xprofile_admin( $message = '', $type = 'error' ) {
 					<div id="tabs-<?php echo $group->id; ?>" class="tab-wrapper">
 						<div class="tab-toolbar">
 							<div class="tab-toolbar-left">
-								<a class="button-primary" href="admin.php?page=bp-profile-setup&amp;group_id=<?php echo esc_attr( $group->id ); ?>&amp;mode=add_field"><?php _e( 'Add New Field', 'buddypress' ); ?></a>
-								<a class="button edit" href="admin.php?page=bp-profile-setup&amp;mode=edit_group&amp;group_id=<?php echo esc_attr( $group->id ); ?>"><?php _e( 'Edit Group', 'buddypress' ); ?></a>
+								<a class="button-primary" href="users.php?page=bp-profile-setup&amp;group_id=<?php echo esc_attr( $group->id ); ?>&amp;mode=add_field"><?php _e( 'Add New Field', 'buddypress' ); ?></a>
+								<a class="button edit" href="users.php?page=bp-profile-setup&amp;mode=edit_group&amp;group_id=<?php echo esc_attr( $group->id ); ?>"><?php _e( 'Edit Group', 'buddypress' ); ?></a>
 
 								<?php if ( $group->can_delete ) : ?>
 
-									<a class="submitdelete deletion ajax-option-delete" href="admin.php?page=bp-profile-setup&amp;mode=delete_group&amp;group_id=<?php echo esc_attr( $group->id ); ?>"><?php _e( 'Delete Group', 'buddypress' ); ?></a>
+									<a class="confirm submitdelete deletion ajax-option-delete" href="users.php?page=bp-profile-setup&amp;mode=delete_group&amp;group_id=<?php echo esc_attr( $group->id ); ?>"><?php _e( 'Delete Group', 'buddypress' ); ?></a>
 
 								<?php endif; ?>
 
@@ -159,7 +159,7 @@ function xprofile_admin( $message = '', $type = 'error' ) {
 				<?php endforeach; else : ?>
 
 					<div id="message" class="error"><p><?php _e( 'You have no groups.', 'buddypress' ); ?></p></div>
-					<p><a href="admin.php?page=bp-profile-setup&amp;mode=add_group"><?php _e( 'Add New Group', 'buddypress' ); ?></a></p>
+					<p><a href="users.php?page=bp-profile-setup&amp;mode=add_group"><?php _e( 'Add New Group', 'buddypress' ); ?></a></p>
 
 				<?php endif; ?>
 
@@ -453,11 +453,11 @@ function xprofile_admin_field( $admin_field, $admin_group, $class = '' ) {
 			<?php endif; ?>
 
 			<div class="actions">
-				<a class="button edit" href="admin.php?page=bp-profile-setup&amp;group_id=<?php echo esc_attr( $admin_group->id ); ?>&amp;field_id=<?php echo esc_attr( $field->id ); ?>&amp;mode=edit_field"><?php _e( 'Edit', 'buddypress' ); ?></a>
+				<a class="button edit" href="users.php?page=bp-profile-setup&amp;group_id=<?php echo esc_attr( $admin_group->id ); ?>&amp;field_id=<?php echo esc_attr( $field->id ); ?>&amp;mode=edit_field"><?php _e( 'Edit', 'buddypress' ); ?></a>
 
 				<?php if ( $field->can_delete ) : ?>
 
-					<a class="submit-delete deletion" href="admin.php?page=bp-profile-setup&amp;field_id=<?php echo esc_attr( $field->id ); ?>&amp;mode=delete_field"><?php _e( 'Delete', 'buddypress' ); ?></a>
+					<a class="confirm submit-delete deletion" href="users.php?page=bp-profile-setup&amp;field_id=<?php echo esc_attr( $field->id ); ?>&amp;mode=delete_field"><?php _e( 'Delete', 'buddypress' ); ?></a>
 
 				<?php endif; ?>
 			</div>
diff --git a/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-classes.php b/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-classes.php
index bdfd2520cc68284ad590ec71464880b64e5b7c56..6be33674bf76043c202bbeb7838c029adacb21ff 100644
--- a/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-classes.php
+++ b/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-classes.php
@@ -352,11 +352,11 @@ class BP_XProfile_Group {
 
 		if ( empty( $this->id ) ) {
 			$title	= __( 'Add New Field Group', 'buddypress' );
-			$action	= "admin.php?page=bp-profile-setup&amp;mode=add_group";
+			$action	= "users.php?page=bp-profile-setup&amp;mode=add_group";
 			$button	= __( 'Create Field Group', 'buddypress' );
 		} else {
 			$title  = __( 'Edit Field Group', 'buddypress' );
-			$action = "admin.php?page=bp-profile-setup&amp;mode=edit_group&amp;group_id=" . $this->id;
+			$action = "users.php?page=bp-profile-setup&amp;mode=edit_group&amp;group_id=" . $this->id;
 			$button	= __( 'Save Changes', 'buddypress' );
 		} ?>
 
@@ -386,7 +386,7 @@ class BP_XProfile_Group {
 								</div>
 							</div>
 
-							<div id="postdiv" class="postarea">
+							<div id="postdiv">
 								<div class="postbox">
 									<div id="titlediv"><h3 class="hndle"><?php _e( 'Group Description', 'buddypress' ); ?></h3></div>
 									<div class="inside">
@@ -403,7 +403,7 @@ class BP_XProfile_Group {
 										<div id="submitcomment" class="submitbox">
 											<div id="major-publishing-actions">
 												<div id="delete-action">
-													<a href="admin.php?page=bp-profile-setup" class="submitdelete deletion"><?php _e( 'Cancel', 'buddypress' ); ?></a>
+													<a href="users.php?page=bp-profile-setup" class="submitdelete deletion"><?php _e( 'Cancel', 'buddypress' ); ?></a>
 												</div>
 												<div id="publishing-action">
 													<input type="submit" name="save_group" value="<?php echo esc_attr( $button ); ?>" class="button-primary"/>
@@ -453,10 +453,9 @@ class BP_XProfile_Field {
 	function populate( $id, $user_id, $get_data ) {
 		global $wpdb, $userdata, $bp;
 
-		// @todo Why are we nooping the user_id ?
-		$user_id = 0;
-		if ( is_null( $user_id ) )
-			$user_id = $userdata->ID;
+		if ( empty( $user_id ) ) {
+			$user_id = isset( $userdata->ID ) ? $userdata->ID : 0;
+		}
 
 		$sql = $wpdb->prepare( "SELECT * FROM {$bp->profile->table_name_fields} WHERE id = %d", $id );
 
@@ -785,7 +784,7 @@ class BP_XProfile_Field {
 							<input type="text" name="<?php echo esc_attr( $type ); ?>_option[<?php echo esc_attr( $j ); ?>]" id="<?php echo esc_attr( $type ); ?>_option<?php echo esc_attr( $j ); ?>" value="<?php echo stripslashes( esc_attr( $options[$i]->name ) ); ?>" />
 							<input type="<?php echo $default_input; ?>" name="isDefault_<?php echo esc_attr( $type ); ?>_option<?php echo esc_attr( $default_name ); ?>" <?php checked( (int) $options[$i]->is_default_option, true ); ?> value="<?php echo esc_attr( $j ); ?>" />
 							<span><?php _e( 'Default Value', 'buddypress' ); ?></span>
-							<a href="<?php echo esc_url( 'admin.php?page=bp-profile-setup&amp;mode=delete_option&amp;option_id=' . $options[$i]->id ); ?>" class="ajax-option-delete" id="delete-<?php echo esc_attr( $options[$i]->id ); ?>">[x]</a>
+							<a href="<?php echo esc_url( 'users.php?page=bp-profile-setup&amp;mode=delete_option&amp;option_id=' . $options[$i]->id ); ?>" class="ajax-option-delete" id="delete-<?php echo esc_attr( $options[$i]->id ); ?>">[x]</a>
 						</p>
 
 					<?php } /* end for */ ?>
@@ -817,7 +816,7 @@ class BP_XProfile_Field {
 	function render_admin_form( $message = '' ) {
 		if ( empty( $this->id ) ) {
 			$title  = __( 'Add Field', 'buddypress' );
-			$action	= "admin.php?page=bp-profile-setup&amp;group_id=" . $this->group_id . "&amp;mode=add_field#tabs-" . $this->group_id;
+			$action	= "users.php?page=bp-profile-setup&amp;group_id=" . $this->group_id . "&amp;mode=add_field#tabs-" . $this->group_id;
 
 			if ( !empty( $_POST['saveField'] ) ) {
 				$this->name        = $_POST['title'];
@@ -829,7 +828,7 @@ class BP_XProfile_Field {
 			}
 		} else {
 			$title  = __( 'Edit Field', 'buddypress' );
-			$action = "admin.php?page=bp-profile-setup&amp;mode=edit_field&amp;group_id=" . $this->group_id . "&amp;field_id=" . $this->id . "#tabs-" . $this->group_id;
+			$action = "users.php?page=bp-profile-setup&amp;mode=edit_field&amp;group_id=" . $this->group_id . "&amp;field_id=" . $this->id . "#tabs-" . $this->group_id;
 		} ?>
 
 		<div class="wrap">
@@ -845,7 +844,7 @@ class BP_XProfile_Field {
 
 			<?php endif; ?>
 
-			<form action="<?php echo esc_url( $action ); ?>" method="post">
+			<form id="bp-xprofile-add-field" action="<?php echo esc_url( $action ); ?>" method="post">
 				<div id="poststuff">
 					<div id="titlediv">
 						<h3><label for="title"><?php _e( 'Field Title', 'buddypress' ); ?> *</label></h3>
@@ -905,7 +904,7 @@ class BP_XProfile_Field {
 
 									<?php foreach( bp_xprofile_get_visibility_levels() as $level ) : ?>
 
-										<li><input type="radio" name="default-visibility" value="<?php echo esc_attr( $level['id'] ) ?>" <?php checked( $this->default_visibility, $level['id'] ); ?>> <?php echo esc_html( $level['label'] ) ?></li>
+										<li><label><input type="radio" name="default-visibility" value="<?php echo esc_attr( $level['id'] ) ?>" <?php checked( $this->default_visibility, $level['id'] ); ?>> <?php echo esc_html( $level['label'] ) ?></label></li>
 
 									<?php endforeach ?>
 
@@ -915,8 +914,8 @@ class BP_XProfile_Field {
 							<div id="titlewrap">
 								<h3><label for="allow-custom-visibility"><?php _e( 'Per-Member Visibility', 'buddypress' ); ?></label></h3>
 								<ul>
-									<li><input type="radio" name="allow-custom-visibility" value="allowed"  <?php checked( $this->allow_custom_visibility, 'allowed'  ); ?>> <?php _e( "Let members change this field's visibility", 'buddypress' ); ?></li>
-									<li><input type="radio" name="allow-custom-visibility" value="disabled" <?php checked( $this->allow_custom_visibility, 'disabled' ); ?>> <?php _e( 'Enforce the default visibility for all members', 'buddypress' ); ?></li>
+									<li><label><input type="radio" name="allow-custom-visibility" value="allowed"  <?php checked( $this->allow_custom_visibility, 'allowed'  ); ?>> <?php _e( "Let members change this field's visibility", 'buddypress' ); ?></label></li>
+									<li><label><input type="radio" name="allow-custom-visibility" value="disabled" <?php checked( $this->allow_custom_visibility, 'disabled' ); ?>> <?php _e( 'Enforce the default visibility for all members', 'buddypress' ); ?></label></li>
 								</ul>
 							</div>
 						</div>
@@ -926,7 +925,7 @@ class BP_XProfile_Field {
 					<p class="submit">
 						<input type="hidden" name="field_order" id="field_order" value="<?php echo esc_attr( $this->field_order ); ?>" />
 						<input type="submit" value="<?php _e( 'Save', 'buddypress' ); ?>" name="saveField" id="saveField" style="font-weight: bold" class="button-primary" />
-						<?php _e( 'or', 'buddypress' ); ?> <a href="admin.php?page=bp-profile-setup" class="deletion"><?php _e( 'Cancel', 'buddypress' ); ?></a>
+						<?php _e( 'or', 'buddypress' ); ?> <a href="users.php?page=bp-profile-setup" class="deletion"><?php _e( 'Cancel', 'buddypress' ); ?></a>
 					</p>
 
 				</div>
diff --git a/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-functions.php b/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-functions.php
index b925730bdd0088710f1bf47aedaf1294da6cebe3..03a88f8c7f9c2a7f33eb16416c210dbc93e7b5f6 100644
--- a/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-functions.php
+++ b/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-functions.php
@@ -194,12 +194,12 @@ function xprofile_get_field_data( $field, $user_id = 0, $multi_format = 'array'
  * A simple function to set profile data for a specific field for a specific user.
  *
  * @package BuddyPress Core
- * @param $field The ID of the field, or the $name of the field.
- * @param $user_id The ID of the user
- * @param $value The value for the field you want to set for the user.
+ * @param int|string $field The ID of the field, or the $name of the field.
+ * @param int|$user_id The ID of the user
+ * @param mixed The value for the field you want to set for the user.
  * @global BuddyPress $bp The one true BuddyPress instance
  * @uses xprofile_get_field_id_from_name() Gets the ID for the field based on the name.
- * @return true on success, false on failure.
+ * @return bool True on success, false on failure.
  */
 function xprofile_set_field_data( $field, $user_id, $value, $is_required = false ) {
 
@@ -321,7 +321,7 @@ function xprofile_check_is_required_field( $field_id ) {
  * Returns the ID for the field based on the field name.
  *
  * @package BuddyPress Core
- * @param $field_name The name of the field to get the ID for.
+ * @param string $field_name The name of the field to get the ID for.
  * @return int $field_id on success, false on failure.
  */
 function xprofile_get_field_id_from_name( $field_name ) {
@@ -332,13 +332,13 @@ function xprofile_get_field_id_from_name( $field_name ) {
  * Fetches a random piece of profile data for the user.
  *
  * @package BuddyPress Core
- * @param $user_id User ID of the user to get random data for
- * @param $exclude_fullname whether or not to exclude the full name field as random data.
+ * @param int $user_id User ID of the user to get random data for
+ * @param bool $exclude_fullname Optional; whether or not to exclude the full name field as random data. Defaults to true.
  * @global BuddyPress $bp The one true BuddyPress instance
  * @global $wpdb WordPress DB access object.
  * @global $current_user WordPress global variable containing current logged in user information
  * @uses xprofile_format_profile_field() Formats profile field data so it is suitable for display.
- * @return $field_data The fetched random data for the user.
+ * @return string|bool The fetched random data for the user, or false if no data or no match.
  */
 function xprofile_get_random_profile_data( $user_id, $exclude_fullname = true ) {
 	$field_data = BP_XProfile_ProfileData::get_random( $user_id, $exclude_fullname );
@@ -358,10 +358,10 @@ function xprofile_get_random_profile_data( $user_id, $exclude_fullname = true )
  * Formats a profile field according to its type. [ TODO: Should really be moved to filters ]
  *
  * @package BuddyPress Core
- * @param $field_type The type of field: datebox, selectbox, textbox etc
- * @param $field_value The actual value
+ * @param string $field_type The type of field: datebox, selectbox, textbox etc
+ * @param string $field_value The actual value
  * @uses bp_format_time() Formats a time value based on the WordPress date format setting
- * @return $field_value The formatted value
+ * @return string|bool The formatted value, or false if value is empty
  */
 function xprofile_format_profile_field( $field_type, $field_value ) {
 	if ( !isset( $field_value ) || empty( $field_value ) )
@@ -387,8 +387,8 @@ function xprofile_update_field_position( $field_id, $position, $field_group_id )
  * Setup the avatar upload directory for a user.
  *
  * @package BuddyPress Core
- * @param $directory The root directory name
- * @param $user_id The user ID.
+ * @param string $directory The root directory name. Optional.
+ * @param int $user_id The user ID. Optional.
  * @return array() containing the path and URL plus some other settings.
  */
 function xprofile_avatar_upload_dir( $directory = false, $user_id = 0 ) {
@@ -484,7 +484,7 @@ add_action( 'user_profile_update_errors', 'xprofile_sync_bp_profile', 10, 3 );
  * usermeta table that this component uses.
  *
  * @package BuddyPress XProfile
- * @param $user_id The ID of the deleted user
+ * @param int $user_id The ID of the deleted user
  */
 function xprofile_remove_data( $user_id ) {
 	BP_XProfile_ProfileData::delete_data_for_user( $user_id );
@@ -589,7 +589,7 @@ function bp_xprofile_update_meta( $object_id, $object_type, $meta_key, $meta_val
 	$meta_key = preg_replace( '|[^a-z0-9_]|i', '', $meta_key );
 
 	if ( is_string( $meta_value ) )
-		$meta_value = stripslashes( $wpdb->escape( $meta_value ) );
+		$meta_value = stripslashes( esc_sql( $meta_value ) );
 
 	$meta_value = maybe_serialize( $meta_value );
 
@@ -629,7 +629,7 @@ function bp_xprofile_update_fielddata_meta( $field_data_id, $meta_key, $meta_val
  * @package BuddyPress
  * @since BuddyPress (1.5)
  *
- * @return str The field name
+ * @return string The field name
  */
 function bp_xprofile_fullname_field_name() {
 	return apply_filters( 'bp_xprofile_fullname_field_name', BP_XPROFILE_FULLNAME_FIELD_NAME );
diff --git a/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-loader.php b/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-loader.php
index 85831e1353ca80f437150f8c0b5719137c8ad405..303026531a98f26874000f551571c2b3e238d965 100644
--- a/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-loader.php
+++ b/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-loader.php
@@ -46,7 +46,7 @@ class BP_XProfile_Component extends BP_Component {
 	/**
 	 * Include files
 	 */
-	function includes() {
+	public function includes( $includes = array() ) {
 		$includes = array(
 			'cssjs',
 			'cache',
@@ -76,7 +76,7 @@ class BP_XProfile_Component extends BP_Component {
 	 * @since BuddyPress (1.5)
 	 * @global BuddyPress $bp The one true BuddyPress instance
 	 */
-	function setup_globals() {
+	public function setup_globals( $args = array() ) {
 		global $bp;
 
 		// Define a slug, if necessary
@@ -145,7 +145,7 @@ class BP_XProfile_Component extends BP_Component {
 	 *
 	 * @global BuddyPress $bp The one true BuddyPress instance
 	 */
-	function setup_nav() {
+	public function setup_nav( $main_nav = array(), $sub_nav = array() ) {
 
 		$sub_nav = array();
 
@@ -210,7 +210,7 @@ class BP_XProfile_Component extends BP_Component {
 	 *
 	 * @global BuddyPress $bp The one true BuddyPress instance
 	 */
-	function setup_admin_bar() {
+	public function setup_admin_bar( $wp_admin_nav = array() ) {
 		global $bp;
 
 		// Prevent debug notices
diff --git a/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-template.php b/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-template.php
index c6ecda3ba314a5b6fd807c9d90400c9bfed3b32a..4370d5ffcf5b8255f448dd4dce63d72372d3f97b 100644
--- a/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-template.php
+++ b/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-template.php
@@ -387,6 +387,23 @@ function bp_the_profile_field_input_name() {
 		return apply_filters( 'bp_get_the_profile_field_input_name', 'field_' . $field->id . $array_box );
 	}
 
+/**
+ * Returns the action name for any signup errors related to this profile field
+ *
+ * In the registration templates, signup errors are pulled from the global
+ * object and rendered at actions that look like 'bp_field_12_errors'. This
+ * function allows the action name to be easily concatenated and called in the
+ * following fashion:
+ *   do_action( bp_get_the_profile_field_errors_action() );
+ *
+ * @since BuddyPress (1.8)
+ * @return string The _errors action name corresponding to this profile field
+ */
+function bp_get_the_profile_field_errors_action() {
+	global $field;
+	return 'bp_field_' . $field->id . '_errors';
+}
+
 /**
  * bp_the_profile_field_options()
  *
@@ -731,7 +748,14 @@ function bp_the_profile_field_visibility_level() {
 	function bp_get_the_profile_field_visibility_level() {
 		global $field;
 
-		$retval = !empty( $field->visibility_level ) ? $field->visibility_level : 'public';
+		// On the registration page, values stored in POST should take
+		// precedence over default visibility, so that submitted values
+		// are not lost on failure
+		if ( bp_is_register_page() && ! empty( $_POST['field_' . $field->id . '_visibility'] ) ) {
+			$retval = esc_attr( $_POST['field_' . $field->id . '_visibility'] );
+		} else {
+			$retval = ! empty( $field->visibility_level ) ? $field->visibility_level : 'public';
+		}
 
 		return apply_filters( 'bp_get_the_profile_field_visibility_level', $retval );
 	}
@@ -748,7 +772,15 @@ function bp_the_profile_field_visibility_level_label() {
 	function bp_get_the_profile_field_visibility_level_label() {
 		global $field;
 
-		$level  = !empty( $field->visibility_level ) ? $field->visibility_level : 'public';
+		// On the registration page, values stored in POST should take
+		// precedence over default visibility, so that submitted values
+		// are not lost on failure
+		if ( bp_is_register_page() && ! empty( $_POST['field_' . $field->id . '_visibility'] ) ) {
+			$level = esc_html( $_POST['field_' . $field->id . '_visibility'] );
+		} else {
+			$level = ! empty( $field->visibility_level ) ? $field->visibility_level : 'public';
+		}
+
 		$fields = bp_xprofile_get_visibility_levels();
 
 		return apply_filters( 'bp_get_the_profile_field_visibility_level_label', $fields[$level]['label'] );
diff --git a/wp-content/plugins/buddypress/readme.txt b/wp-content/plugins/buddypress/readme.txt
index 3eaa62127ae6e520998d04d151c6463fc49c3eea..5f22d07965406ceb5706914ca0552d64672988d2 100644
--- a/wp-content/plugins/buddypress/readme.txt
+++ b/wp-content/plugins/buddypress/readme.txt
@@ -3,7 +3,7 @@ Contributors: johnjamesjacoby, DJPaul, boonebgorges, r-a-y
 Tags: social networking, activity, profiles, messaging, friends, groups, forums, notifications, settings, twitter, facebook, social, community, networks, networking, cms
 Requires at least: 3.5
 Tested up to: 3.6
-Stable tag: 1.7.2
+Stable tag: 1.8.1
 License: GPLv2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 
@@ -77,6 +77,15 @@ BuddyPress is available in more than 20 languages. For more information, check o
 
 == Upgrade Notice ==
 
+= 1.8.1 =
+See: http://codex.buddypress.org/releases/version-1-8-1/
+
+= 1.8 =
+See: http://codex.buddypress.org/releases/version-1-8/
+
+= 1.7.3 =
+See: http://codex.buddypress.org/releases/version-1-7-3/
+
 = 1.7.2 =
 See: http://codex.buddypress.org/releases/version-1-7-2/
 
@@ -118,6 +127,12 @@ Fixes over 10 bugs.
 
 == Changelog ==
 
+= 1.8.1 =
+See: http://codex.buddypress.org/releases/version-1-8-1/
+
+= 1.8 =
+See: http://codex.buddypress.org/releases/version-1-8/
+
 = 1.7 =
 See: http://codex.buddypress.org/releases/version-1-7/