bp_attachments_get_group_has_cover_image( int $group_id )
Does the group has a cover photo?
Description
Parameters
- $group_id
-
(Required) Group ID to check cover photo existence for.
Return
(bool) True if the group has a cover photo, false otherwise.
Source
File: bp-core/bp-core-attachments.php
function bp_attachments_get_group_has_cover_image( $group_id = 0 ) { if ( empty( $group_id ) ) { $group_id = bp_get_current_group_id(); } $cover_src = bp_attachments_get_attachment( 'url', array( 'object_dir' => 'groups', 'item_id' => $group_id, ) ); return (bool) apply_filters( 'bp_attachments_get_user_has_cover_image', $cover_src, $group_id ); }
Changelog
Version | Description |
---|---|
BuddyPress 2.4.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.