Skip to content

Instantly share code, notes, and snippets.

@paulgibbs
Last active August 26, 2017 14:54
Show Gist options
  • Save paulgibbs/6ee3c0d0b28ddd5ca5b8 to your computer and use it in GitHub Desktop.
Save paulgibbs/6ee3c0d0b28ddd5ca5b8 to your computer and use it in GitHub Desktop.
Change pronouns in BuddyPress' "changed their profile picture" activity item.
<?php
add_filter( 'bp_xprofile_format_activity_action_new_avatar', 'djpaul_change_pronouns', 10, 2 );
function djpaul_change_pronouns( $action, $activity ) {
$userlink = bp_core_get_userlink( $activity->user_id );
// Change this to decide between male/female, etc.
if ( true ) {
$action = sprintf( __( '%s changed her profile picture', 'buddypress' ), $userlink );
} else {
$action = sprintf( __( '%s changed his profile picture', 'buddypress' ), $userlink );
}
return $action;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment