Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hide Private Message Button to non friends


  • Shaktimaan
    Participant

    @umar007

    add_filter( 'bp_get_send_message_button', function( $array ) {
        if ( friends_check_friendship( bp_loggedin_user_id(), bp_displayed_user_id() ) ) {
            return $array;
        } else {
            return '';
        }
    } );

    I am using the above filter to hide private message button to non friends. It works but it also hides private message button to site admins and bbpress moderators. I want site admins and bbpress moderatos (bbp_moderator) could send and receive private messages even if they are not friend.

    Any solution?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar