groups_get_slug( int $group_id )
Get a group slug by its ID.
Description
Parameters
- $group_id
-
(Required) The numeric ID of the group.
Return
(string) The group's slug.
Source
File: bp-groups/bp-groups-functions.php
function groups_get_slug( $group_id ) {
$group = groups_get_group( $group_id );
return !empty( $group->slug ) ? $group->slug : '';
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 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.