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 Description

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

Top ↑

Parameters Parameters


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


(array) (Required) Array of object terms.


(array) (Required) Array of term taxonomy IDs.


(string) (Required) Taxonomy slug.

Top ↑

Return Return

(bool) True on success, false on failure.

Source 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;

Top ↑

Changelog Changelog

Version Description
2.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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