bp_xprofile_format_activity_action_updated_profile( string $action, object $activity )

Format ‘updated_profile’ activity actions.

Description

Parameters

$action

(string) (Required) Static activity action.

$activity

(object) (Required) Activity object.

Return

(string)

Source

File: bp-xprofile/bp-xprofile-activity.php

function bp_xprofile_format_activity_action_updated_profile( $action, $activity ) {

	// Note for translators: The natural phrasing in English, "Joe updated
	// his profile", requires that we know Joe's gender, which we don't. If
	// your language doesn't have this restriction, feel free to use a more
	// natural translation.
	$profile_link = trailingslashit( bp_core_get_user_domain( $activity->user_id ) . bp_get_profile_slug() );
	$action	      = sprintf( __( "%s updated %s profile", 'buddyboss' ), '<a href="' . $profile_link . '">' . bp_core_get_user_displayname( $activity->user_id ) . '</a>', bp_get_user_gender_pronoun_type( $activity->user_id  ) );

	/**
	 * Filters the formatted 'updated_profile' 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_updated_profile', $action, $activity );
}

Changelog

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.