bp_friends_delete_activity_on_user_delete( int $user_id )

Deletes friendship activity items when a user is deleted.


Parameters Parameters

$user_id

(int) (Required) The ID of the user being deleted.


Source Source

File: bp-friends/bp-friends-activity.php

function bp_friends_delete_activity_on_user_delete( $user_id = 0 ) {
	if ( ! bp_is_active( 'activity' ) ) {
		return;
	}

	bp_activity_delete( array(
		'component'         => buddypress()->friends->id,
		'type'              => 'friendship_created',
		'secondary_item_id' => $user_id
	) );
}


Top ↑

Changelog Changelog

Changelog
Version Description
2.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.