public function delete_relation($source_site_id, $target_site_id, $source_content_id, $target_content_id = 0, $type = 'post')
{
$where = ['ml_source_blogid' => $source_site_id, 'ml_source_elementid' => $source_content_id, 'ml_type' => $type];
$where_format = ['%d', '%d', '%s'];
if (0 < $target_site_id) {
$where['ml_blogid'] = $target_site_id;
$where_format[] = '%d';
}
if (0 < $target_content_id) {
$where['ml_elementid'] = $target_content_id;
$where_format[] = '%d';
}
$result = (int) $this->db->delete($this->table, $where, $where_format);
$cache_key = $this->get_cache_key($source_site_id, $source_content_id, $type);
wp_cache_delete($cache_key, $this->cache_group);
\Inpsyde\MultilingualPress\debug(current_filter() . '/' . __METHOD__ . '/' . __LINE__ . " - {$this->db->last_query}");
return $result;
}