|
@@ 4230-4235 (lines=6) @@
|
| 4227 |
|
if ( $cat_id > 0 && $term = (array)term_exists( $cat_id, $taxonomy ) ) {
|
| 4228 |
|
$term_data['term_id'] = $term['term_id'];
|
| 4229 |
|
|
| 4230 |
|
if ( $term_id = geodir_imex_update_term( $taxonomy, $term_data ) ) {
|
| 4231 |
|
$updated++;
|
| 4232 |
|
} else {
|
| 4233 |
|
$invalid++;
|
| 4234 |
|
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' ) );
|
| 4235 |
|
}
|
| 4236 |
|
} else if ( $term_data['slug'] != '' && $term = (array)term_exists( $term_data['slug'], $taxonomy ) ) {
|
| 4237 |
|
$term_data['term_id'] = $term['term_id'];
|
| 4238 |
|
|
|
@@ 4239-4244 (lines=6) @@
|
| 4236 |
|
} else if ( $term_data['slug'] != '' && $term = (array)term_exists( $term_data['slug'], $taxonomy ) ) {
|
| 4237 |
|
$term_data['term_id'] = $term['term_id'];
|
| 4238 |
|
|
| 4239 |
|
if ( $term_id = geodir_imex_update_term( $taxonomy, $term_data ) ) {
|
| 4240 |
|
$updated++;
|
| 4241 |
|
} else {
|
| 4242 |
|
$invalid++;
|
| 4243 |
|
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' ) );
|
| 4244 |
|
}
|
| 4245 |
|
} else {
|
| 4246 |
|
if ( $term_id = geodir_imex_insert_term( $taxonomy, $term_data ) ) {
|
| 4247 |
|
$created++;
|
|
@@ 4245-4252 (lines=8) @@
|
| 4242 |
|
$invalid++;
|
| 4243 |
|
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' ) );
|
| 4244 |
|
}
|
| 4245 |
|
} else {
|
| 4246 |
|
if ( $term_id = geodir_imex_insert_term( $taxonomy, $term_data ) ) {
|
| 4247 |
|
$created++;
|
| 4248 |
|
} else {
|
| 4249 |
|
$invalid++;
|
| 4250 |
|
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' ) );
|
| 4251 |
|
}
|
| 4252 |
|
}
|
| 4253 |
|
} else if ( $import_choice == 'skip' ) {
|
| 4254 |
|
if ( $cat_id > 0 && $term = (array)term_exists( $cat_id, $taxonomy ) ) {
|
| 4255 |
|
$skipped++;
|
|
@@ 4258-4265 (lines=8) @@
|
| 4255 |
|
$skipped++;
|
| 4256 |
|
} else if ( $term_data['slug'] != '' && $term = (array)term_exists( $term_data['slug'], $taxonomy ) ) {
|
| 4257 |
|
$skipped++;
|
| 4258 |
|
} else {
|
| 4259 |
|
if ( $term_id = geodir_imex_insert_term( $taxonomy, $term_data ) ) {
|
| 4260 |
|
$created++;
|
| 4261 |
|
} else {
|
| 4262 |
|
$invalid++;
|
| 4263 |
|
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' ) );
|
| 4264 |
|
}
|
| 4265 |
|
}
|
| 4266 |
|
} else {
|
| 4267 |
|
$invalid++;
|
| 4268 |
|
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' ) );
|