Hi,
is it possible to hide the last activitys in the activity stream?
RegardsHi Matthias,
Do you want to hide user activities from the activity directory based on their profile privacy?We can easily allow hiding activity from the directory, the only issue will be hiding based on context(Friend/non friends etc).
If you can help me understand it better, I will like to add it(If feasible).
Thank you
BrajeshHi Brajesh, thanks for your reply.
Yes, I meant an option to hide all activities (changed profil, posted a comment, and so on)
RegardsHi Matthias,
I am going to explore it a little more and will report back. It is doable(for total exclusion of the user activity).Regards
BrajeshHi,
I am sorry I forgot to reply.Please put this code in your bp-custom.php
// Hide activity of the user from directory, and single function buddydev_hide_activity_conditions( $where_conditions, $args ) { if ( ! function_exists( 'bp_profile_visibility_manager' ) ) { return $where_conditions; } // Do not hide on user profile. if ( ! bp_is_user() ) { // change it to bp_is_my_profile() to only show for the user. $sql_hidden = bp_profile_visibility_manager()->get_users_sql( 'bp_profile_visibility', 'self' ); $where_conditions[] = "a.user_id NOT IN ({$sql_hidden})"; } return $where_conditions; } add_filter( 'bp_activity_get_where_conditions', 'buddydev_hide_activity_conditions', 10, 2 );
Please feel free to customize it as needed.
Hope it helps.
Regards
Brajesh
You must be logged in to reply to this topic.