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
2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 | 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
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.