do_action( "{$object_data[‘component’]}_cover_image_uploaded", int $item_id, string $name, string $cover_url, int $feedback_code )

Fires if the new cover photo was successfully uploaded.


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



(int) Inform about the item id the cover photo was set for.


(string) Filename.


(string) URL to the image.


(int) If value not 1, an error occured.


File: bp-core/bp-core-attachments.php


Version Description
BuddyPress 3.0.0 Added $cover_url, $name, $feedback_code arguments. BuddyPress 3.0.0 Added $cover_url, $name, $feedback_code arguments.
BuddyPress 2.4.0 Introduced.


We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.