bp_get_group_status_description( object|bool $group = false )
Get the status description of the current group in the loop.
Description
Parameters
- $group
-
(Optional) Group object. Default: current group in loop.
Default value: false
Return
(string)
Source
File: bp-groups/bp-groups-template.php
function bp_get_group_status_description( $group = false ) { global $groups_template; if ( empty( $group ) ) { $group =& $groups_template->group; } if ( 'public' == $group->status ) { $description = __( 'This group\'s content, including its members and activity, are visible to any site member.', 'buddyboss' ); } elseif ( 'hidden' == $group->status ) { $description = __( 'Only group members can view its content, including its members and activity.', 'buddyboss' ); } elseif ( 'private' == $group->status ) { $description = __( 'This group\'s content is only visible to members of the group.', 'buddyboss' ); } else { $description = ucwords( $group->status ) . ' ' . __( 'Group', 'buddyboss' ); } /** * Filters the status description of the current group in the loop. * * @since BuddyBoss 1.0.0 * * @param string $description Status description of the current group in the loop. * @param object $group Group object. */ return apply_filters( 'bp_get_group_status_description', $description, $group ); }
Changelog
Version | Description |
---|---|
BuddyBoss 1.0.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.