bp_blogs_comment_sync_activity_comment

Fires after an activity comment is added from a WP post comment.

Description

do_action( 'bp_blogs_comment_sync_activity_comment', (int) $activity_id, (WP_Comment) $comment, (array) $activity_args, (object) $activity_post_object ); 

Parameters (4)

0. $activity_id (int)
The activity comment ID.
1. $comment (WP_Comment)
WP Comment object.
2. $activity_args (array)
Activity comment arguments.
3. $activity_post_object (object)
The post type tracking args object.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'bp_blogs_comment_sync_activity_comment', $activity_id, $comment, $activity_args, $activity_post_object ); 
The following example is for adding a hook callback.
  1. // define the bp_blogs_comment_sync_activity_comment callback 
  2. function action_bp_blogs_comment_sync_activity_comment( $activity_id, $comment, $activity_args, $activity_post_object ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'bp_blogs_comment_sync_activity_comment', 'action_bp_blogs_comment_sync_activity_comment', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'bp_blogs_comment_sync_activity_comment', 'action_bp_blogs_comment_sync_activity_comment', 10, 4 ); 

Defined (1)

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

/bp-blogs/bp-blogs-functions.php  
  1. do_action( 'bp_blogs_comment_sync_activity_comment', $activity_id, $comment, $activity_args, $activity_post_object );