BuddyDev

Documentation

BuddyPress user profile visibility manager provides two filter which you can use to change the default settings for the privacy.

Here is an example of the default settings

[sourcecode language="php"]

$default_settings=apply_filters('bp_profile_visibility_default_settings', array(
'bp_profile_visibility'=>'public',//everyone
'bp_hide_last_active'=>'no',
'bp_exclude_in_search'=>'no',
'bp_exclude_in_dir'=>'no',
'bp_allow_friendship_request'=>'yes'
) ) ;

[/sourcecode]

You can use 'bp_profile_visibility_default_settings' to change the default settings for everyone. The default settings only apply if a user has not saved his/her account settings for visibility.

There is another hook that you can use to override all the visibility settings. we have called it like this

[sourcecode language="php"]

apply_filters( 'bp_profile_visibility_get_settings', $settings, $key );

[/sourcecode]

You can use the filter 'bp_profile_visibility_get_settings' and the key (look into the previous code snippet) to filter out any results.