Skip to content

Commit ed6ba2a

Browse files
authored
Merge pull request #1007 from Codeinwp/bugfix/873
Improved purge and reset button
2 parents 0911e42 + 75b1543 commit ed6ba2a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

includes/admin/feedzy-rss-feeds-import.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -755,15 +755,15 @@ public function manage_feedzy_import_columns( $column, $post_id ) {
755755
* @access private
756756
*/
757757
private function get_last_run_details( $post_id ) {
758-
$msg = '';
759-
$last = get_post_meta( $post_id, 'last_run', true );
760-
$status = array(
758+
$msg = '';
759+
$import_info = get_post_meta( $post_id, 'import_info', true );
760+
$status = array(
761761
'total' => '-',
762762
'items' => '-',
763763
'duplicates' => '-',
764764
'cumulative' => '-',
765765
);
766-
if ( $last ) {
766+
if ( $import_info ) {
767767
$status = array(
768768
'total' => 0,
769769
'items' => 0,
@@ -882,11 +882,11 @@ private function get_last_run_details( $post_id ) {
882882
__( 'Items that were imported across all runs', 'feedzy-rss-feeds' ),
883883
$status['cumulative'],
884884
// fifth cell
885-
empty( $last ) ? '' : ( ! empty( $errors ) ? 'feedzy-has-popup import-error' : 'import-success' ),
886-
empty( $last ) ? '-1' : ( ! empty( $errors ) ? 0 : 1 ),
885+
empty( $import_info ) ? '' : ( ! empty( $errors ) ? 'feedzy-has-popup import-error' : 'import-success' ),
886+
empty( $import_info ) ? '-1' : ( ! empty( $errors ) ? 0 : 1 ),
887887
$post_id,
888888
__( 'View the errors', 'feedzy-rss-feeds' ),
889-
empty( $last ) ? '-' : ( ! empty( $errors ) ? '<i class="dashicons dashicons-warning"></i>' : '<i class="dashicons dashicons-yes-alt"></i>' ),
889+
empty( $import_info ) ? '-' : ( ! empty( $errors ) ? '<i class="dashicons dashicons-warning"></i>' : '<i class="dashicons dashicons-yes-alt"></i>' ),
890890
// second row
891891
__( 'Found', 'feedzy-rss-feeds' ),
892892
__( 'Duplicates', 'feedzy-rss-feeds' ),
@@ -2709,13 +2709,13 @@ private function purge_data() {
27092709
wp_delete_post( $post_id, true );
27102710
}
27112711
}
2712+
delete_post_meta( $id, 'import_errors' );
2713+
delete_post_meta( $id, 'import_info' );
2714+
delete_post_meta( $id, 'imported_items' );
2715+
delete_post_meta( $id, 'imported_items_count' );
27122716
}
27132717

27142718
delete_post_meta( $id, 'imported_items_hash' );
2715-
delete_post_meta( $id, 'imported_items' );
2716-
delete_post_meta( $id, 'imported_items_count' );
2717-
delete_post_meta( $id, 'import_errors' );
2718-
delete_post_meta( $id, 'import_info' );
27192719
delete_post_meta( $id, 'last_run' );
27202720
wp_die();
27212721
}

0 commit comments

Comments
 (0)