Last active
August 26, 2017 14:54
-
-
Save paulgibbs/6ee3c0d0b28ddd5ca5b8 to your computer and use it in GitHub Desktop.
Change pronouns in BuddyPress' "changed their profile picture" activity item.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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