resolve the exporter a array IDs of relationships #328

This commit is contained in:
Vinícius Nunes 2019-10-31 15:45:27 -03:00
parent 7925186017
commit 3ee525998c
1 changed files with 7 additions and 3 deletions

View File

@ -44,9 +44,13 @@ class CSV extends Exporter {
continue;
}
if ($meta->get_metadatum()->get_metadata_type() == 'Tainacan\Metadata_Types\Relationship')
$line[] = $meta->get_value();
else
if ($meta->get_metadatum()->get_metadata_type() == 'Tainacan\Metadata_Types\Relationship') {
$rel = $meta->get_value();
if (is_array($rel))
$line[] = implode( $this->get_option('multivalued_delimiter'), $rel );
else
$line[] = $rel;
} else
$line[] = $meta->get_value_as_string();
}