| @@ -6,9 +6,8 @@ | ||
| 6 | 6 | use Templately\Core\Importer\Exception\NonRetirableErrorException; |
| 7 | 7 | use Templately\Core\Importer\Runners\AIContent; |
| 8 | 8 | use Templately\Core\Importer\Runners\Attachments; |
| 9 | 9 | use Templately\Core\Importer\Runners\BaseRunner; |
| 10 | -use Templately\Core\Importer\Runners\CustomCSS; | |
| 11 | 10 | use Templately\Core\Importer\Runners\Customizer; |
| 12 | 11 | use Templately\Core\Importer\Runners\Dependencies; |
| 13 | 12 | use Templately\Core\Importer\Runners\ElementorContent; |
| 14 | 13 | use Templately\Core\Importer\Runners\ExtraContent; |
| @@ -53,9 +52,8 @@ | ||
| 53 | 52 | // TODO: Site Settings Import Runner |
| 54 | 53 | new Dependencies( $this->request_params ), |
| 55 | 54 | new Attachments( $this->request_params ), |
| 56 | 55 | new Customizer( $this->request_params ), |
| 57 | - new CustomCSS( $this->request_params ), | |
| 58 | 56 | new ExtraContent( $this->request_params ), |
| 59 | 57 | new Templates( $this->request_params ), |
| 60 | 58 | new GutenbergContent( $this->request_params ), |
| 61 | 59 | new ElementorContent( $this->request_params ), |
| @@ -62,10 +60,8 @@ | ||
| 62 | 60 | new WPContent( $this->request_params ), |
| 63 | 61 | // new AIContent( $this->request_params ), |
| 64 | 62 | new Finalizer( $this->request_params ) |
| 65 | 63 | ]; |
| 66 | - | |
| 67 | - $this->runners = apply_filters( 'templately_import_runners', $this->runners, $this->request_params ); | |
| 68 | 64 | } |
| 69 | 65 | |
| 70 | 66 | public function run( $callable = null ): array { |
| 71 | 67 | $data = $this->request_params; |
| @@ -80,14 +76,16 @@ | ||
| 80 | 76 | $import = []; |
| 81 | 77 | |
| 82 | 78 | try{ |
| 83 | 79 | if ( $runner->should_run( $data, $imported_data ) ) { |
| 84 | - if (!$this->is_key_processed($runner->get_name(), 'runner_start')) { | |
| 80 | + $progress = $this->get_progress(); | |
| 81 | + if(!in_array($runner->get_name(), $progress)){ | |
| 85 | 82 | $runner->log( 0 ); |
| 86 | - $this->mark_key_processed($runner->get_name(), 'runner_start'); | |
| 83 | + $progress[] = $runner->get_name(); | |
| 84 | + $this->update_progress( $progress); | |
| 87 | 85 | } |
| 88 | 86 | $import = $runner->import( $data, $imported_data ); |
| 89 | - $imported_data = array_merge( $imported_data, $import ); | |
| 87 | + $imported_data = array_merge_recursive( $imported_data, $import ); | |
| 90 | 88 | |
| 91 | 89 | if( $runner->get_name() != 'finalize' ) { |
| 92 | 90 | $runner->log( 100 ); |
| 93 | 91 | } else { |