Inpsyde\MultilingualPress\SiteDuplication\SiteDuplicator::handle_content_relations PHP Method

handle_content_relations() private method

Sets up content relations between the source site and the new site.
private handle_content_relations ( integer $source_site_id, integer $destination_site_id ) : void
$source_site_id integer The ID of the source site.
$destination_site_id integer The ID of the new site.
return void
    private function handle_content_relations($source_site_id, $destination_site_id)
    {
        if ($this->content_relations->has_site_relations($source_site_id)) {
            $this->content_relations->duplicate_relations($source_site_id, $destination_site_id);
            return;
        }
        $this->content_relations->relate_all_posts($source_site_id, $destination_site_id);
        $this->content_relations->relate_all_terms($source_site_id, $destination_site_id);
    }