bp_media_clear_media_group_object_cache( object $media )
Clear a group’s cached media count.
Description
Parameters
- $media
-
(Required) Media object item.
Source
File: bp-media/bp-media-cache.php
function bp_media_clear_media_group_object_cache( $r ) { if ( ! empty( $r[0] ) && is_object( $r[0] ) ) { $group_id = ! empty( $r[0]->group_id ) ? $r[0]->group_id : false; } else { $group_id = ! empty( $r['group_id'] ) ? $r['group_id'] : false; } if ( $group_id ) { wp_cache_delete( 'bp_total_media_for_group_' . $group_id, 'bp' ); } }
Changelog
Version | Description |
---|---|
BuddyBoss 1.1.5 | 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.