| @@ -45,9 +45,9 @@ | ||
| 45 | 45 | 'fields' => [], |
| 46 | 46 | 'children' => [ |
| 47 | 47 | 'parent' => [ |
| 48 | 48 | 'key' => 'parent', |
| 49 | - 'label' => 'Parent', | |
| 49 | + 'label' => __('Parent', 'jc-importer'), | |
| 50 | 50 | 'loop' => false, |
| 51 | 51 | 'fields' => [], |
| 52 | 52 | 'children' => [] |
| 53 | 53 | ], |
| @@ -52,9 +52,9 @@ | ||
| 52 | 52 | 'children' => [] |
| 53 | 53 | ], |
| 54 | 54 | 'anscestors' => [ |
| 55 | 55 | 'key' => 'anscestors', |
| 56 | - 'label' => 'Anscestors', | |
| 56 | + 'label' => __('Anscestors', 'jc-importer'), | |
| 57 | 57 | 'loop' => true, |
| 58 | 58 | 'fields' => [], |
| 59 | 59 | 'children' => [] |
| 60 | 60 | ], |
| @@ -59,9 +59,9 @@ | ||
| 59 | 59 | 'children' => [] |
| 60 | 60 | ], |
| 61 | 61 | 'custom_fields' => [ |
| 62 | 62 | 'key' => 'custom_fields', |
| 63 | - 'label' => 'Custom Fields', | |
| 63 | + 'label' => __('Custom Fields', 'jc-importer'), | |
| 64 | 64 | 'loop' => true, |
| 65 | 65 | 'loop_fields' => ['meta_key', 'meta_value'], |
| 66 | 66 | 'fields' => [], |
| 67 | 67 | 'children' => [] |
| @@ -105,9 +105,9 @@ | ||
| 105 | 105 | |
| 106 | 106 | $fields['children']['custom_fields']['fields'] = apply_filters('iwp/exporter/taxonomy/custom_field_list', $fields['children']['custom_fields']['fields'], $this->taxonomy); |
| 107 | 107 | $fields = apply_filters('iwp/exporter/taxonomy/fields', $fields, $this->taxonomy); |
| 108 | 108 | |
| 109 | - return $fields; | |
| 109 | + return $this->parse_fields($fields); | |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | public function have_records($exporter_id) |
| 113 | 113 | { |
| @@ -142,8 +142,12 @@ | ||
| 142 | 142 | public function setup($i) |
| 143 | 143 | { |
| 144 | 144 | $term = get_term($this->items[$i], '', ARRAY_A); |
| 145 | 145 | |
| 146 | + // Remove WP_Term attribute name conflict | |
| 147 | + $term['_parent'] = $term['parent']; | |
| 148 | + unset($term['parent']); | |
| 149 | + | |
| 146 | 150 | $this->record = new ExporterRecord($term, 'tax'); |
| 147 | 151 | $this->record = apply_filters('iwp/exporter/taxonomy/setup_data', $this->record, $this->taxonomy); |
| 148 | 152 | return true; |
| 149 | 153 | } |
| @@ -224,9 +228,9 @@ | ||
| 224 | 228 | $value = get_term_meta($record['term_id']); |
| 225 | 229 | $value = $this->modify_custom_field_data($value, 'taxonomy'); |
| 226 | 230 | break; |
| 227 | 231 | case 'parent': |
| 228 | - $parent = get_term($record['parent'], $this->taxonomy); | |
| 232 | + $parent = get_term($record['_parent'], $this->taxonomy); | |
| 229 | 233 | if (!is_wp_error($parent)) { |
| 230 | 234 | $value = [ |
| 231 | 235 | 'term_id' => $parent->term_id, |
| 232 | 236 | 'slug' => $parent->slug, |