apply filter no hierarchy separator for CSV exporter #283
This commit is contained in:
parent
ba3931288c
commit
c3e1e6cee6
|
@ -21,6 +21,10 @@ class CSV extends Exporter {
|
|||
public function filter_multivalue_separator($separator) {
|
||||
return $this->get_option('multivalued_delimiter');
|
||||
}
|
||||
|
||||
public function filter_hierarchy_separator($separator) {
|
||||
return '>>';
|
||||
}
|
||||
|
||||
public function process_item( $item, $metadata ) {
|
||||
|
||||
|
@ -29,6 +33,7 @@ class CSV extends Exporter {
|
|||
$line[] = $item->get_id();
|
||||
|
||||
add_filter('tainacan-item-metadata-get-multivalue-separator', [$this, 'filter_multivalue_separator']);
|
||||
add_filter('tainacan-terms-hierarchy-html-separator', [$this, 'filter_hierarchy_separator']);
|
||||
|
||||
foreach ($metadata as $meta_key => $meta) {
|
||||
|
||||
|
@ -44,6 +49,7 @@ class CSV extends Exporter {
|
|||
}
|
||||
|
||||
remove_filter('tainacan-item-metadata-get-multivalue-separator', [$this, 'filter_multivalue_separator']);
|
||||
remove_filter('tainacan-terms-hierarchy-html-separator', [$this, 'filter_hierarchy_separator']);
|
||||
|
||||
|
||||
$line[] = $item->get_status();
|
||||
|
|
Loading…
Reference in New Issue