public function get_existing_translation_ids($source_site_id, $target_site_id, $source_content_id, $target_content_id, $type)
{
$sql = "\nSELECT DISTINCT ml_source_blogid, ml_source_elementid\nFROM {$this->table}\nWHERE (\n\t\t( ml_blogid = %d AND ml_elementid = %d )\n\t\tOR ( ml_blogid = %d AND ml_elementid = %d )\n\t)\n\tAND ml_type = %s";
$query = $this->db->prepare($sql, $source_site_id, $source_content_id, $target_site_id, $target_content_id, $type);
$result = $this->db->get_results($query, ARRAY_A);
if (!$result) {
return [];
}
foreach ($result as $key => $data) {
$result[$key] = array_map('intval', $data);
}
return $result;
}