bp_activity_post_type_published

Fires after the publishing of an activity item for a newly published post type post.

Description

do_action( 'bp_activity_post_type_published', (int) $activity_id, (WP_Post) $post, (array) $activity_args ); 

Parameters (3)

0. $activity_id (int)
ID of the newly published activity item.
1. $post (WP_Post)
Post object.
2. $activity_args (array)
Array of activity arguments.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'bp_activity_post_type_published', $activity_id, $post, $activity_args ); 
The following example is for adding a hook callback.
  1. // define the bp_activity_post_type_published callback 
  2. function action_bp_activity_post_type_published( $activity_id, $post, $activity_args ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'bp_activity_post_type_published', 'action_bp_activity_post_type_published', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'bp_activity_post_type_published', 'action_bp_activity_post_type_published', 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_published', $activity_id, $post, $activity_args );