friends_delete_activity( array $args )
Delete an activity item related to the Connections component.
Description
Parameters
- $args
-
(Required) An array of arguments for the item to delete.
- 'item_id'
(int) ID of the 'item' associated with the activity item. For Connections activity items, this is usually the user ID of one of the friends. - 'type'
(string) The 'type' of the activity item (eg 'friendship_accepted'). - 'user_id'
(int) ID of the user associated with the activity item.
- 'item_id'
Return
(bool) True on success, false on failure.
Source
File: bp-friends/bp-friends-activity.php
function friends_delete_activity( $args ) { if ( ! bp_is_active( 'activity' ) ) { return; } bp_activity_delete_by_item_id( array( 'component' => buddypress()->friends->id, 'item_id' => $args['item_id'], 'type' => $args['type'], 'user_id' => $args['user_id'] ) ); }
Changelog
Version | Description |
---|---|
BuddyPress 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.