bp_friends_friendship_accepted_activity( int $friendship_id, int $initiator_user_id, int $friend_user_id, object|bool $friendship = false )

Add activity stream items when one members accepts another members request for virtual friendship.

Parameters Parameters


(int) (Required) ID of the friendship.


(int) (Required) ID of friendship initiator.


(int) (Required) ID of user whose friendship is requested.


(object|bool) (Optional) Friendship object.

Default value: false

Source Source

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

function bp_friends_friendship_accepted_activity( $friendship_id, $initiator_user_id, $friend_user_id, $friendship = false ) {
	if ( ! bp_is_active( 'activity' ) ) {

	// Record in activity streams for the initiator.
	friends_record_activity( array(
		'user_id'           => $initiator_user_id,
		'type'              => 'friendship_created',
		'item_id'           => $friendship_id,
		'secondary_item_id' => $friend_user_id
	) );

Top ↑

Changelog Changelog

Version Description
1.9.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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