bp_group_is_invited( object|bool $group = false )
Check whether the current user has an outstanding invite to the current group in the loop.
Description
Parameters
- $group
-
(Optional) Group data object. Default: the current group in the groups loop.
Default value: false
Return
(bool) True if the user has an outstanding invite, otherwise false.
Source
File: bp-groups/bp-groups-template.php
function bp_group_is_invited( $group = false ) {
global $groups_template;
if ( empty( $group ) ) {
$group =& $groups_template->group;
}
/**
* Filters whether current user has an outstanding invite to current group in loop.
*
* @since BuddyPress 2.1.0
* @since BuddyPress 2.5.0 Added the `$group` parameter.
*
* @param bool $is_invited If user has an outstanding group invite.
* @param object $group Group object.
*/
return apply_filters( 'bp_group_is_invited', ! empty( $group->is_invited ), $group );
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 2.1.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.