Clear fullname_field_id cache when bp-xprofile-fullname-field-name is updated.


Note for future developers: Dating from an early version of BuddyPress where the fullname field (field #1) did not have a title that was editable in the normal Profile Fields admin interface, we have the bp-xprofile-fullname-field-name option. In many places throughout BuddyPress, the ID of the fullname field is queried using this setting. However, this is no longer strictly necessary, because we essentially hardcode (in the xprofile admin save routine, as well as the xprofile schema definition) that the fullname field will be 1. The presence of the non-hardcoded versions (and thus this bit of cache invalidation) is thus for backward compatibility only.


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

function xprofile_clear_fullname_field_id_cache() {
	wp_cache_delete( 'fullname_field_id', 'bp_xprofile' );


Version Description
BuddyPress 2.0.0 Introduced.


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.