@chiefalchemist
not the exact answer, but a way how to do it.
This snippet will make the NAME field hidden to all except for admins
function bp_define_hidden_fields( $hidden_fields, $displayed_user_id, $current_user_id ) {
//if not admin or if not the profile of the current user
if ( !is_super_admin( $current_user_id) && ($displayed_user_id != $current_user_id) ) {
//add name field ( id = 1 ) to the hidden fields
$hidden_fields[] = 1;
}
return $hidden_fields;
}
add_filter('bp_xprofile_get_hidden_fields_for_user','bp_define_hidden_fields', 10 ,3 );
Reference:
bp-xprofile/bp-xprofile-classes.php
Thanks @danbp
Might help. But isn’t there a way to figure out where that is set and change it? I’m mean it’s got to be in the DB as an option / meta or something, eh?
Basically, I’ve come up with a new list of visibility values and public is not one of them. I can code in an exception for name => public but that feels so hack-y, eh?
see bp-xprofile/bp-xprofile-classes.php:393
cheers @danbp
This is my first week w/ BP. I’m starting to realize the value of text search against the whole BP code base. That said, it’s a very sophisticated product so until I get a bit more comfortable with things I would rather ask than assume.
Thanks