I have a little gift for you.
Add this code in your functions.php
function my_test($args)
{
if( is_user_logged_in() )
{
global $activities_template;
$logged_user = bp_core_get_user_displayname( bp_loggedin_user_id() );
if (strpos($args, $logged_user) !== false)
{
$old_text = '>' . $logged_user . '</a>';
$new_text = '>' . __('You', 'buddypress') . '</a>';
$args = str_replace($old_text, $new_text, $args);
}
}
return $args;
}
add_filter('bp_get_activity_action', 'my_test');
@nicolacirotto Thanks! Always good to share 🙂
@style960
10 years, 1 month ago
Substitute the username for ‘You’ on activity updates, comments made by the logged-on user. Reading my own activity when logged-on is like reading from third person perspective.