bp_blogs_new_blog_comment

Fires after BuddyPress has recorded metadata about a published blog post comment.

Description

do_action( 'bp_blogs_new_blog_comment', (int) $comment_comment_id, (WP_Post) $comment, (string) $bp_loggedin_user_id ); 

Parameters (3)

0. $comment_comment_id (int)
Comment ID of the blog post comment being recorded.
1. $comment (WP_Post)
WP_Comment object for the current blog post.
2. $bp_loggedin_user_id (string) => bp_loggedin_user_id()
ID of the user associated with the current blog post comment.

Usage

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

Defined (1)

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

/bp-blogs/bp-blogs-functions.php  
  1. do_action( 'bp_blogs_new_blog_comment', $comment->comment_ID, $comment, bp_loggedin_user_id() );