public function source_post_id() { return (int) $this->data[self::KEY_SOURCE_POST_ID]; }
/** * 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'); }