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 Description


Parameters Parameters

$group

(Optional) Group data object. Default: the current group in the groups loop.

Default value: false


Top ↑

Return Return

(bool) True if the user has an outstanding invite, otherwise false.


Top ↑

Source 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 2.1.0
	 * @since 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 );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.