|
@@ 4166-4171 (lines=6) @@
|
| 4163 |
|
if ( $cat_id > 0 && $term = (array)term_exists( $cat_id, $taxonomy ) ) {
|
| 4164 |
|
$term_data['term_id'] = $term['term_id'];
|
| 4165 |
|
|
| 4166 |
|
if ( $term_id = geodir_imex_update_term( $taxonomy, $term_data ) ) {
|
| 4167 |
|
$updated++;
|
| 4168 |
|
} else {
|
| 4169 |
|
$invalid++;
|
| 4170 |
|
geodir_error_log( wp_sprintf( $gd_error_log, ($index + 1) ) . ' ' . __( 'Could not be updated due to invalid data (check & remove if any invalid characters used in data)', 'geodirectory' ) );
|
| 4171 |
|
}
|
| 4172 |
|
} else if ( $term_data['slug'] != '' && $term = (array)term_exists( $term_data['slug'], $taxonomy ) ) {
|
| 4173 |
|
$term_data['term_id'] = $term['term_id'];
|
| 4174 |
|
|
|
@@ 4175-4180 (lines=6) @@
|
| 4172 |
|
} else if ( $term_data['slug'] != '' && $term = (array)term_exists( $term_data['slug'], $taxonomy ) ) {
|
| 4173 |
|
$term_data['term_id'] = $term['term_id'];
|
| 4174 |
|
|
| 4175 |
|
if ( $term_id = geodir_imex_update_term( $taxonomy, $term_data ) ) {
|
| 4176 |
|
$updated++;
|
| 4177 |
|
} else {
|
| 4178 |
|
$invalid++;
|
| 4179 |
|
geodir_error_log( wp_sprintf( $gd_error_log, ($index + 1) ) . ' ' . __( 'Could not be updated due to invalid data (check & remove if any invalid characters used in data)', 'geodirectory' ) );
|
| 4180 |
|
}
|
| 4181 |
|
} else {
|
| 4182 |
|
if ( $term_id = geodir_imex_insert_term( $taxonomy, $term_data ) ) {
|
| 4183 |
|
$created++;
|
|
@@ 4181-4188 (lines=8) @@
|
| 4178 |
|
$invalid++;
|
| 4179 |
|
geodir_error_log( wp_sprintf( $gd_error_log, ($index + 1) ) . ' ' . __( 'Could not be updated due to invalid data (check & remove if any invalid characters used in data)', 'geodirectory' ) );
|
| 4180 |
|
}
|
| 4181 |
|
} else {
|
| 4182 |
|
if ( $term_id = geodir_imex_insert_term( $taxonomy, $term_data ) ) {
|
| 4183 |
|
$created++;
|
| 4184 |
|
} else {
|
| 4185 |
|
$invalid++;
|
| 4186 |
|
geodir_error_log( wp_sprintf( $gd_error_log, ($index + 1) ) . ' ' . __( 'Could not be added due to invalid data (check & remove if any invalid characters used in data)', 'geodirectory' ) );
|
| 4187 |
|
}
|
| 4188 |
|
}
|
| 4189 |
|
} else if ( $import_choice == 'skip' ) {
|
| 4190 |
|
if ( $cat_id > 0 && $term = (array)term_exists( $cat_id, $taxonomy ) ) {
|
| 4191 |
|
$skipped++;
|
|
@@ 4194-4201 (lines=8) @@
|
| 4191 |
|
$skipped++;
|
| 4192 |
|
} else if ( $term_data['slug'] != '' && $term = (array)term_exists( $term_data['slug'], $taxonomy ) ) {
|
| 4193 |
|
$skipped++;
|
| 4194 |
|
} else {
|
| 4195 |
|
if ( $term_id = geodir_imex_insert_term( $taxonomy, $term_data ) ) {
|
| 4196 |
|
$created++;
|
| 4197 |
|
} else {
|
| 4198 |
|
$invalid++;
|
| 4199 |
|
geodir_error_log( wp_sprintf( $gd_error_log, ($index + 1) ) . ' ' . __( 'Could not be updated due to invalid data (check & remove if any invalid characters used in data)', 'geodirectory' ) );
|
| 4200 |
|
}
|
| 4201 |
|
}
|
| 4202 |
|
} else {
|
| 4203 |
|
$invalid++;
|
| 4204 |
|
geodir_error_log( wp_sprintf( $gd_error_log, ($index + 1) ) . ' ' . __( 'Could not be added due to invalid data (check & remove if any invalid characters used in data)', 'geodirectory' ) );
|