diff --git src/bp-groups/bp-groups-template.php src/bp-groups/bp-groups-template.php
index 7b5687744..4ba18f121 100644
--- src/bp-groups/bp-groups-template.php
+++ src/bp-groups/bp-groups-template.php
@@ -896,7 +896,8 @@ function bp_group_avatar( $args = '', $group = false ) {
 				'id'      => false,
 				// translators: %1$s is the name of the group.
 				'alt'     => sprintf( __( 'Group logo of %1$s', 'buddypress' ), $group->name ),
-			)
+			),
+			'get_group_avatar'
 		);
 
 		// Fetch the avatar from the folder.
@@ -1017,7 +1018,7 @@ function bp_group_avatar_url( $group = false, $type = 'full' ) {
 	 * Returns the group avatar URL.
 	 *
 	 * @since 5.0.0
-	 * @since 10.0.0 Updated to use `bp_get_group_avatar`
+	 * @since 10.0.0 Updated to use `bp_get_group_avatar`.
 	 *
 	 * @param false|int|string|BP_Groups_Group $group (Optional) The Group ID, the Group Slug or the Group object.
 	 *                                                Default: false.
@@ -1111,9 +1112,13 @@ function bp_group_last_active( $group = false, $args = array() ) {
 			return '';
 		}
 
-		$r = bp_parse_args( $args, array(
-			'relative' => true,
-		), 'group_last_active' );
+		$r = bp_parse_args(
+			$args,
+			array(
+				'relative' => true,
+			),
+			'group_last_active'
+		);
 
 		$last_active = $group->last_activity;
 		if ( ! $last_active ) {
@@ -1136,8 +1141,8 @@ function bp_group_last_active( $group = false, $args = array() ) {
 			 * @since 1.0.0
 			 * @since 2.5.0 Added the `$group` parameter.
 			 *
-			 * @param string               $value Determined last active value for the current group.
-			 * @param BP_Groups_Group|null $group The group object.
+			 * @param string          $value Determined last active value for the current group.
+			 * @param BP_Groups_Group $group The group object.
 			 */
 			return apply_filters( 'bp_get_group_last_active', bp_core_time_since( $last_active ), $group );
 		}
@@ -1647,13 +1652,13 @@ function bp_is_group_creator( $group = false, $user_id = 0 ) {
 }
 
 /**
- * Output the avatar of the creator of the current group in the loop.
+ * Output the avatar of the creator of the group.
  *
  * @since 1.7.0
  *
- * @param object|bool $group Optional. Group object.
- *                           Default: current group in loop.
- * @param array       $args {
+ * @param false|int|string|BP_Groups_Group $group (Optional) The Group ID, the Group Slug or the Group object.
+ *                                                Default: false.
+ * @param array                            $args  {
  *     Array of optional arguments. See {@link bp_get_group_creator_avatar()}
  *     for description.
  * }
@@ -1662,13 +1667,14 @@ function bp_group_creator_avatar( $group = false, $args = array() ) {
 	echo bp_get_group_creator_avatar( $group, $args );
 }
 	/**
-	 * Return the avatar of the creator of the current group in the loop.
+	 * Return the avatar of the creator of the group.
 	 *
 	 * @since 1.7.0
+	 * @since 10.0.0 Updated to use `bp_get_group`.
 	 *
-	 * @param object|bool $group Optional. Group object.
-	 *                           Default: current group in loop.
-	 * @param array       $args {
+	 * @param false|int|string|BP_Groups_Group $group (Optional) The Group ID, the Group Slug or the Group object.
+     *                                                Default: false.
+	 * @param array                            $args  {
 	 *     Array of optional arguments. See {@link bp_core_fetch_avatar()}
 	 *     for detailed description of arguments.
 	 *     @type string $type   Default: 'full'.
@@ -1682,38 +1688,53 @@ function bp_group_creator_avatar( $group = false, $args = array() ) {
 	 * @return string
 	 */
 	function bp_get_group_creator_avatar( $group = false, $args = array() ) {
-		global $groups_template;
+		$group = bp_get_group( $group );
 
-		if ( empty( $group ) ) {
-			$group =& $groups_template->group;
+		if ( empty( $group->id ) ) {
+			return '';
 		}
 
-		$r = bp_parse_args( $args, array(
-			'type'   => 'full',
-			'width'  => false,
-			'height' => false,
-			'class'  => 'avatar',
-			'id'     => false,
-			'alt'    => sprintf(
-				/* translators: %s: group creator name */
-				__( 'Group creator profile photo of %s', 'buddypress' ),
-				bp_core_get_user_displayname( $group->creator_id )
+		$r = bp_parse_args(
+			$args,
+			array(
+				'type'   => 'full',
+				'width'  => false,
+				'height' => false,
+				'class'  => 'avatar',
+				'id'     => false,
+				'alt'    => sprintf(
+					/* translators: %s: group creator name */
+					__( 'Group creator profile photo of %s', 'buddypress' ),
+					bp_core_get_user_displayname( $group->creator_id )
+				),
 			),
-		), 'group_creator_avatar' );
-		extract( $r, EXTR_SKIP );
+			'group_creator_avatar'
+		);
 
-		$avatar = bp_core_fetch_avatar( array( 'item_id' => $group->creator_id, 'type' => $type, 'css_id' => $id, 'class' => $class, 'width' => $width, 'height' => $height, 'alt' => $alt ) );
+		$avatar = bp_core_fetch_avatar(
+			array(
+				'item_id' => $group->creator_id,
+				'type'    => $r['type'],
+				'css_id'  => $r['id'],
+				'class'   => $r['class'],
+				'width'   => $r['width'],
+				'height'  => $r['height'],
+				'alt'     => $r['alt'],
+			)
+		);
 
 		/**
-		 * Filters the avatar of the creator of the current group in the loop.
+		 * Filters the avatar of the creator of the group.
 		 *
 		 * @since 1.7.0
-		 * @since 2.5.0 Added the `$group` parameter.
+		 * @since 2.5.0  Added the `$group` parameter.
+		 * @since 10.0.0 Added the `$r` parameter.
 		 *
-		 * @param string $avatar Avatar of the group creator.
-		 * @param object $group  Group object.
+		 * @param string          $avatar Avatar of the group creator.
+		 * @param BP_Groups_Group $group  The group object.
+		 * @param array           $r      Array of parsed arguments for the group creator avatar.
 		 */
-		return apply_filters( 'bp_get_group_creator_avatar', $avatar, $group );
+		return apply_filters( 'bp_get_group_creator_avatar', $avatar, $group, $r );
 	}
 
 /**
@@ -1746,22 +1767,23 @@ function bp_group_is_mod() {
  * Output markup listing group admins.
  *
  * @since 1.0.0
+ * @since 10.0.0 Updated to use `bp_get_group`.
  *
- * @param object|bool $group Optional. Group object.
- *                           Default: current group in loop.
+ * @param false|int|string|BP_Groups_Group $group (Optional) The Group ID, the Group Slug or the Group object.
+ *                                                Default: false.
  */
 function bp_group_list_admins( $group = false ) {
-	global $groups_template;
-
-	if ( empty( $group ) ) {
-		$group =& $groups_template->group;
-	}
+	$group = bp_get_group( $group );
 
 	if ( ! empty( $group->admins ) ) { ?>
 		<ul id="group-admins">
-			<?php foreach( (array) $group->admins as $admin ) { ?>
+			<?php foreach ( (array) $group->admins as $admin ) { ?>
 				<li>
-					<a href="<?php echo bp_core_get_user_domain( $admin->user_id, $admin->user_nicename, $admin->user_login ) ?>" class="bp-tooltip" data-bp-tooltip="<?php printf( ('%s'),  bp_core_get_user_displayname( $admin->user_id ) ); ?>">
+					<a
+						href="<?php echo esc_url( bp_core_get_user_domain( $admin->user_id, $admin->user_nicename, $admin->user_login ) ); ?>"
+						class="bp-tooltip"
+						data-bp-tooltip="<?php printf( ( '%s' ), bp_core_get_user_displayname( $admin->user_id ) ); ?>"
+					>
 						<?php
 						echo bp_core_fetch_avatar(
 							array(
@@ -1780,34 +1802,34 @@ function bp_group_list_admins( $group = false ) {
 			<?php } ?>
 		</ul>
 	<?php } else { ?>
-		<span class="activity"><?php _e( 'No Admins', 'buddypress' ) ?></span>
+		<span class="activity">
+			<?php esc_html_e( 'No Admins', 'buddypress' ); ?>
+		</span>
 	<?php } ?>
-<?php
+	<?php
 }
 
 /**
  * Output markup listing group mod.
  *
  * @since 1.0.0
+ * @since 10.0.0 Updated to use `bp_get_group`.
  *
- * @param object|bool $group Optional. Group object.
- *                           Default: current group in loop.
+ * @param false|int|string|BP_Groups_Group $group (Optional) The Group ID, the Group Slug or the Group object.
+ *                                                Default: false.
  */
 function bp_group_list_mods( $group = false ) {
-	global $groups_template;
-
-	if ( empty( $group ) ) {
-		$group =& $groups_template->group;
-	}
-
-	if ( ! empty( $group->mods ) ) : ?>
+	$group = bp_get_group( $group );
 
+	if ( ! empty( $group->mods ) ) :
+		?>
 		<ul id="group-mods">
-
-			<?php foreach( (array) $group->mods as $mod ) { ?>
-
+			<?php foreach ( (array) $group->mods as $mod ) { ?>
 				<li>
-					<a href="<?php echo bp_core_get_user_domain( $mod->user_id, $mod->user_nicename, $mod->user_login ) ?>" class="bp-tooltip" data-bp-tooltip="<?php printf( ('%s'),  bp_core_get_user_displayname( $mod->user_id ) ); ?>">
+					<a
+						href="<?php echo esc_url( bp_core_get_user_domain( $mod->user_id, $mod->user_nicename, $mod->user_login ) ); ?>"
+						class="bp-tooltip"
+						data-bp-tooltip="<?php printf( ( '%s' ), bp_core_get_user_displayname( $mod->user_id ) ); ?>">
 						<?php
 						echo bp_core_fetch_avatar(
 							array(
@@ -1819,49 +1841,48 @@ function bp_group_list_mods( $group = false ) {
 									bp_core_get_user_displayname( $mod->user_id )
 								),
 							)
-						); ?>
+						);
+						?>
 					</a>
 				</li>
-
 			<?php } ?>
-
 		</ul>
-
-<?php else : ?>
-
-		<span class="activity"><?php _e( 'No Mods', 'buddypress' ) ?></span>
-
-<?php endif;
-
+	<?php else : ?>
+		<span class="activity">
+			<?php esc_html_e( 'No Mods', 'buddypress' ); ?>
+		</span>
+		<?php
+	endif;
 }
 
 /**
  * Return a list of user IDs for a group's admins.
  *
  * @since 1.5.0
+ * @since 10.0.0 Updated to use `bp_get_group`.
  *
- * @param BP_Groups_Group|bool $group     Optional. The group being queried. Defaults
- *                                        to the current group in the loop.
- * @param string               $format    Optional. 'string' to get a comma-separated string,
- *                                        'array' to get an array.
- * @return mixed               $admin_ids A string or array of user IDs.
+ * @param false|int|string|BP_Groups_Group $group (Optional) The Group ID, the Group Slug or the Group object.
+ *                                                Default: false.
+ * @param string                           $format (Optional) 'string' to get a comma-separated string,
+ *                                                 'array' to get an array.
+ * @return string|array|false A string or an array of user IDs, false if group does not exist.
  */
 function bp_group_admin_ids( $group = false, $format = 'string' ) {
-	global $groups_template;
+	$group = bp_get_group( $group );
 
-	if ( empty( $group ) ) {
-		$group =& $groups_template->group;
+	if ( empty( $group->id ) ) {
+		return false;
 	}
 
 	$admin_ids = array();
 
-	if ( $group->admins ) {
-		foreach( $group->admins as $admin ) {
+	if ( ! empty( $group->admins ) ) {
+		foreach ( $group->admins as $admin ) {
 			$admin_ids[] = $admin->user_id;
 		}
 	}
 
-	if ( 'string' == $format ) {
+	if ( 'string' == $format && ! empty( $admin_ids ) ) {
 		$admin_ids = implode( ',', $admin_ids );
 	}
 
@@ -1871,41 +1892,44 @@ function bp_group_admin_ids( $group = false, $format = 'string' ) {
 	 * This filter may return either an array or a comma separated string.
 	 *
 	 * @since 1.5.0
-	 * @since 2.5.0 Added the `$group` parameter.
+	 * @since 2.5.0  Added the `$group` parameter.
+	 * @since 10.0.0 Added the `$format` parameter.
 	 *
-	 * @param array|string $admin_ids List of user IDs for a group's admins.
-	 * @param object       $group     Group object.
+	 * @param array|string     $admin_ids List of user IDs for a group's admins.
+	 * @param BP_Groups_Group  $group     The group object.
+	 * @param string           $format    The filter used to format the results.
 	 */
-	return apply_filters( 'bp_group_admin_ids', $admin_ids, $group );
+	return apply_filters( 'bp_group_admin_ids', $admin_ids, $group, $format );
 }
 
 /**
  * Return a list of user IDs for a group's moderators.
  *
  * @since 1.5.0
+ * @since 10.0.0 Updated to use `bp_get_group`.
  *
- * @param BP_Groups_Group|bool $group   Optional. The group being queried.
- *                                      Defaults to the current group in the loop.
- * @param string               $format  Optional. 'string' to get a comma-separated string,
- *                                      'array' to get an array.
- * @return mixed               $mod_ids A string or array of user IDs.
+ * @param false|int|string|BP_Groups_Group $group (Optional) The Group ID, the Group Slug or the Group object.
+ *                                                Default: false.
+ * @param string                           $format (Optional) 'string' to get a comma-separated string,
+ *                                                 'array' to get an array.
+ * @return string|array|false A string or an array of user IDs, false if group does not exist.
  */
 function bp_group_mod_ids( $group = false, $format = 'string' ) {
-	global $groups_template;
+	$group = bp_get_group( $group );
 
-	if ( empty( $group ) ) {
-		$group =& $groups_template->group;
+	if ( empty( $group->id ) ) {
+		return false;
 	}
 
 	$mod_ids = array();
 
-	if ( $group->mods ) {
-		foreach( $group->mods as $mod ) {
+	if ( ! empty( $group->mods ) ) {
+		foreach ( $group->mods as $mod ) {
 			$mod_ids[] = $mod->user_id;
 		}
 	}
 
-	if ( 'string' == $format ) {
+	if ( 'string' == $format && ! empty( $mod_ids ) ) {
 		$mod_ids = implode( ',', $mod_ids );
 	}
 
@@ -1915,46 +1939,53 @@ function bp_group_mod_ids( $group = false, $format = 'string' ) {
 	 * This filter may return either an array or a comma separated string.
 	 *
 	 * @since 1.5.0
-	 * @since 2.5.0 Added the `$group` parameter.
+	 * @since 2.5.0  Added the `$group` parameter.
+	 * @since 10.0.0 Added the `$format` parameter.
 	 *
-	 * @param array|string $admin_ids List of user IDs for a group's moderators.
-	 * @param object       $group     Group object.
+	 * @param array|string     $mod_ids List of user IDs for a group's moderators.
+	 * @param BP_Groups_Group  $group   The group object.
+	 * @param string           $format  The filter used to format the results.
 	 */
-	return apply_filters( 'bp_group_mod_ids', $mod_ids, $group );
+	return apply_filters( 'bp_group_mod_ids', $mod_ids, $group, $format );
 }
 
 /**
- * Output the permalink of the current group's Members page.
+ * Output the permalink of a group's Members page.
  *
  * @since 1.0.0
+ * @since 10.0.0 Added the `$group` parameter.
+ *
+ * @param false|int|string|BP_Groups_Group $group (Optional) The Group ID, the Group Slug or the Group object.
+ *                                                Default: false.
  */
-function bp_group_all_members_permalink() {
-	echo bp_get_group_all_members_permalink();
+function bp_group_all_members_permalink( $group = false ) {
+	echo bp_get_group_all_members_permalink( $group );
 }
 	/**
-	 * Return the permalink of the Members page of the current group in the loop.
+	 * Return the permalink of the Members page of a group.
 	 *
 	 * @since 1.0.0
+	 * @since 10.0.0 Updated to use `bp_get_group`.
 	 *
-	 * @param object|bool $group Optional. Group object.
-	 *                           Default: current group in loop.
+	 * @param false|int|string|BP_Groups_Group $group (Optional) The Group ID, the Group Slug or the Group object.
+     *                                                Default: false.
 	 * @return string
 	 */
 	function bp_get_group_all_members_permalink( $group = false ) {
-		global $groups_template;
+		$group = bp_get_group( $group );
 
-		if ( empty( $group ) ) {
-			$group =& $groups_template->group;
+		if ( empty( $group->id ) ) {
+			return '';
 		}
 
 		/**
-		 * Filters the permalink of the Members page for the current group in the loop.
+		 * Filters the permalink of the Members page for a group.
 		 *
 		 * @since 1.0.0
 		 * @since 2.5.0 Added the `$group` parameter.
 		 *
-		 * @param string $value Permalink of the Members page for the current group.
-		 * @param object $group Group object.
+		 * @param string          $value Permalink of the Members page for a group.
+		 * @param BP_Groups_Group $group The group object.
 		 */
 		return apply_filters( 'bp_get_group_all_members_permalink', trailingslashit( bp_get_group_permalink( $group ) . 'members' ), $group );
 	}
@@ -2115,7 +2146,8 @@ function bp_groups_auto_join() {
  *
  * @since 1.0.0
  *
- * @param object|bool $group Optional. Group object. Default: current group in loop.
+ * @param false|int|string|BP_Groups_Group $group (Optional) The Group ID, the Group Slug or the Group object.
+ *                                                Default: false.
  */
 function bp_group_total_members( $group = false ) {
 	echo bp_get_group_total_members( $group );
@@ -2125,15 +2157,15 @@ function bp_group_total_members( $group = false ) {
 	 *
 	 * @since 1.0.0
 	 *
-	 * @param object|bool $group Optional. Group object.
-	 *                           Default: current group in loop.
+	 * @param false|int|string|BP_Groups_Group $group (Optional) The Group ID, the Group Slug or the Group object.
+     *                                                Default: false.
 	 * @return int
 	 */
 	function bp_get_group_total_members( $group = false ) {
-		global $groups_template;
+		$group = bp_get_group( $group );
 
-		if ( empty( $group ) ) {
-			$group =& $groups_template->group;
+		if ( empty( $group->id ) ) {
+			return 0;
 		}
 
 		/**
@@ -2142,10 +2174,10 @@ function bp_group_total_members( $group = false ) {
 		 * @since 1.0.0
 		 * @since 2.5.0 Added the `$group` parameter.
 		 *
-		 * @param int    $total_member_count Total member count for a group.
-		 * @param object $group              Group object.
+		 * @param int             $total_member_count Total member count for a group.
+		 * @param BP_Groups_Group $group              The group object.
 		 */
-		return apply_filters( 'bp_get_group_total_members', $group->total_member_count, $group );
+		return apply_filters( 'bp_get_group_total_members', (int) $group->total_member_count, $group );
 	}
 
 /**
@@ -2154,7 +2186,8 @@ function bp_group_total_members( $group = false ) {
  * @since 1.2.0
  * @since 7.0.0 Adds the `$group` optional parameter.
  *
- * @param object|bool $group Optional. Group object. Default: current group in loop.
+ * @param false|int|string|BP_Groups_Group $group (Optional) The Group ID, the Group Slug or the Group object.
+ *                                                Default: false.
  */
 function bp_group_member_count( $group = false ) {
 	echo bp_get_group_member_count( $group );
@@ -2163,57 +2196,66 @@ function bp_group_member_count( $group = false ) {
 	 * Generate the "x members" count string for a group.
 	 *
 	 * @since 1.2.0
+	 * @since 7.0.0  Adds the `$group` optional parameter.
+	 * @since 10.0.0 Updated to use `bp_get_group`.
 	 *
-	 * @since 7.0.0 Adds the `$group` optional parameter.
-	 *
-	 * @param object|bool $group Optional. Group object. Default: current group in loop.
+	 * @param false|int|string|BP_Groups_Group $group (Optional) The Group ID, the Group Slug or the Group object.
+     *                                                Default: false.
 	 * @return string
 	 */
 	function bp_get_group_member_count( $group = false ) {
-		global $groups_template;
+		$group = bp_get_group( $group );
 
-		if ( isset( $group->total_member_count ) ) {
-			$count = (int) $group->total_member_count;
-		} elseif ( isset( $groups_template->group->total_member_count ) ) {
-			$count = (int) $groups_template->group->total_member_count;
-		} else {
-			$count = 0;
+		if ( empty( $group->id ) ) {
+			return '';
 		}
 
-		$count_string = sprintf( _n( '%s member', '%s members', $count, 'buddypress' ), bp_core_number_format( $count ) );
+		$count        = (int) $group->total_member_count;
+		$count_string = sprintf(
+			// translators: %s: total member count for the group.
+			_n( '%s member', '%s members', $count, 'buddypress' ),
+			bp_core_number_format( $count )
+		);
 
 		/**
 		 * Filters the "x members" count string for a group.
 		 *
 		 * @since 1.2.0
+		 * @since 10.0.0 Added the `$group` paremeter.
 		 *
-		 * @param string $count_string The "x members" count string for a group.
+		 * @param string          $count_string The "x members" count string for a group.
+		 * @param BP_Groups_Group $group        The group object.
 		 */
-		return apply_filters( 'bp_get_group_member_count', $count_string );
+		return apply_filters( 'bp_get_group_member_count', $count_string, $group );
 	}
 
 /**
- * Output the URL of the Forum page of the current group in the loop.
+ * Output the URL of the Forum page of a group.
  *
  * @since 1.0.0
+ * @since 10.0.0 Adds the `$group` optional parameter.
+ *
+ * @param false|int|string|BP_Groups_Group $group (Optional) The Group ID, the Group Slug or the Group object.
+ *                                                Default: false.
  */
-function bp_group_forum_permalink() {
-	echo bp_get_group_forum_permalink();
+function bp_group_forum_permalink( $group = false ) {
+	echo bp_get_group_forum_permalink( $group );
 }
 	/**
 	 * Generate the URL of the Forum page of a group.
 	 *
 	 * @since 1.0.0
+	 * @since 10.0.0 Updated to use `bp_get_group`.
 	 *
-	 * @param object|bool $group Optional. Group object.
-	 *                           Default: current group in loop.
+	 * @param false|int|string|BP_Groups_Group $group (Optional) The Group ID, the Group Slug or the Group object.
+     *                                                Default: false.
 	 * @return string
 	 */
 	function bp_get_group_forum_permalink( $group = false ) {
-		global $groups_template;
+		$group = bp_get_group( $group );
 
-		if ( empty( $group ) ) {
-			$group =& $groups_template->group;
+		if ( empty( $group->id ) ) {
+			return '';
 		}
 
 		/**
@@ -2222,8 +2264,8 @@ function bp_group_forum_permalink() {
 		 * @since 1.0.0
 		 * @since 2.5.0 Added the `$group` parameter.
 		 *
-		 * @param string $value URL permalink for the Forum Page.
-		 * @param object $group Group object.
+		 * @param string          $value URL permalink for the Forum Page.
+		 * @param BP_Groups_Group $group The group object.
 		 */
 		return apply_filters( 'bp_get_group_forum_permalink', trailingslashit( bp_get_group_permalink( $group ) . 'forum' ), $group );
 	}
@@ -2232,39 +2274,29 @@ function bp_group_forum_permalink() {
  * Determine whether forums are enabled for a group.
  *
  * @since 1.0.0
+ * @since 10.0.0 Updated to use `bp_get_group`.
  *
- * @param object|bool $group Optional. Group object. Default: current group in loop.
+ * @param false|int|string|BP_Groups_Group $group (Optional) The Group ID, the Group Slug or the Group object.
+ *                                                Default: false.
  * @return bool
  */
 function bp_group_is_forum_enabled( $group = false ) {
-	global $groups_template;
-
-	if ( empty( $group ) ) {
-		$group =& $groups_template->group;
-	}
-
-	if ( ! empty( $group->enable_forum ) ) {
-		return true;
-	}
+	$group = bp_get_group( $group );
 
-	return false;
+	return ! empty( $group->enable_forum );
 }
 
 /**
  * Output the 'checked' attribute for the group forums settings UI.
  *
  * @since 1.0.0
+ * @since 10.0.0 Updated to use `bp_group_is_forum_enabled`.
  *
- * @param object|bool $group Optional. Group object. Default: current group in loop.
+ * @param false|int|string|BP_Groups_Group $group (Optional) The Group ID, the Group Slug or the Group object.
+ *                                                Default: false.
  */
 function bp_group_show_forum_setting( $group = false ) {
-	global $groups_template;
-
-	if ( empty( $group ) ) {
-		$group =& $groups_template->group;
-	}
-
-	if ( $group->enable_forum ) {
+	if ( bp_group_is_forum_enabled( $group ) ) {
 		echo ' checked="checked"';
 	}
 }
@@ -2273,18 +2305,16 @@ function bp_group_show_forum_setting( $group = false ) {
  * Output the 'checked' attribute for a given status in the settings UI.
  *
  * @since 1.0.0
+ * @since 10.0.0 Updated to use `bp_get_group`.
  *
- * @param string      $setting Group status. 'public', 'private', 'hidden'.
- * @param object|bool $group   Optional. Group object. Default: current group in loop.
+ * @param string                           $setting Group status: 'public', 'private', 'hidden'.
+ * @param false|int|string|BP_Groups_Group $group (Optional) The Group ID, the Group Slug or the Group object.
+ *                                                Default: false.
  */
 function bp_group_show_status_setting( $setting, $group = false ) {
-	global $groups_template;
-
-	if ( empty( $group ) ) {
-		$group =& $groups_template->group;
-	}
+	$group = bp_get_group( $group );
 
-	if ( $setting == $group->status ) {
+	if ( ! empty( $group->status ) && $setting === $group->status ) {
 		echo ' checked="checked"';
 	}
 }
@@ -2294,16 +2324,14 @@ function bp_group_show_status_setting( $setting, $group = false ) {
  *
  * @since 1.5.0
  *
- * @param string      $setting The setting you want to check against ('members',
- *                             'mods', or 'admins').
- * @param object|bool $group   Optional. Group object. Default: current group in loop.
+ * @param string                           $setting The setting you want to check against ('members', 'mods', or 'admins').
+ * @param false|int|string|BP_Groups_Group $group   (Optional) The Group ID, the Group Slug or the Group object.
+ *                                                   Default: false.
  */
 function bp_group_show_invite_status_setting( $setting, $group = false ) {
-	$group_id = isset( $group->id ) ? $group->id : false;
-
-	$invite_status = bp_group_get_invite_status( $group_id );
+	$invite_status = bp_group_get_invite_status( $group );
 
-	if ( $setting == $invite_status ) {
+	if ( ! empty( $invite_status ) && $setting === $invite_status ) {
 		echo ' checked="checked"';
 	}
 }
@@ -2320,35 +2348,32 @@ function bp_group_show_invite_status_setting( $setting, $group = false ) {
  * This function can be used either in or out of the loop.
  *
  * @since 1.5.0
+ * @since 10.0.0 Updated to use `bp_get_group`.
  *
- * @param int|bool $group_id Optional. The ID of the group whose status you want to
- *                           check. Default: the displayed group, or the current group
- *                           in the loop.
+ * @param false|int|string|BP_Groups_Group $group (Optional) The Group ID, the Group Slug or the Group object.
+ *                                                Default: false.
  * @return bool|string Returns false when no group can be found. Otherwise
  *                     returns the group invite status, from among 'members',
  *                     'mods', and 'admins'.
  */
-function bp_group_get_invite_status( $group_id = false ) {
-	global $groups_template;
+function bp_group_get_invite_status( $group = false ) {
+	$group = bp_get_group( $group );
 
-	if ( !$group_id ) {
+	if ( empty( $group->id ) ) {
 		$bp = buddypress();
 
-		if ( isset( $bp->groups->current_group->id ) ) {
-			// Default to the current group first.
-			$group_id = $bp->groups->current_group->id;
-		} elseif ( isset( $groups_template->group->id ) ) {
-			// Then see if we're in the loop.
-			$group_id = $groups_template->group->id;
+		// Default to the current group first.
+		if ( ! empty( $bp->groups->current_group->id ) ) {
+			$group = $bp->groups->current_group;
 		} else {
 			return false;
 		}
 	}
 
-	$invite_status = groups_get_groupmeta( $group_id, 'invite_status' );
+	$invite_status = groups_get_groupmeta( $group->id, 'invite_status' );
 
 	// Backward compatibility. When 'invite_status' is not set, fall back to a default value.
-	if ( !$invite_status ) {
+	if ( ! $invite_status ) {
 		$invite_status = apply_filters( 'bp_group_invite_status_fallback', 'members' );
 	}
 
@@ -2358,11 +2383,13 @@ function bp_group_get_invite_status( $group_id = false ) {
 	 * Invite status in this case means who from the group can send invites.
 	 *
 	 * @since 1.5.0
+	 * @since 10.0.0 Added the `$group` paremeter.
 	 *
-	 * @param string $invite_status Membership level needed to send an invite.
-	 * @param int    $group_id      ID of the group whose status is being checked.
+	 * @param string          $invite_status Membership level needed to send an invite.
+	 * @param int             $group_id      ID of the group whose status is being checked.
+	 * @param BP_Groups_Group $group         The group object.
 	 */
-	return apply_filters( 'bp_group_get_invite_status', $invite_status, $group_id );
+	return apply_filters( 'bp_group_get_invite_status', $invite_status, $group->id, $group );
 }
 
 /**
@@ -2626,15 +2653,17 @@ function bp_group_mod_memberlist( $admin_list = false, $group = false ) {
  * Determine whether a group has moderators.
  *
  * @since 1.0.0
+ * @since 10.0.0 Updated to use `bp_get_group`.
  *
- * @param object|bool $group Optional. Group object. Default: current group in loop.
+ * @param false|int|string|BP_Groups_Group $group (Optional) The Group ID, the Group Slug or the Group object.
+ *                                                Default: false.
  * @return array Info about group admins (user_id + date_modified).
  */
 function bp_group_has_moderators( $group = false ) {
-	global $groups_template;
+	$group = bp_get_group( $group );
 
-	if ( empty( $group ) ) {
-		$group =& $groups_template->group;
+	if ( empty( $group->id ) ) {
+		return array();
 	}
 
 	/**
@@ -2643,8 +2672,8 @@ function bp_group_has_moderators( $group = false ) {
 	 * @since 1.0.0
 	 * @since 2.5.0 Added the `$group` parameter.
 	 *
-	 * @param array  $value Array of user IDs who are a moderator of the provided group.
-	 * @param object $group Group object.
+	 * @param array           $value Array of user IDs who are a moderator of the provided group.
+	 * @param BP_Groups_Group $group The group object.
 	 */
 	return apply_filters( 'bp_group_has_moderators', groups_get_group_mods( $group->id ), $group );
 }
diff --git src/bp-groups/classes/class-bp-groups-member.php src/bp-groups/classes/class-bp-groups-member.php
index a442ce932..738a8aa8b 100644
--- src/bp-groups/classes/class-bp-groups-member.php
+++ src/bp-groups/classes/class-bp-groups-member.php
@@ -1188,7 +1188,6 @@ class BP_Groups_Member {
 	 * @return array Info about group mods (user_id + date_modified).
 	 */
 	public static function get_group_moderator_ids( $group_id ) {
-		global $wpdb;
 
 		if ( empty( $group_id ) ) {
 			return array();
diff --git tests/phpunit/testcases/groups/functions/get-group.php tests/phpunit/testcases/groups/functions/get-group.php
new file mode 100644
index 000000000..c86240832
--- /dev/null
+++ tests/phpunit/testcases/groups/functions/get-group.php
@@ -0,0 +1,67 @@
+<?php
+
+/**
+ * @group groups
+ * @group functions
+ */
+class BP_Tests_Get_Groups_Param extends BP_UnitTestCase {
+
+	public function setUp() {
+		parent::setUp();
+
+		if ( isset( $GLOBALS['groups_template'] ) ) {
+			$this->groups_template = $GLOBALS['groups_template'];
+		}
+	}
+
+	public function tearDown() {
+		if ( $this->groups_template ) {
+			$GLOBALS['groups_template'] = $this->groups_template;
+		}
+
+		parent::tearDown();
+	}
+
+	public function test_bp_get_group_with_no_group() {
+		$this->assertFalse( bp_get_group() );
+		$this->assertFalse( bp_get_group_by( 'id', 0 ) );
+	}
+
+	public function test_bp_get_group_with_id() {
+		$g = $this->factory->group->create();
+
+		$this->assertSame( $g, bp_get_group( $g )->id );
+		$this->assertSame( $g, bp_get_group_by( 'id', $g )->id );
+		$this->assertSame( $g, bp_get_group_by( 'ID', $g )->id );
+	}
+
+	public function test_bp_get_group_with_slug() {
+		$slug = 'test-group';
+		$g    = $this->factory->group->create( array( 'slug' => $slug ) );
+		$g1   = bp_get_group( $slug );
+
+		$this->assertSame( $g, $g1->id );
+		$this->assertSame( $slug, $g1->slug );
+
+		$g2 = bp_get_group_by( 'slug', $slug );
+
+		$this->assertSame( $g, $g2->id );
+		$this->assertSame( $slug, $g2->slug );
+	}
+
+	public function test_bp_get_group_with_object() {
+		$g = $this->factory->group->create_and_get();
+
+		$this->assertSame( $g->id, bp_get_group( $g )->id );
+	}
+
+	public function test_bp_get_group_from_groups_template() {
+		$g = $this->factory->group->create( array( 'status' => 'private' ) );
+
+		// Fake the current group.
+		$GLOBALS['groups_template'] = new stdClass;
+		$GLOBALS['groups_template']->group = groups_get_group( $g );
+
+		$this->assertSame( $g, bp_get_group()->id );
+	}
+}
diff --git tests/phpunit/testcases/groups/template.php tests/phpunit/testcases/groups/template.php
index 489bf8134..af1e8159c 100644
--- tests/phpunit/testcases/groups/template.php
+++ tests/phpunit/testcases/groups/template.php
@@ -4,6 +4,23 @@
  * @group template
  */
 class BP_Tests_Groups_Template extends BP_UnitTestCase {
+
+	public function setUp() {
+		parent::setUp();
+
+		if ( isset( $GLOBALS['groups_template'] ) ) {
+			$this->groups_template = $GLOBALS['groups_template'];
+		}
+	}
+
+	public function tearDown() {
+		if ( $this->groups_template ) {
+			$GLOBALS['groups_template'] = $this->groups_template;
+		}
+
+		parent::tearDown();
+	}
+
 	/**
 	 * Integration test to make sure meta_query is getting passed through
 	 *
@@ -949,55 +966,62 @@ class BP_Tests_Groups_Template extends BP_UnitTestCase {
 		$this->set_current_user( $old_user );
 	}
 
+	/**
+	 * @group bp_group_is_forum_enabled
+	 */
+	public function test_bp_group_is_forum_enabled() {
+		$g1 = $this->factory->group->create( array( 'enable_forum' => 0 ) );
+		$g2 = $this->factory->group->create( array( 'enable_forum' => 1 ) );
+
+		$this->assertFalse( bp_group_is_forum_enabled( $g1 ) );
+		$this->assertTrue( bp_group_is_forum_enabled( $g2 ) );
+	}
+
 	/**
 	 * @group bp_get_group_member_count
 	 */
 	public function test_bp_get_group_member_count_0_members() {
-		global $groups_template;
-		$gt = $groups_template;
-		$groups_template = new stdClass;
-		$groups_template->group = new stdClass;
-		$groups_template->group->total_member_count = 0;
+		$u = $this->factory->user->create();
+		$g = $this->factory->group->create( array( 'creator_id' => $u ) );
 
-		$found = bp_get_group_member_count();
+		// Fake the current group.
+		$GLOBALS['groups_template'] = new stdClass;
+		$GLOBALS['groups_template']->group = groups_get_group( $g );
 
-		$groups_template = $gt;
+		// Kick group creator.
+		wp_delete_user( $u );
 
-		$this->assertSame( '0 members', $found );
+		$this->assertNotSame( '0 member', bp_get_group_member_count() );
 	}
 
 	/**
 	 * @group bp_get_group_member_count
 	 */
 	public function test_bp_get_group_member_count_1_member() {
-		global $groups_template;
-		$gt = $groups_template;
-		$groups_template = new stdClass;
-		$groups_template->group = new stdClass;
-		$groups_template->group->total_member_count = 1;
-
-		$found = bp_get_group_member_count();
+		$g = $this->factory->group->create();
 
-		$groups_template = $gt;
+		// Fake the current group.
+		$GLOBALS['groups_template'] = new stdClass;
+		$GLOBALS['groups_template']->group = groups_get_group( $g );
 
-		$this->assertSame( '1 member', $found );
+		$this->assertSame( '1 member', bp_get_group_member_count() );
 	}
 
 	/**
 	 * @group bp_get_group_member_count
 	 */
 	public function test_bp_get_group_member_count_2_members() {
-		global $groups_template;
-		$gt = $groups_template;
-		$groups_template = new stdClass;
-		$groups_template->group = new stdClass;
-		$groups_template->group->total_member_count = 2;
+		$u1 = $this->factory->user->create();
+		$u2 = $this->factory->user->create();
+		$g  = $this->factory->group->create( array( 'creator_id' => $u1 ) );
 
-		$found = bp_get_group_member_count();
+		$this->add_user_to_group( $u2, $g );
 
-		$groups_template = $gt;
+		// Fake the current group.
+		$GLOBALS['groups_template'] = new stdClass;
+		$GLOBALS['groups_template']->group = groups_get_group( $g );
 
-		$this->assertSame( '2 members', $found );
+		$this->assertSame( '2 members', bp_get_group_member_count() );
 	}
 
 	/**
diff --git tests/phpunit/testcases/groups/template/group-is-visible.php tests/phpunit/testcases/groups/template/group-is-visible.php
new file mode 100644
index 000000000..c1f78148b
--- /dev/null
+++ tests/phpunit/testcases/groups/template/group-is-visible.php
@@ -0,0 +1,117 @@
+<?php
+
+/**
+ * @group groups
+ * @group template
+ */
+class BP_Tests_Groups_Template_Is_Visible extends BP_UnitTestCase {
+
+	public function setUp() {
+		parent::setUp();
+
+		if ( isset( $GLOBALS['groups_template'] ) ) {
+			$this->groups_template = $GLOBALS['groups_template'];
+		}
+	}
+
+	public function tearDown() {
+		if ( $this->groups_template ) {
+			$GLOBALS['groups_template'] = $this->groups_template;
+		}
+
+		parent::tearDown();
+	}
+
+	public function test_bp_group_is_visible_no_member() {
+		$g = $this->factory->group->create( array( 'status' => 'private' ) );
+
+		$this->assertFalse( bp_group_is_visible( $g ) );
+	}
+
+	public function test_bp_group_is_visible_regular_member() {
+		$g = $this->factory->group->create( array( 'status' => 'private' ) );
+		$u = $this->factory->user->create();
+
+		$this->set_current_user( $u );
+
+		$this->assertFalse( bp_group_is_visible( $g ) );
+	}
+
+	public function test_bp_group_is_visible_regular_member_from_group() {
+		$g = $this->factory->group->create( array( 'status' => 'private' ) );
+		$u = $this->factory->user->create();
+
+		$this->set_current_user( $u );
+
+		$this->add_user_to_group( $u, $g );
+
+		$this->assertTrue( bp_group_is_visible( $g ) );
+	}
+
+	public function test_bp_group_is_visible_invalid_group() {
+		$u = $this->factory->user->create();
+
+		// Empty the current group.
+		$GLOBALS['groups_template'] = new stdClass;
+		$GLOBALS['groups_template']->group = null;
+
+		$this->set_current_user( $u );
+
+		$this->assertFalse( bp_group_is_visible() );
+	}
+
+	public function test_bp_group_is_visible_admin() {
+		$g = $this->factory->group->create( array( 'status' => 'private' ) );
+		$u = $this->factory->user->create( array( 'role' => 'administrator' ) );
+
+		$this->set_current_user( $u );
+
+		$this->assertTrue( bp_group_is_visible( $g ) );
+	}
+
+	public function test_bp_group_is_visible_using_user_id() {
+		$g = $this->factory->group->create( array( 'status' => 'hidden' ) );
+		$u = $this->factory->user->create();
+
+		$this->add_user_to_group( $u, $g );
+
+		$this->assertTrue( bp_group_is_visible( $g, $u ) );
+	}
+
+	public function test_bp_group_is_not_visible_using_user_id() {
+		$g = $this->factory->group->create( array( 'status' => 'private' ) );
+		$u = $this->factory->user->create();
+
+		$this->assertFalse( bp_group_is_visible( $g, $u ) );
+	}
+
+	public function test_bp_group_is_visible_with_group_slug() {
+		$slug = 'test-group';
+
+		$this->factory->group->create(
+			array(
+				'status' => 'private',
+				'slug'   => $slug,
+			)
+		);
+
+		$u = $this->factory->user->create( array( 'role' => 'administrator' ) );
+
+		$this->set_current_user( $u );
+
+		$this->assertTrue( bp_group_is_visible( $slug ) );
+	}
+
+	public function test_bp_group_is_visible_from_current_group() {
+		$g = $this->factory->group->create( array( 'status' => 'private' ) );
+		$u = $this->factory->user->create( array( 'role' => 'administrator' ) );
+
+		// Fake the current group.
+		$GLOBALS['groups_template'] = new stdClass;
+		$GLOBALS['groups_template']->group = groups_get_group( $g );
+
+		$this->set_current_user( $u );
+
+		$this->assertTrue( bp_group_is_visible() );
+	}
+}
