Reply To: Show location for “New Members” entries in activity stream
Use this filter hook and write a function:
apply_filters( 'bp_members_format_activity_action_new_member', $action, $activity );
Found in : ...plugins\buddypress\bp-members\bp-members-activity.php
For example, untested:
function pixie_new_member_activity( $action, $activity ) {
$user_id = $activity->user_id;
// assuming the field names are State and City
$state = xprofile_get_field_data( 'State', $user_id, 'comma' );
$city = xprofile_get_field_data( 'City', $user_id, 'comma' );
$userlink = bp_core_get_userlink( $user_id );
$action = sprintf( __( '%s from %s in %s became a registered member', 'buddypress' ), $userlink, $city, $state );
return $action;
}
add_filter( 'bp_members_format_activity_action_new_member', 'pixie_new_member_activity', 10, 2 );