bp_activity_comment_reply_add_notification( BP_Activity_Activity $activity_comment, int $comment_id, int $commenter_id )

Notify a member one of their activity comment received a reply.

Description

Parameters

$activity_comment

(Required) The parent activity.

$comment_id

(Required) ID for the newly received comment.

$commenter_id

(Required) ID of the user who made the comment.

Source

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

function bp_activity_comment_reply_add_notification( $activity_comment, $comment_id, $commenter_id ) {
	bp_notifications_add_notification( array(
		'user_id'           => $activity_comment->user_id,
		'item_id'           => $comment_id,
		'secondary_item_id' => $commenter_id,
		'component_name'    => buddypress()->activity->id,
		'component_action'  => 'comment_reply',
		'date_notified'     => bp_core_current_time(),
		'is_new'            => 1,
	) );
}

Changelog

Changelog
Version Description
BuddyPress 2.6.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.