bp_media_clear_media_user_object_cache( object $media )
Clear a user’s cached media count.
Description
Parameters
- $media
-
(Required) Media object item.
Source
File: bp-media/bp-media-cache.php
61 62 63 64 65 66 67 68 69 70 71 72 | function bp_media_clear_media_user_object_cache( $r ) { if ( ! empty ( $r [0] ) && is_object ( $r [0] ) ) { $user_id = ! empty ( $r [0]->user_id ) ? $r [0]->user_id : false; } else { $user_id = ! empty ( $r [ 'user_id' ] ) ? $r [ 'user_id' ] : false; } if ( $user_id ) { wp_cache_delete( 'bp_total_media_for_user_' . $user_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.