get_translation_ids() public method

Return the existing (or new) translation IDs according to the given parameters.
public get_translation_ids ( integer $source_site_id, integer $target_site_id, integer $source_content_id, integer $target_content_id, string $type ) : array
$source_site_id integer Source blog ID.
$target_site_id integer Target blog ID.
$source_content_id integer Source post ID or term taxonomy ID.
$target_content_id integer Target post ID or term taxonomy ID.
$type string Content type.
return array
 /**
  * Disconnects the current post with the one given in the request.
  *
  * @return void
  */
 private function disconnect_post()
 {
     $remote_site_id = $this->context->remote_site_id();
     $remote_post_id = $this->context->remote_post_id();
     $source_site_id = $this->context->source_site_id();
     $translation_ids = $this->content_relations->get_translation_ids($this->context->source_site_id(), $remote_site_id, $this->context->source_post_id(), $remote_post_id, 'post');
     if ($translation_ids['ml_source_blogid'] !== $source_site_id) {
         $remote_site_id = $source_site_id;
         if (0 !== $remote_post_id) {
             $remote_post_id = $this->context->source_post_id();
         }
     }
     $this->content_relations->delete_relation($translation_ids['ml_source_blogid'], $remote_site_id, $translation_ids['ml_source_elementid'], $remote_post_id, 'post');
 }
 /**
  * @param array $existing
  * @param int   $source_term_taxonomy_id
  * @param int   $target_site_id
  * @param int   $target_term_taxonomy_id
  *
  * @return bool
  */
 private function update_terms(array $existing, $source_term_taxonomy_id, $target_site_id, $target_term_taxonomy_id)
 {
     // There's nothing to do here
     if (-1 === $target_term_taxonomy_id) {
         return TRUE;
     }
     if (isset($existing[$target_site_id]) && $existing[$target_site_id] === $target_term_taxonomy_id) {
         return TRUE;
     }
     $translation_ids = $this->content_relations->get_translation_ids($this->current_site_id, $target_site_id, $source_term_taxonomy_id, $target_term_taxonomy_id, 'term');
     if ($translation_ids['ml_source_blogid'] !== $this->current_site_id) {
         $target_site_id = $this->current_site_id;
         if (0 !== $target_term_taxonomy_id) {
             $target_term_taxonomy_id = $source_term_taxonomy_id;
         }
     }
     // Delete a relation
     if (0 === $target_term_taxonomy_id) {
         return $this->content_relations->delete_relation($translation_ids['ml_source_blogid'], $target_site_id, $translation_ids['ml_source_elementid'], 0, 'term');
     }
     return $this->content_relations->set_relation($translation_ids['ml_source_blogid'], $target_site_id, $translation_ids['ml_source_elementid'], $target_term_taxonomy_id, 'term');
 }