friends_activity_friendship_accepted_action

  • apply_filters( 'friends_activity_friendship_accepted_action', sprintf( __( '%1$s and %2$s are now friends', 'buddypress' ), $initiator_link, $friend_link ), $friendship )

    Source Reference:

    • Component: BuddyPress :: bp-friends
      File: /bp-friends/bp-friends-functions.php :: Trac Source Line: 94
      		bp_core_add_notification( $friendship->friend_user_id, $friendship->initiator_user_id, $bp->friends->id, 'friendship_accepted' );
      
      		$initiator_link = bp_core_get_userlink( $friendship->initiator_user_id );
      		$friend_link = bp_core_get_userlink( $friendship->friend_user_id );
      
      		// Record in activity streams for the initiator
      		friends_record_activity( array(
      			'user_id'           => $friendship->initiator_user_id,
      			'type'              => 'friendship_created',
      			'action'            => apply_filters( 'friends_activity_friendship_accepted_action', sprintf( __( '%1$s and %2$s are now friends', 'buddypress' ), $initiator_link, $friend_link ), $friendship ),
      			'item_id'           => $friendship_id,
      			'secondary_item_id' => $friendship->friend_user_id
      		) );
      
      		// Record in activity streams for the friend
      		friends_record_activity( array(
      			'user_id'           => $friendship->friend_user_id,
      			'type'              => 'friendship_created',
      			'action'            => apply_filters( 'friends_activity_friendship_accepted_action', sprintf( __( '%1$s and %2$s are now friends', 'buddypress' ), $friend_link, $initiator_link ), $friendship ),
      			'item_id'           => $friendship_id,
      
  • apply_filters( 'friends_activity_friendship_accepted_action', sprintf( __( '%1$s and %2$s are now friends', 'buddypress' ), $friend_link, $initiator_link ), $friendship )

    Source Reference:

    • Component: BuddyPress :: bp-friends
      File: /bp-friends/bp-friends-functions.php :: Trac Source Line: 103
      			'action'            => apply_filters( 'friends_activity_friendship_accepted_action', sprintf( __( '%1$s and %2$s are now friends', 'buddypress' ), $initiator_link, $friend_link ), $friendship ),
      			'item_id'           => $friendship_id,
      			'secondary_item_id' => $friendship->friend_user_id
      		) );
      
      		// Record in activity streams for the friend
      		friends_record_activity( array(
      			'user_id'           => $friendship->friend_user_id,
      			'type'              => 'friendship_created',
      			'action'            => apply_filters( 'friends_activity_friendship_accepted_action', sprintf( __( '%1$s and %2$s are now friends', 'buddypress' ), $friend_link, $initiator_link ), $friendship ),
      			'item_id'           => $friendship_id,
      			'secondary_item_id' => $friendship->initiator_user_id,
      			'hide_sitewide'     => true // We've already got the first entry site wide
      		) );
      
      		// Send the email notification
      		friends_notification_accepted_request( $friendship->id, $friendship->initiator_user_id, $friendship->friend_user_id );
      
      		do_action( 'friends_friendship_accepted', $friendship->id, $friendship->initiator_user_id, $friendship->friend_user_id );
      

Comments are closed.