<component>_cover_image_uploaded

Fires if the new cover image was successfully uploaded.

Description

do_action( '<component>_cover_image_uploaded', (int) $int_bp_params_item_id ); 

The dynamic portion(s) of the hook will be xprofile in case of a user's cover image, groups in case of a group's cover image. For instance: Use add_action( xprofile_cover_image_uploaded ) to run your specific code once the user has set his cover image.

Parameters (1)

0. $int_bp_params_item_id (int) => (int) $bp_params['item_id']
Inform about the item id the cover image was set for.

Usage

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

Defined (1)

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

/bp-core/bp-core-attachments.php  
  1. do_action( $object_data['component'] . '_cover_image_uploaded', (int) $bp_params['item_id'] );