Privacy setting


#1

Hi,

I needed to change media privacy settings so I have followed these two links:

and used this code in my bp-custom.php:

add_action( ‘plugins_loaded’, ‘ra_plugin_plugins_loaded’, 10 );

function ra_plugin_plugins_loaded(){ add_filter( ‘rtmedia_privacy_levels’, ‘ra_media_privacy_levels’,10,1 ); }

function ra_media_privacy_levels($privacy_settings){ return [ ‘levels’ => [ 40 => __( ‘Friends only - Visible only to my friends’, ‘custom’ ), 20 => __( ‘All members - Visible to registered users’, ‘custom’ ), ] ]; }

The code seems to work ok. I just would like to ask you to double check the code for me to make sure it is correct. I just followed the example in the other post without really knowing what I am exactly doing…My users privacy is very important to me and I just want to do this the right way.

Thanks a lot.


#2

Hello Petra,

We have checked the code and it looks fine. Please go ahead with it.

Don’t forget that you need to add this snippet into the bp-custom.php file, not the usual functions.php file. Refer to this document for more information on the bp-custom.php file.

Do let us know if this works for you!

Best,

Joel Abreo


#3

Thanks for such a quick reply, the code works fine :slight_smile:


#4

Hi @Petra,

Glad to hear that. I am closing this ticket for now. Please feel free to create a new one in the future.

Best,

Joel Abreo


#5