I wouldn’t mod a function, I’d add a filter. Hang on while I look for the filter name. (brb)
OK, what I think you’ve done is change the ‘Full Name’ profile field and called it ‘nickname’ in the BuddyPress settings area right?
So, in bp_fetch_user_fullname() it sets up a filter for us:
apply_filters( 'bp_fetch_user_fullname', stripslashes( trim( $data ) )
You’d need to create a function something like:
function my_nickname_filter($name) {
return strtolower($name);
}
And register the filter with:
add_filter('bp_fetch_user_fullname', 'my_nickname_filter')
Hopefully bp uses the bp_fetch_user_full_name() fn everywhere. Can’t see much reason to create it if it didn’t.
I see these hooks all over the place. Andy has done gone filter happy.
thnx for you response! but why should i make function that make all letters lowercase? if someone have nickname “Ao2NNasa” what that function do?
i get it on my own ))) just needed to comment line 247 at bp-corebp-core-templatetags.php (//$data = ucfirst($data). and that’s it! thnx burtadsit!
Oh, I misunderstood what you were looking for. Happens to me at 5am.
It’s still not a good idea to mod the bp core. You can still accomplish what you want with a filter. That way you don’t have to keep track of your mod and worrying about an svn update or moving from one release to the next.
You could use the same method outlined above but replace the strtolower() with lcfirst() to take it back to normal.
Up to you.