Ticket #7920: 7920.01.patch
File 7920.01.patch, 1.3 KB (added by , 5 years ago) |
---|
-
src/bp-friends/bp-friends-activity.php
409 409 ) ); 410 410 } 411 411 add_action( 'friends_remove_data', 'bp_friends_delete_activity_on_user_delete' ); 412 413 /** 414 * Remove friendship activity item when a friendship is deleted. 415 * 416 * @since 3.2.0 417 * 418 * @param int $friendship_id ID of the friendship. 419 */ 420 function bp_friends_delete_activity_on_friendship_delete( $friendship_id ) { 421 friends_delete_activity( array( 'item_id' => $friendship_id, 'type' => 'friendship_created', 'user_id' => 0 ) ); 422 } 423 add_action( 'friends_friendship_deleted', 'bp_friends_delete_activity_on_friendship_delete' ); -
src/bp-friends/bp-friends-functions.php
115 115 */ 116 116 do_action( 'friends_before_friendship_delete', $friendship_id, $initiator_userid, $friend_userid ); 117 117 118 // Remove the activity stream items about the friendship id.119 friends_delete_activity( array( 'item_id' => $friendship_id, 'type' => 'friendship_created', 'user_id' => 0 ) );120 121 118 /** 122 119 * Fires before the friendship connection is removed. 123 120 *