Re: Hide/Disable private messaging unless users are friends
Try this out in /wp-content/plugins/bp-custom.php:
function my_bp_is_friend() {
global $bp;
if (friends_check_friendship($bp->loggedin_user->id,$bp->displayed_user->id) )
return true;
return false;
}
Then copy /bp-default/members/single/member-header.php to your child theme.
Next, edit:
<?php if ( is_user_logged_in() && !bp_is_my_profile() && function_exists( 'bp_send_private_message_link' ) ) : ?>
to:
<?php if ( is_user_logged_in() && !bp_is_my_profile() && my_bp_is_friend() && function_exists( 'bp_send_private_message_link' ) ) : ?>