Re: Privacy options (friends only viewing)
OK, I think I fixed the code. Seems to work for me. Can anyone test and confirm?
<?php
global $bp;
$potential_friend_id = $bp->displayed_user->id;
$friend_requester_id = $bp->loggedin_user->id;
$friend_status = BP_Friends_Friendship::check_is_friend( $friend_requester_id, $potential_friend_id );
if ( $friend_status != 'is_friend' && $potential_friend_id != $friend_requester_id) {
echo '<br><br>Oops! You must be friends with <div style="font-weight:bold; display:inline">' . $bp->bp_options_title . '</div> to view this profile.<br>Click the "Add Friend" button above to request friendship.' . bp_add_friend_button();
} else { ?>
… do stuff …
<?php } ?>