bp_activity_post_type_remove_comment

Fires after the custom post type comment activity was removed.

Description

do_action( 'bp_activity_post_type_remove_comment', (bool) $deleted, (WP_Comment) $comment_id, (object) $activity_post_object, (string) $activity_comment_object_action_id ); 

Parameters (4)

0. $deleted (bool)
True if the activity was deleted false otherwise
1. $comment_id (WP_Comment)
The comment id.
2. $activity_post_object (object)
The post type tracking args object.
3. $activity_comment_object_action_id (string)
The activity comment object action id.

Usage

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

Defined (1)

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

/bp-activity/bp-activity-functions.php  
  1. do_action( 'bp_activity_post_type_remove_comment', $deleted, $comment_id, $activity_post_object, $activity_comment_object->action_id );