bp_get_current_group_id()
Returns the ID of the current group.
Description Description
Return Return
(int) $current_group_id The id of the current group, if there is one.
Source Source
File: bp-groups/bp-groups-template.php
function bp_get_current_group_id() { $current_group = groups_get_current_group(); $current_group_id = isset( $current_group->id ) ? (int) $current_group->id : 0; /** * Filters the ID of the current group. * * @since 1.5.0 * * @param int $current_group_id ID of the current group. * @param object $current_group Instance holding the current group. */ return apply_filters( 'bp_get_current_group_id', $current_group_id, $current_group ); }
Changelog Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |