Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
BuddyPress: Allow not admins to see the private fields of other users
function drs_bp_xprofile_reset_hidden_field_types_for_user( $hidden_levels, $displayed_user_id, $current_user_id ) {
if( $current_user_id == 9 ){ // or any other user role or user type check
return array();
return $hidden_levels;
add_filter( 'bp_xprofile_get_hidden_fields_for_user', 'drs_bp_xprofile_reset_hidden_field_types_for_user', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment