albums_get_album( int $album_id )
Fetch a single album object.
Description
When calling up a album object, you should always use this function instead of instantiating BP_Media_Album directly, so that you will inherit cache support and pass through the albums_get_album filter.
Parameters
- $album_id
-
(Required) ID of the album.
Return
(BP_Media_Album) $album The album object.
Source
File: bp-media/bp-media-functions.php
function albums_get_album( $album_id ) {
$album = new BP_Media_Album( $album_id );
/**
* Filters a single album object.
*
* @since BuddyBoss 1.0.0
*
* @param BP_Media_Album $album Single album object.
*/
return apply_filters( 'albums_get_album', $album );
}
Changelog
| Version | Description |
|---|---|
| BuddyBoss 1.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.