BP_Group_Export::additional_group_items_delete( $group_id )

Delete group avatar and cover photo.

Description

Parameters

$group_id

(Required)

Source

File: bp-core/gdpr/class-bp-group-export.php

214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
function additional_group_items_delete( $group_id ) {
 
    /**
     * @todo add title/description
     *
     * @since BuddyBoss 1.0.0
     */
    do_action( 'buddyboss_bp_gdpr_group_additional_group_items_delete', $group_id );
 
    // delete cover photo
    bp_attachments_delete_file( array(
        'item_id'    => $group_id,
        'object_dir' => 'groups',
        'type'       => 'cover-image',
    ) );
 
    // delete group avatar
    bp_core_delete_existing_avatar( array( 'item_id' => $group_id, 'object' => "group" ) );
 
}

Changelog

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.