bp_activity_comment_reply_add_notification

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

Description

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

Parameters (3)

0. $activity_comment (BP_Activity_Activity)
The activity comment.
1. $comment_id (int)
ID for the newly received comment.
2. $commenter_id (int)
ID of the user who made the comment.

Usage

  1. if ( !function_exists( 'bp_activity_comment_reply_add_notification' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-activity/bp-activity-notifications.php'; 
  3.  
  4. // The activity comment. 
  5. $activity_comment = null; 
  6.  
  7. // ID for the newly received comment. 
  8. $comment_id = -1; 
  9.  
  10. // ID of the user who made the comment. 
  11. $commenter_id = -1; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = bp_activity_comment_reply_add_notification($activity_comment, $comment_id, $commenter_id); 
  15.  

Defined (1)

The function is defined in the following location(s).

/bp-activity/bp-activity-notifications.php  
  1. function bp_activity_comment_reply_add_notification( $activity_comment, $comment_id, $commenter_id ) { 
  2. 'user_id' => $activity_comment->user_id,  
  3. 'item_id' => $comment_id,  
  4. 'secondary_item_id' => $commenter_id,  
  5. 'component_name' =>buddypress)->activity->id,  
  6. 'component_action' => 'comment_reply',  
  7. 'date_notified' => bp_core_current_time(),  
  8. 'is_new' => 1,  
  9. ) );