|
@@ 267-282 (lines=16) @@
|
| 264 |
|
WP_CLI::error( sprintf( __( 'Error exporting pod item: %s', 'pods' ), $e->getMessage() ) ); |
| 265 |
|
} |
| 266 |
|
|
| 267 |
|
if ( ! empty( $data ) ) { |
| 268 |
|
// Load PodsMigrate class file for use. |
| 269 |
|
pods_migrate(); |
| 270 |
|
|
| 271 |
|
$file = $assoc_args['file']; |
| 272 |
|
|
| 273 |
|
$export_file = PodsMigrate::export_data_to_file( $file, $data, true ); |
| 274 |
|
|
| 275 |
|
if ( $export_file ) { |
| 276 |
|
WP_CLI::success( sprintf( __( 'Pod item exported: %s', 'pods' ), $export_file ) ); |
| 277 |
|
} else { |
| 278 |
|
WP_CLI::error( __( 'Pod item not exported.', 'pods' ) ); |
| 279 |
|
} |
| 280 |
|
} else { |
| 281 |
|
WP_CLI::error( __( 'No export data found.', 'pods' ) ); |
| 282 |
|
} |
| 283 |
|
|
| 284 |
|
} |
| 285 |
|
|
|
@@ 355-370 (lines=16) @@
|
| 352 |
|
WP_CLI::error( sprintf( __( 'Error exporting pod items: %s', 'pods' ), $e->getMessage() ) ); |
| 353 |
|
} |
| 354 |
|
|
| 355 |
|
if ( ! empty( $data ) ) { |
| 356 |
|
// Load PodsMigrate class file for use. |
| 357 |
|
pods_migrate(); |
| 358 |
|
|
| 359 |
|
$file = $assoc_args['file']; |
| 360 |
|
|
| 361 |
|
$export_file = PodsMigrate::export_data_to_file( $file, $data ); |
| 362 |
|
|
| 363 |
|
if ( $export_file ) { |
| 364 |
|
WP_CLI::success( sprintf( __( 'Pod items exported: %s', 'pods' ), $export_file ) ); |
| 365 |
|
} else { |
| 366 |
|
WP_CLI::error( __( 'Pod items not exported.', 'pods' ) ); |
| 367 |
|
} |
| 368 |
|
} else { |
| 369 |
|
WP_CLI::error( __( 'No pod item export data found.', 'pods' ) ); |
| 370 |
|
} |
| 371 |
|
|
| 372 |
|
} |
| 373 |
|
|