Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Require user to be a friend to send messages


mesgains
Participant

@mesgains

you have to put thoses lines in your wp-content/member-themes/buddypress-member/profile/profile.php to make it work like you want

you add this test :

<? global $bp;

if ( ‘is_friend’ == BP_Friends_Friendship::check_is_friend( $bp->loggedin_user->id, $bp->displayed_user->id ) ) {

?>

before thoses line

<?php if ( function_exists(‘bp_send_message_button’) ) : ?>

<?php bp_send_message_button() ?>

<?php endif; ?>

end then close the test

<? } ?>

Skip to toolbar