bp_groups_reset_cache_incrementor_on_group_term_change( int $object_id, array $terms, array $tt_ids, string $taxonomy )

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

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.

$tt_ids

(Required) Array of term taxonomy IDs.

$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_change( $object_id, $terms, $tt_ids, $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.