by Brajesh Singh

Permalink: #182

Hide Friends of a User from Other users. Only Site Admin and the User can see his/her Friends

 * Hide User Friends from Other Users
 * Only Admin or the user himself can see friends

function bpdev_custom_hide_friends_if_not_self(){
    if( bp_is_my_profile() || is_super_admin() )
        return ;

    bp_core_remove_nav_item( 'friends' );


You can put the above code in bp-custom.php

#buddypress #friends #bp-hack

by Brajesh Singh

Permalink: #170

Remove Activity Link(Permalink) from Activity time since on Activity Lists

/** * Remove permalink link from time since on activity list */ add_filter( 'bp_activity_permalink', 'bpdev_custom_rtemove_perlink_from_timesince',10,2 ); function bpdev_custom_rtemove_perlink_from_timesince( $time_since, $activity ){ $action = $activity-&gt;action ; $time_since = '<span class="time-since">' . bp_core_time_since( $activity-&gt;date_recorded ) . '</span>'; $content = sprintf( '%1$s %2$s', $action, $time_since ); return $content; }

You can put the above code in your theme's functions.php or bp-custom.php in plugins directory

#buddypress #activity #bp-hack