bp_is_friend

  • apply_filters( 'bp_is_friend', friends_check_friendship_status( $bp->loggedin_user->id, $user_id ), $user_id )

    Source Reference:

    • Component: BuddyPress :: bp-friends
      File: /bp-friends/bp-friends-template.php :: Trac Source Line: 296
      	if ( !is_user_logged_in() )
      		return false;
      
      	if ( empty( $user_id ) )
      		$user_id = bp_get_potential_friend_id( $user_id );
      
      	if ( $bp->loggedin_user->id == $user_id )
      		return false;
      
      	return apply_filters( 'bp_is_friend', friends_check_friendship_status( $bp->loggedin_user->id, $user_id ), $user_id );
      }
      
      function bp_add_friend_button( $potential_friend_id = 0, $friend_status = false ) {
      	echo bp_get_add_friend_button( $potential_friend_id, $friend_status );
      }
      	function bp_get_add_friend_button( $potential_friend_id = 0, $friend_status = false ) {
      		global $bp, $friends_template;
      
      		if ( empty( $potential_friend_id ) )
      			$potential_friend_id = bp_get_potential_friend_id( $potential_friend_id );
      

Comments are closed.