bp_xprofile_format_activity_action_new_avatar( string $action, object $activity )
Format ‘new_avatar’ activity actions.
Description
Parameters
- $action
-
(Required) Static activity action.
- $activity
-
(Required) Activity object.
Return
(string)
Source
File: bp-xprofile/bp-xprofile-activity.php
function bp_xprofile_format_activity_action_new_avatar( $action, $activity ) { $userlink = bp_core_get_userlink( $activity->user_id ); $action = sprintf( __( '%s changed %s photo', 'buddyboss' ), $userlink, bp_get_user_gender_pronoun_type( $activity->user_id ) ); // Legacy filter - pass $user_id instead of $activity. if ( has_filter( 'bp_xprofile_new_avatar_action' ) ) { $action = apply_filters( 'bp_xprofile_new_avatar_action', $action, $activity->user_id ); } /** * Filters the formatted 'new_avatar' activity feed action. * * @since BuddyPress 2.0.0 * * @param string $action Formatted action for activity feed. * @param object $activity Activity object. */ return apply_filters( 'bp_xprofile_format_activity_action_new_avatar', $action, $activity ); }
Changelog
Version | Description |
---|---|
BuddyPress 2.0.0 | Introduced. |
Questions?
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.