bp_get_group_member_count()

Generate the “x members” count string for a group.

Description

Return

(string)

Source

File: bp-groups/bp-groups-template.php

	function bp_get_group_member_count() {
		global $groups_template;

		if ( isset( $groups_template->group->total_member_count ) ) {
			$count = (int) $groups_template->group->total_member_count;
		} else {
			$count = 0;
		}

		$count_string = sprintf( _n( '%s member', '%s members', $count, 'buddyboss' ), bp_core_number_format( $count ) );

		/**
		 * Filters the "x members" count string for a group.
		 *
		 * @since BuddyPress 1.2.0
		 *
		 * @param string $count_string The "x members" count string for a group.
		 */
		return apply_filters( 'bp_get_group_member_count', $count_string );
	}

Changelog

Changelog
Version Description
BuddyPress 1.2.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.