bp_activity_follow_reset_cache_incrementor( object $follow )
Clear cached data for deleted users and reset incrementor.
Description
Parameters
- $follow
-
(Required) Follow object.
Source
File: bp-activity/bp-activity-cache.php
function bp_activity_follow_reset_cache_incrementor( $follow ) { if ( ! empty( $follow->leader_id ) ) { wp_cache_delete( 'bp_total_follower_for_user_' . $follow->leader_id, 'bp' ); wp_cache_delete( 'bp_total_following_for_user_' . $follow->leader_id, 'bp' ); } if ( ! empty( $follow->follower_id ) ) { wp_cache_delete( 'bp_total_follower_for_user_' . $follow->follower_id, 'bp' ); wp_cache_delete( 'bp_total_following_for_user_' . $follow->follower_id, 'bp' ); } return bp_core_reset_incrementor( 'bp_activity_follow' ); }
Changelog
Version | Description |
---|---|
BuddyBoss 1.1.7 | 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.