bp_dd_delete_avatar( $args )
Delete avatar of group and user
Description
Parameters
- $args
-
(Required)
Source
File: bp-core/bp-core-filters.php
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 | function bp_dd_delete_avatar( $args ) { $item_id = ! empty ( $args [ 'item_id' ] ) ? absint( $args [ 'item_id' ] ) : 0; if ( ! empty ( $item_id ) ) { // check for user avatars getting deleted if ( isset( $args [ 'object' ] ) && 'user' == $args [ 'object' ] ) { bp_delete_user_meta( $item_id , 'avatars' ); } // check for group avatars getting deleted if ( isset( $args [ 'object' ] ) && 'group' == $args [ 'object' ] ) { groups_delete_groupmeta( $item_id , 'avatars' ); } } } |
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.