bp_groups_reset_cache_incrementor_on_group_term_remove( int $object_id, array $terms, string $taxonomy )

Reset cache incrementor for Groups component when a group’s taxonomy terms are removed.

Description

We infer that a group is being affected by looking at the objects belonging to the taxonomy being affected.

Parameters

$object_id

(Required) ID of the item whose terms are being modified.

$terms

(Required) Array of object terms.

$taxonomy

(Required) Taxonomy slug.

Return

(bool) True on success, false on failure.

Source

File: bp-groups/bp-groups-cache.php

function bp_groups_reset_cache_incrementor_on_group_term_remove( $object_id, $terms, $taxonomy ) {
	$tax_object = get_taxonomy( $taxonomy );
	if ( $tax_object && in_array( 'bp_group', $tax_object->object_type, true ) ) {
		return bp_groups_reset_cache_incrementor();
	}

	return false;
}

Changelog

Changelog
Version Description
BuddyPress 2.7.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.