How to filter get_adjacent_post()?

Well it wasn’t too hard after some perspective.

public function get_adjacent_post_mod($where){
        if (is_single()){
            global $wpdb, $post;
            if ( get_post_status ( ) == 'private' ) {
                $where = str_replace( "AND ( p.post_status="publish" OR p.post_status="private" )", "AND p.post_status="private"", $where );
                return $where;  
            } else {
                $where = str_replace( "AND ( p.post_status="publish" OR p.post_status="private" )", "AND p.post_status="publish"", $where );
                return $where;  
            }
        }
    }

tech