Skip to content

Commit

Permalink
Update importer (resolves #69) (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
greatislander authored Apr 30, 2020
1 parent 7f692f2 commit 5e07e0b
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 345 deletions.
1 change: 0 additions & 1 deletion assets/js/admin/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
const resourceImport = {
complete: {
posts: 0,
terms: 0,
},

/**
Expand Down
16 changes: 0 additions & 16 deletions includes/classes/ImportUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,6 @@ public function stream_import() {
add_action( 'resource_importer.process_failed.resource', [ $this, 'imported_resource' ], 10, 2 );
add_action( 'resource_importer.process_already_imported.resource', [ $this, 'already_imported_resource' ], 10, 2 );
add_action( 'resource_importer.process_skipped.resource', [ $this, 'already_imported_resource' ], 10, 2 );
add_action( 'resource_importer.processed.term', [ $this, 'imported_term' ] );
add_action( 'resource_importer.process_failed.term', [ $this, 'imported_term' ] );
add_action( 'resource_importer.process_already_imported.term', [ $this, 'imported_term' ] );

// Clean up some memory
unset( $settings );
Expand Down Expand Up @@ -561,17 +558,4 @@ public function already_imported_resource( $data ) {
]
);
}

/**
* Send message when a term has been imported.
*/
public function imported_term() {
$this->emit_sse_message(
[
'action' => 'updateDelta',
'type' => 'terms',
'delta' => 1,
]
);
}
}
Loading

0 comments on commit 5e07e0b

Please sign in to comment.