Skip to:
Content
Pages
Categories
Search
Top
Bottom

Block Comments When Not Friends


  • trainercom
    Participant

    @trainercom

    Hi,

    Is it possible to block site members from commenting on wall posts on other members activity streams if they are not friends, in the same way you can’t post to their wall if they are not friends?

Viewing 1 replies (of 1 total)

  • Henry
    Member

    @henrywright-1

    You can do this by checking if the displayed member is friends with the logged in member and then showing the comment form conditionally.

    $status = friends_check_friendship_status( bp_loggedin_user_id(), bp_displayed_user_id() );
    if ( $status ) {
        // show comment form
    } else {
        // don't show it
    }

    Please note I’ve not tested this but that is the general approach, I think.

Viewing 1 replies (of 1 total)
  • The topic ‘Block Comments When Not Friends’ is closed to new replies.
Skip to toolbar