bp_activity_post_type_edit_<post_type>

Fires when editing the post and the new status is not 'publish'.

Description

do_action( 'bp_activity_post_type_edit_<post_type>', (WP_Post) $post, (string) $new_status, (string) $old_status ); 

This is a variable filter that is dependent on the post type being untrashed.

Parameters (3)

0. $post (WP_Post)
Post data.
1. $new_status (string)
New status for the post.
2. $old_status (string)
Old status for the post.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'bp_activity_post_type_edit_{$post_type}', $post, $new_status, $old_status ); 
The following example is for adding a hook callback.
  1. // define the bp_activity_post_type_edit_<post_type> callback 
  2. function action_bp_activity_post_type_edit_post_type( $post, $new_status, $old_status ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( "bp_activity_post_type_edit_{$post_type}", 'action_bp_activity_post_type_edit_post_type', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( "bp_activity_post_type_edit_{$post_type}", 'action_bp_activity_post_type_edit_post_type', 10, 3 ); 

Defined (1)

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

/bp-activity/bp-activity-actions.php  
  1. do_action( 'bp_activity_post_type_edit_' . $post->post_type, $post, $new_status, $old_status );