bp_activity_post_type_unpublished

Fires after the unpublishing for the custom post type.

Description

do_action( 'bp_activity_post_type_unpublished', (array) $delete_activity_args, (WP_Post) $post, (bool) $deleted ); 

Parameters (3)

0. $delete_activity_args (array)
Array of arguments for activity deletion.
1. $post (WP_Post)
Post object.
2. $deleted (bool)
Whether or not the activity was successfully deleted.

Usage

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

Defined (1)

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

/bp-activity/bp-activity-functions.php  
  1. do_action( 'bp_activity_post_type_unpublished', $delete_activity_args, $post, $deleted );