bp_album_delete( array|string $args )

Delete album item.

Description

Parameters

$args

(Required) To delete specific album items, use $args = array( 'id' => $ids ); Otherwise, to use filters for item deletion, the argument format is the same as BP_Media_Album::get(). See that method for a description.

Return

(bool) True on Success. False on error.

Source

File: bp-media/bp-media-functions.php

1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
function bp_album_delete( $album_id ) {
 
    $delete = BP_Media_Album::delete( array( 'id' => $album_id ) );
 
    if ( ! $delete ) {
        return false;
    }
 
    /**
     * Fires at the end of the execution of delete an album item
     *
     * @since BuddyBoss 1.0.0
     *
     * @param int $album_id ID of album
     */
    do_action( 'bp_album_delete', $album_id );
 
    return $album_id;
}

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.