bp_moderation_content_status_changed

The BuddyPress Moderation bp moderation content status changed hook.

Description

do_action( 'bp_moderation_content_status_changed', (unknown) $cont_content_id, (unknown) $old_status, (string) $deleted, (unknown) $cont_item_author, (unknown) $this_get_content_reporters_cont_content_id ); 

Parameters (5)

0. $cont_content_id (unknown)
The cont content id.
1. $old_status (unknown)
The old status.
2. $deleted (string) => 'deleted'
The deleted.
3. $cont_item_author (unknown)
The cont item author.
4. $this_get_content_reporters_cont_content_id (unknown)
The this get content reporters cont content id.

Usage

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

Defined (2)

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

/classes/bpModBackendActions.php  
  1. do_action('bp_moderation_content_status_changed', $cont->content_id, $old_status, 'deleted', $cont->item_author, $this->get_content_reporters($cont->content_id)); 
  1. do_action('bp_moderation_content_status_changed', $cont->content_id, $old_status, $new_status, $cont->item_author, $reporters, $cont);