xprofile_clear_profile_field_object_cache( BP_XProfile_Field $field_obj )

Clear caches when a field object is modified.

Description

Parameters

$field_obj

(BP_XProfile_Field) (Required) Field object cache to delete.

Source

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

function xprofile_clear_profile_field_object_cache( $field_obj ) {

	// Clear default visibility level cache.
	wp_cache_delete( 'default_visibility_levels', 'bp_xprofile' );

	// Modified fields can alter parent group status, in particular when
	// the group goes from empty to non-empty. Bust its cache, as well as
	// the global 'all' cache.
	wp_cache_delete( 'all',                'bp_xprofile_groups' );
	wp_cache_delete( $field_obj->group_id, 'bp_xprofile_groups' );
}

Changelog

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