Migration, Backup, Staging – WPvivid - Version 0.9.46

Version Description

  • Fixed: Some special characters in database could not be restored properly.
  • Fixed: Only 1000 backups stored on Amazon S3 could be displayed.
  • Fixed: Unused image cleaner also isolated images used in CSS files.
  • Successfully tested with WordPress 5.5.1.
  • Fixed some bugs in the plugin code.
  • Optimized the plugin code.
Download this release

Release Info

Developer wpvivid
Plugin Icon 128x128 Migration, Backup, Staging – WPvivid
Version 0.9.46
Comparing to
See all releases

Code changes from version 0.9.45 to 0.9.46

admin/css/wpvivid-admin.css CHANGED
@@ -257,4 +257,10 @@
257
  }
258
  .quickbackup-addon a{
259
  text-decoration: none;
 
 
 
 
 
 
260
  }
257
  }
258
  .quickbackup-addon a{
259
  text-decoration: none;
260
+ }
261
+
262
+ .wpvivid-backup-tips{
263
+ float:left;
264
+ width:100%;
265
+ background-color:#f1f1f1;
266
  }
includes/class-wpvivid-crypt.php CHANGED
@@ -79,6 +79,12 @@ class WPvivid_crypt
79
  $this->rsa->loadKey($this->public_key);
80
  return $this->rsa->encrypt($info);
81
  }
 
 
 
 
 
 
82
  }
83
 
84
  class WPvivid_Crypt_File
79
  $this->rsa->loadKey($this->public_key);
80
  return $this->rsa->encrypt($info);
81
  }
82
+
83
+ public function encrypt_token($token)
84
+ {
85
+ $this->rsa->loadKey($this->public_key);
86
+ return $this->rsa->encrypt($token);
87
+ }
88
  }
89
 
90
  class WPvivid_Crypt_File
includes/class-wpvivid-interface-mainwp.php CHANGED
@@ -60,6 +60,7 @@ class WPvivid_Interface_MainWP
60
  if($list_tasks[$task['id']]['task_info']['need_update_last_task']===true){
61
  $task_msg = WPvivid_taskmanager::get_task($task['id']);
62
  WPvivid_Setting::update_option('wpvivid_last_msg',$task_msg);
 
63
  }
64
  }
65
  $ret['wpvivid']['task']=$list_tasks;
60
  if($list_tasks[$task['id']]['task_info']['need_update_last_task']===true){
61
  $task_msg = WPvivid_taskmanager::get_task($task['id']);
62
  WPvivid_Setting::update_option('wpvivid_last_msg',$task_msg);
63
+ apply_filters('wpvivid_set_backup_report_addon_mainwp', $task_msg);
64
  }
65
  }
66
  $ret['wpvivid']['task']=$list_tasks;
includes/class-wpvivid-public-interface.php CHANGED
@@ -94,6 +94,7 @@ class WPvivid_Public_Interface
94
  if($list_tasks[$task['id']]['task_info']['need_update_last_task']===true){
95
  $task_msg = WPvivid_taskmanager::get_task($task['id']);
96
  WPvivid_Setting::update_option('wpvivid_last_msg',$task_msg);
 
97
  }
98
  }
99
  $ret['wpvivid']['task']=$list_tasks;
94
  if($list_tasks[$task['id']]['task_info']['need_update_last_task']===true){
95
  $task_msg = WPvivid_taskmanager::get_task($task['id']);
96
  WPvivid_Setting::update_option('wpvivid_last_msg',$task_msg);
97
+ apply_filters('wpvivid_set_backup_report_addon_mainwp', $task_msg);
98
  }
99
  }
100
  $ret['wpvivid']['task']=$list_tasks;
includes/class-wpvivid-setting.php CHANGED
@@ -656,13 +656,15 @@ class WPvivid_Setting
656
 
657
  $data['backup_custom_setting']=apply_filters('wpvivid_get_backup_custom_setting_mainwp', array());
658
 
659
- $data['report_addon'] = apply_filters('wpvivid_archieve_report_addon_mainwp', array());
660
 
661
  $data['menu_capability'] = apply_filters('wpvivid_get_menu_capability_mainwp', array());
662
 
663
  $data['white_label_setting'] = apply_filters('wpvivid_get_white_label_mainwp', array());
664
 
665
  $data['incremental_backup_setting'] = apply_filters('wpvivid_get_incremental_backup_mainwp', array());
 
 
666
  return $data;
667
  }
668
  }
656
 
657
  $data['backup_custom_setting']=apply_filters('wpvivid_get_backup_custom_setting_mainwp', array());
658
 
659
+ //$data['report_addon'] = apply_filters('wpvivid_archieve_report_addon_mainwp', array());
660
 
661
  $data['menu_capability'] = apply_filters('wpvivid_get_menu_capability_mainwp', array());
662
 
663
  $data['white_label_setting'] = apply_filters('wpvivid_get_white_label_mainwp', array());
664
 
665
  $data['incremental_backup_setting'] = apply_filters('wpvivid_get_incremental_backup_mainwp', array());
666
+
667
+ $data['last_backup_report'] = apply_filters('wpvivid_get_backup_report_addon_mainwp', array());
668
  return $data;
669
  }
670
  }
includes/class-wpvivid.php CHANGED
@@ -3537,6 +3537,7 @@ class WPvivid {
3537
  public function update_last_backup_task($task)
3538
  {
3539
  WPvivid_Setting::update_option('wpvivid_last_msg',$task);
 
3540
  }
3541
  /**
3542
  * Get last backup information
3537
  public function update_last_backup_task($task)
3538
  {
3539
  WPvivid_Setting::update_option('wpvivid_last_msg',$task);
3540
+ apply_filters('wpvivid_set_backup_report_addon_mainwp', $task);
3541
  }
3542
  /**
3543
  * Get last backup information
includes/upload-cleaner/class-wpvivid-uploads-cleaner.php CHANGED
@@ -194,6 +194,12 @@ class WPvivid_Unused_Upload_Files_List extends WP_List_Table
194
  return !empty($this->list);
195
  }
196
 
 
 
 
 
 
 
197
  public function prepare_items()
198
  {
199
  $columns = $this->get_columns();
@@ -387,6 +393,11 @@ class WPvivid_Unused_Upload_Files_List extends WP_List_Table
387
  </select>
388
  <input type="submit" class="button action" value="Apply">
389
  </div>
 
 
 
 
 
390
  <?php
391
  $this->extra_tablenav( $which );
392
  $this->pagination( $which );
@@ -409,7 +420,11 @@ class WPvivid_Unused_Upload_Files_List extends WP_List_Table
409
  </select>
410
  <input type="submit" class="button action" value="Apply">
411
  </div>
412
-
 
 
 
 
413
  <br class="clear" />
414
  </div>
415
  <?php
@@ -633,6 +648,13 @@ class WPvivid_Isolate_Files_List extends WP_List_Table
633
  return !empty($this->list);
634
  }
635
 
 
 
 
 
 
 
 
636
  public function prepare_items()
637
  {
638
  $columns = $this->get_columns();
@@ -831,6 +853,11 @@ class WPvivid_Isolate_Files_List extends WP_List_Table
831
  </select>
832
  <input type="submit" class="button action" value="Apply">
833
  </div>
 
 
 
 
 
834
  <div class="wpvivid-backup-tips" style="background: #fff; border: 1px solid #f1f1f1; border-radius: 6px; margin-top: 10px;margin-bottom: 10px">
835
  <div style="float: left;">
836
  <div style="padding: 10px;">
@@ -864,6 +891,11 @@ class WPvivid_Isolate_Files_List extends WP_List_Table
864
  </select>
865
  <input type="submit" class="button action" value="Apply">
866
  </div>
 
 
 
 
 
867
  <div class="wpvivid-backup-tips" style="background: #fff; border: 1px solid #f1f1f1; border-radius: 6px; margin-top: 10px;margin-bottom: 10px">
868
  <div style="float: left;">
869
  <div style="padding: 10px;">
@@ -995,7 +1027,7 @@ class WPvivid_Uploads_Cleaner
995
 
996
  $menu['id']='wpvivid_admin_menu_cleaner';
997
  $menu['parent']='wpvivid_admin_menu';
998
- $menu['title']=__('Image Cleaner', 'wpvivid-backuprestore');
999
  $menu['tab']= 'admin.php?page='.apply_filters('wpvivid_white_label_plugin_name', 'wpvivid-cleaner');
1000
  $menu['href']=$admin_url . 'admin.php?page='.apply_filters('wpvivid_white_label_plugin_name', 'wpvivid-cleaner');
1001
  $menu['capability']='administrator';
@@ -1008,7 +1040,7 @@ class WPvivid_Uploads_Cleaner
1008
  {
1009
  $submenu['parent_slug']=apply_filters('wpvivid_white_label_slug', WPVIVID_PLUGIN_SLUG);
1010
  $submenu['page_title']= apply_filters('wpvivid_white_label_display', 'WPvivid Backup');
1011
- $submenu['menu_title']=__('Image Cleaner', 'wpvivid-backuprestore');
1012
  $submenu['capability']='administrator';
1013
  $submenu['menu_slug']=strtolower(sprintf('%s-cleaner', apply_filters('wpvivid_white_label_slug', 'wpvivid')));
1014
  $submenu['index']=3;
@@ -1043,7 +1075,7 @@ class WPvivid_Uploads_Cleaner
1043
  <div class="wrap" style="max-width:1720px;">
1044
  <h1>
1045
  <?php
1046
- echo __('WPvivid Image Cleaner', 'wpvivid');
1047
  ?>
1048
  </h1>
1049
  <?php
@@ -1077,7 +1109,9 @@ class WPvivid_Uploads_Cleaner
1077
 
1078
  public function output_scan()
1079
  {
 
1080
  $scanner=new WPvivid_Uploads_Scanner();
 
1081
  $count=$scanner->get_scan_result_count();
1082
  $size=$scanner->get_scan_result_size();
1083
  if($count===false)
@@ -1145,6 +1179,7 @@ class WPvivid_Uploads_Cleaner
1145
  <?php
1146
  if(!empty($folders))
1147
  {
 
1148
  foreach ($folders as $folder)
1149
  {
1150
  echo "<option value='$folder'>$folder</option>";
@@ -1201,13 +1236,24 @@ class WPvivid_Uploads_Cleaner
1201
  };
1202
  wpvivid_post_request(ajax_data, function (data)
1203
  {
1204
- jQuery('#wpvivid_scan_result_list').html('');
 
1205
  try
1206
  {
1207
  var jsonarray = jQuery.parseJSON(data);
1208
  if (jsonarray.result === 'success')
1209
  {
1210
- jQuery('#wpvivid_scan_result_list').html(jsonarray.html);
 
 
 
 
 
 
 
 
 
 
1211
  }
1212
  else
1213
  {
@@ -1220,11 +1266,18 @@ class WPvivid_Uploads_Cleaner
1220
  }
1221
  }, function (XMLHttpRequest, textStatus, errorThrown)
1222
  {
1223
- var error_message = wpvivid_output_ajaxerror('achieving backup', textStatus, errorThrown);
1224
  alert(error_message);
1225
  });
1226
  }
1227
 
 
 
 
 
 
 
 
1228
  jQuery('#wpvivid_scan_result_list').on("click",'.first-page',function()
1229
  {
1230
  wpvivid_get_result_list('first');
@@ -1291,7 +1344,6 @@ class WPvivid_Uploads_Cleaner
1291
  jQuery('#wpvivid_scan_result_list').find('.action').prop('disabled', true);
1292
  //jQuery('#wpvivid_isolate_selected_image').prop('disabled', true);
1293
  //jQuery('#wpvivid_isolate_list_image').prop('disabled', true);
1294
-
1295
  var ajax_data = {
1296
  'action': 'wpvivid_uc_add_exclude_files',
1297
  'selected':selected,
@@ -1326,7 +1378,7 @@ class WPvivid_Uploads_Cleaner
1326
  jQuery('#wpvivid_scan_result_list').find('.action').prop('disabled', false);
1327
  //jQuery('#wpvivid_isolate_selected_image').prop('disabled', false);
1328
  //jQuery('#wpvivid_isolate_list_image').prop('disabled', false);
1329
- var error_message = wpvivid_output_ajaxerror('achieving backup', textStatus, errorThrown);
1330
  alert(error_message);
1331
  });
1332
  }
@@ -1353,8 +1405,10 @@ class WPvivid_Uploads_Cleaner
1353
  'search':wpvivid_result_list_search,
1354
  'folder':wpvivid_result_list_folder
1355
  };
 
1356
  wpvivid_post_request(ajax_data, function (data)
1357
  {
 
1358
  //jQuery('#wpvivid_isolate_selected_image').prop('disabled', false);
1359
  //jQuery('#wpvivid_isolate_list_image').prop('disabled', false);
1360
  jQuery('#wpvivid_scan_result_list').find('.action').prop('disabled', false);
@@ -1378,10 +1432,11 @@ class WPvivid_Uploads_Cleaner
1378
  }
1379
  }, function (XMLHttpRequest, textStatus, errorThrown)
1380
  {
 
1381
  jQuery('#wpvivid_scan_result_list').find('.action').prop('disabled', false);
1382
  //jQuery('#wpvivid_isolate_selected_image').prop('disabled', false);
1383
  //jQuery('#wpvivid_isolate_list_image').prop('disabled', false);
1384
- var error_message = wpvivid_output_ajaxerror('achieving backup', textStatus, errorThrown);
1385
  alert(error_message);
1386
  });
1387
  }
@@ -1393,12 +1448,13 @@ class WPvivid_Uploads_Cleaner
1393
  'search':wpvivid_result_list_search,
1394
  'folder':wpvivid_result_list_folder
1395
  };
1396
-
1397
  //jQuery('#wpvivid_isolate_selected_image').prop('disabled', true);
1398
  //jQuery('#wpvivid_isolate_list_image').prop('disabled', true);
1399
  jQuery('#wpvivid_scan_result_list').find('.action').prop('disabled', true);
1400
  wpvivid_post_request(ajax_data, function (data)
1401
  {
 
1402
  try
1403
  {
1404
  var jsonarray = jQuery.parseJSON(data);
@@ -1430,11 +1486,12 @@ class WPvivid_Uploads_Cleaner
1430
  }
1431
  }, function (XMLHttpRequest, textStatus, errorThrown)
1432
  {
 
1433
  jQuery('#wpvivid_scan_result_list').find('.action').prop('disabled', false);
1434
  //jQuery('#wpvivid_isolate_selected_image').prop('disabled', false);
1435
  //jQuery('#wpvivid_isolate_list_image').prop('disabled', false);
1436
 
1437
- var error_message = wpvivid_output_ajaxerror('achieving backup', textStatus, errorThrown);
1438
  alert(error_message);
1439
  });
1440
  }
@@ -1480,7 +1537,7 @@ class WPvivid_Uploads_Cleaner
1480
 
1481
  }, function(XMLHttpRequest, textStatus, errorThrown)
1482
  {
1483
- var error_message = wpvivid_output_ajaxerror('achieving backup', textStatus, errorThrown);
1484
  alert(error_message);
1485
  jQuery('#wpvivid_scan_result_list').find('.action').prop('disabled', false);
1486
  //jQuery('#wpvivid_isolate_selected_image').prop('disabled', false);
@@ -1558,7 +1615,7 @@ class WPvivid_Uploads_Cleaner
1558
 
1559
  }, function(XMLHttpRequest, textStatus, errorThrown)
1560
  {
1561
- var error_message = wpvivid_output_ajaxerror('achieving backup', textStatus, errorThrown);
1562
  alert(error_message);
1563
 
1564
  jQuery('#wpvivid_uc_progress').hide();
@@ -1613,7 +1670,7 @@ class WPvivid_Uploads_Cleaner
1613
 
1614
  }, function(XMLHttpRequest, textStatus, errorThrown)
1615
  {
1616
- var error_message = wpvivid_output_ajaxerror('achieving backup', textStatus, errorThrown);
1617
  alert(error_message);
1618
 
1619
  jQuery('#wpvivid_uc_progress').hide();
@@ -1667,7 +1724,7 @@ class WPvivid_Uploads_Cleaner
1667
 
1668
  }, function(XMLHttpRequest, textStatus, errorThrown)
1669
  {
1670
- var error_message = wpvivid_output_ajaxerror('achieving backup', textStatus, errorThrown);
1671
  alert(error_message);
1672
 
1673
  jQuery('#wpvivid_uc_progress').hide();
@@ -1722,7 +1779,7 @@ class WPvivid_Uploads_Cleaner
1722
 
1723
  }, function(XMLHttpRequest, textStatus, errorThrown)
1724
  {
1725
- var error_message = wpvivid_output_ajaxerror('achieving backup', textStatus, errorThrown);
1726
  alert(error_message);
1727
 
1728
  jQuery('#wpvivid_uc_progress').hide();
@@ -1763,6 +1820,7 @@ class WPvivid_Uploads_Cleaner
1763
  <select id="wpvivid_iso_list_folder" style="margin-top: -5px;">
1764
  <option selected="selected" value="0">All Folders</option>
1765
  <?php
 
1766
  foreach ($result['folders'] as $folder)
1767
  {
1768
  echo "<option value='$folder'>$folder</option>";
@@ -1816,13 +1874,23 @@ class WPvivid_Uploads_Cleaner
1816
 
1817
  wpvivid_post_request(ajax_data, function (data)
1818
  {
1819
- jQuery('#wpvivid_iso_files_list').html('');
1820
  try
1821
  {
1822
  var jsonarray = jQuery.parseJSON(data);
1823
  if (jsonarray.result === 'success')
1824
  {
1825
- jQuery('#wpvivid_iso_files_list').html(jsonarray.html);
 
 
 
 
 
 
 
 
 
 
1826
  }
1827
  else
1828
  {
@@ -1835,7 +1903,7 @@ class WPvivid_Uploads_Cleaner
1835
  }
1836
  }, function (XMLHttpRequest, textStatus, errorThrown)
1837
  {
1838
- var error_message = wpvivid_output_ajaxerror('achieving backup', textStatus, errorThrown);
1839
  alert(error_message);
1840
  });
1841
  }
@@ -1845,6 +1913,13 @@ class WPvivid_Uploads_Cleaner
1845
  wpvivid_get_iso_list('first');
1846
  });
1847
 
 
 
 
 
 
 
 
1848
  jQuery('#wpvivid_iso_files_list').on("click",'.prev-page',function()
1849
  {
1850
  var page=parseInt(jQuery(this).attr('value'));
@@ -1915,8 +1990,11 @@ class WPvivid_Uploads_Cleaner
1915
  'search':wpvivid_iso_list_search,
1916
  'folder':wpvivid_iso_list_folder
1917
  };
 
 
1918
  wpvivid_post_request(ajax_data, function (data)
1919
  {
 
1920
  jQuery('#wpvivid_iso_files_list').find('.action').prop('disabled', false);
1921
 
1922
  jQuery('#wpvivid_iso_files_list').html('');
@@ -1938,13 +2016,14 @@ class WPvivid_Uploads_Cleaner
1938
  }
1939
  }, function (XMLHttpRequest, textStatus, errorThrown)
1940
  {
 
1941
  jQuery('#wpvivid_iso_files_list').find('.action').prop('disabled', false);
1942
  //jQuery('#wpvivid_delete_selected_image').prop('disabled', false);
1943
  //jQuery('#wpvivid_delete_list_image').prop('disabled', false);
1944
  //jQuery('#wpvivid_restore_selected_image').prop('disabled', false);
1945
  //jQuery('#wpvivid_restore_list_image').prop('disabled', false);
1946
 
1947
- var error_message = wpvivid_output_ajaxerror('achieving backup', textStatus, errorThrown);
1948
  alert(error_message);
1949
  });
1950
  }
@@ -1957,9 +2036,11 @@ class WPvivid_Uploads_Cleaner
1957
  'folder':wpvivid_iso_list_folder
1958
  };
1959
  jQuery('#wpvivid_iso_files_list').find('.action').prop('disabled', true);
1960
-
 
1961
  wpvivid_post_request(ajax_data, function (data)
1962
  {
 
1963
  try
1964
  {
1965
  var jsonarray = jQuery.parseJSON(data);
@@ -1991,13 +2072,14 @@ class WPvivid_Uploads_Cleaner
1991
  }
1992
  }, function (XMLHttpRequest, textStatus, errorThrown)
1993
  {
 
1994
  jQuery('#wpvivid_iso_files_list').find('.action').prop('disabled', false);
1995
  //jQuery('#wpvivid_delete_selected_image').prop('disabled', false);
1996
  //jQuery('#wpvivid_delete_list_image').prop('disabled', false);
1997
  //jQuery('#wpvivid_restore_selected_image').prop('disabled', false);
1998
  //jQuery('#wpvivid_restore_list_image').prop('disabled', false);
1999
 
2000
- var error_message = wpvivid_output_ajaxerror('achieving backup', textStatus, errorThrown);
2001
  alert(error_message);
2002
  });
2003
  }
@@ -2041,7 +2123,7 @@ class WPvivid_Uploads_Cleaner
2041
 
2042
  }, function(XMLHttpRequest, textStatus, errorThrown)
2043
  {
2044
- var error_message = wpvivid_output_ajaxerror('achieving backup', textStatus, errorThrown);
2045
  alert(error_message);
2046
  jQuery('#wpvivid_iso_files_list').find('.action').prop('disabled', false);
2047
  });
@@ -2069,8 +2151,11 @@ class WPvivid_Uploads_Cleaner
2069
  'search':wpvivid_iso_list_search,
2070
  'folder':wpvivid_iso_list_folder
2071
  };
 
 
2072
  wpvivid_post_request(ajax_data, function (data)
2073
  {
 
2074
  jQuery('#wpvivid_iso_files_list').find('.action').prop('disabled', false);
2075
 
2076
  jQuery('#wpvivid_iso_files_list').html('');
@@ -2093,13 +2178,14 @@ class WPvivid_Uploads_Cleaner
2093
  }
2094
  }, function (XMLHttpRequest, textStatus, errorThrown)
2095
  {
 
2096
  jQuery('#wpvivid_iso_files_list').find('.action').prop('disabled', false);
2097
  //jQuery('#wpvivid_delete_selected_image').prop('disabled', false);
2098
  //jQuery('#wpvivid_delete_list_image').prop('disabled', false);
2099
  //jQuery('#wpvivid_restore_selected_image').prop('disabled', false);
2100
  //jQuery('#wpvivid_restore_list_image').prop('disabled', false);
2101
 
2102
- var error_message = wpvivid_output_ajaxerror('achieving backup', textStatus, errorThrown);
2103
  alert(error_message);
2104
  });
2105
  }
@@ -2111,8 +2197,11 @@ class WPvivid_Uploads_Cleaner
2111
  'search':wpvivid_iso_list_search,
2112
  'folder':wpvivid_iso_list_folder
2113
  };
 
 
2114
  wpvivid_post_request(ajax_data, function (data)
2115
  {
 
2116
  try
2117
  {
2118
  var jsonarray = jQuery.parseJSON(data);
@@ -2144,13 +2233,14 @@ class WPvivid_Uploads_Cleaner
2144
  }
2145
  }, function (XMLHttpRequest, textStatus, errorThrown)
2146
  {
 
2147
  jQuery('#wpvivid_iso_files_list').find('.action').prop('disabled', false);
2148
  //jQuery('#wpvivid_delete_selected_image').prop('disabled', false);
2149
  //jQuery('#wpvivid_delete_list_image').prop('disabled', false);
2150
  //jQuery('#wpvivid_restore_selected_image').prop('disabled', false);
2151
  //jQuery('#wpvivid_restore_list_image').prop('disabled', false);
2152
 
2153
- var error_message = wpvivid_output_ajaxerror('achieving backup', textStatus, errorThrown);
2154
  alert(error_message);
2155
  });
2156
  }
@@ -2196,7 +2286,7 @@ class WPvivid_Uploads_Cleaner
2196
 
2197
  }, function(XMLHttpRequest, textStatus, errorThrown)
2198
  {
2199
- var error_message = wpvivid_output_ajaxerror('achieving backup', textStatus, errorThrown);
2200
  alert(error_message);
2201
  jQuery('#wpvivid_iso_files_list').find('.action').prop('disabled', false);
2202
  //jQuery('#wpvivid_delete_selected_image').prop('disabled', false);
@@ -2228,7 +2318,10 @@ class WPvivid_Uploads_Cleaner
2228
 
2229
  $uploads_files[0]=$uploads_scanner->scan_sidebars_widgets();
2230
 
2231
- $uploads_files[0]=$uploads_scanner->scan_termmeta_thumbnail();
 
 
 
2232
 
2233
  $count=$uploads_scanner->get_post_count();
2234
 
@@ -2269,7 +2362,7 @@ class WPvivid_Uploads_Cleaner
2269
  $result['percent']=intval(($start/$count)*100);
2270
  $result['total_posts']=$start;
2271
  $result['scanned_posts']=$count;
2272
- $result['descript']='Scanning File from post';
2273
  $result['progress_html']='
2274
  <div class="action-progress-bar">
2275
  <div class="action-progress-bar-percent" style="height:24px;width:' . $result['percent'] . '%"></div>
@@ -2377,7 +2470,7 @@ class WPvivid_Uploads_Cleaner
2377
  $result['percent']=intval(($start/$count)*100);
2378
  $result['total_posts']=$start;
2379
  $result['scanned_posts']=$count;
2380
- $result['descript']='Scanning File from post';
2381
  $result['progress_html']='
2382
  <div class="action-progress-bar">
2383
  <div class="action-progress-bar-percent" style="height:24px;width:' . $result['percent'] . '%"></div>
@@ -2752,6 +2845,7 @@ class WPvivid_Uploads_Cleaner
2752
  $list=new WPvivid_Unused_Upload_Files_List();
2753
  $scanner=new WPvivid_Uploads_Scanner();
2754
  $result=$scanner->get_scan_result($search,$folder);
 
2755
  if(isset($_POST['page']))
2756
  {
2757
  $list->set_list($result,$_POST['page']);
@@ -2768,6 +2862,14 @@ class WPvivid_Uploads_Cleaner
2768
 
2769
  $ret['result']='success';
2770
  $ret['html']=$html;
 
 
 
 
 
 
 
 
2771
  echo json_encode($ret);
2772
  }
2773
  catch (Exception $error)
@@ -3050,6 +3152,14 @@ class WPvivid_Uploads_Cleaner
3050
 
3051
  $ret['result']='success';
3052
  $ret['html']=$html;
 
 
 
 
 
 
 
 
3053
  echo json_encode($ret);
3054
  }
3055
  catch (Exception $error)
194
  return !empty($this->list);
195
  }
196
 
197
+ /*
198
+ public function no_items()
199
+ {
200
+ _e( '<a class="wpvivid-no-item" style="cursor:pointer">No items found. Click here to reset</a>' );
201
+ }*/
202
+
203
  public function prepare_items()
204
  {
205
  $columns = $this->get_columns();
393
  </select>
394
  <input type="submit" class="button action" value="Apply">
395
  </div>
396
+ <div id="wpvivid_isolate_progress" style="margin-top: 4px; display: none;">
397
+ <div class="spinner is-active" style="margin: 0 5px 10px 0; float: left;"></div>
398
+ <div style="float: left; margin-top: 2px;">Isolating images...</div>
399
+ <div style="clear: both;"></div>
400
+ </div>
401
  <?php
402
  $this->extra_tablenav( $which );
403
  $this->pagination( $which );
420
  </select>
421
  <input type="submit" class="button action" value="Apply">
422
  </div>
423
+ <div id="wpvivid_isolate_progress" style="margin-top: 4px; display: none;">
424
+ <div class="spinner is-active" style="margin: 0 5px 10px 0; float: left;"></div>
425
+ <div style="float: left; margin-top: 2px;">Isolating images...</div>
426
+ <div style="clear: both;"></div>
427
+ </div>
428
  <br class="clear" />
429
  </div>
430
  <?php
648
  return !empty($this->list);
649
  }
650
 
651
+ /*
652
+ public function no_items()
653
+ {
654
+ _e( '<a class="wpvivid-no-item" style="cursor:pointer">No items found. Click here to reset</a>' );
655
+ }
656
+ */
657
+
658
  public function prepare_items()
659
  {
660
  $columns = $this->get_columns();
853
  </select>
854
  <input type="submit" class="button action" value="Apply">
855
  </div>
856
+ <div id="wpvivid_restore_delete_progress" style="margin-top: 4px; display: none;">
857
+ <div class="spinner is-active" style="margin: 0 5px 10px 0; float: left;"></div>
858
+ <div id="wpvivid_restore_delete_text" style="float: left; margin-top: 2px;">Restoring images...</div>
859
+ <div style="clear: both;"></div>
860
+ </div>
861
  <div class="wpvivid-backup-tips" style="background: #fff; border: 1px solid #f1f1f1; border-radius: 6px; margin-top: 10px;margin-bottom: 10px">
862
  <div style="float: left;">
863
  <div style="padding: 10px;">
891
  </select>
892
  <input type="submit" class="button action" value="Apply">
893
  </div>
894
+ <div id="wpvivid_restore_delete_progress" style="margin-top: 4px; display: none;">
895
+ <div class="spinner is-active" style="margin: 0 5px 10px 0; float: left;"></div>
896
+ <div id="wpvivid_restore_delete_text" style="float: left; margin-top: 2px;">Restoring images...</div>
897
+ <div style="clear: both;"></div>
898
+ </div>
899
  <div class="wpvivid-backup-tips" style="background: #fff; border: 1px solid #f1f1f1; border-radius: 6px; margin-top: 10px;margin-bottom: 10px">
900
  <div style="float: left;">
901
  <div style="padding: 10px;">
1027
 
1028
  $menu['id']='wpvivid_admin_menu_cleaner';
1029
  $menu['parent']='wpvivid_admin_menu';
1030
+ $menu['title']=__('Image Cleaner (Beta)', 'wpvivid-backuprestore');
1031
  $menu['tab']= 'admin.php?page='.apply_filters('wpvivid_white_label_plugin_name', 'wpvivid-cleaner');
1032
  $menu['href']=$admin_url . 'admin.php?page='.apply_filters('wpvivid_white_label_plugin_name', 'wpvivid-cleaner');
1033
  $menu['capability']='administrator';
1040
  {
1041
  $submenu['parent_slug']=apply_filters('wpvivid_white_label_slug', WPVIVID_PLUGIN_SLUG);
1042
  $submenu['page_title']= apply_filters('wpvivid_white_label_display', 'WPvivid Backup');
1043
+ $submenu['menu_title']=__('Image Cleaner (Beta)', 'wpvivid-backuprestore');
1044
  $submenu['capability']='administrator';
1045
  $submenu['menu_slug']=strtolower(sprintf('%s-cleaner', apply_filters('wpvivid_white_label_slug', 'wpvivid')));
1046
  $submenu['index']=3;
1075
  <div class="wrap" style="max-width:1720px;">
1076
  <h1>
1077
  <?php
1078
+ echo __('WPvivid Image Cleaner (Beta)', 'wpvivid');
1079
  ?>
1080
  </h1>
1081
  <?php
1109
 
1110
  public function output_scan()
1111
  {
1112
+
1113
  $scanner=new WPvivid_Uploads_Scanner();
1114
+
1115
  $count=$scanner->get_scan_result_count();
1116
  $size=$scanner->get_scan_result_size();
1117
  if($count===false)
1179
  <?php
1180
  if(!empty($folders))
1181
  {
1182
+ asort($folders);
1183
  foreach ($folders as $folder)
1184
  {
1185
  echo "<option value='$folder'>$folder</option>";
1236
  };
1237
  wpvivid_post_request(ajax_data, function (data)
1238
  {
1239
+ //var old_html= jQuery('#wpvivid_scan_result_list').html();
1240
+ //jQuery('#wpvivid_scan_result_list').html('');
1241
  try
1242
  {
1243
  var jsonarray = jQuery.parseJSON(data);
1244
  if (jsonarray.result === 'success')
1245
  {
1246
+ if(jsonarray.empty)
1247
+ {
1248
+ jQuery('#wpvivid_result_list_search').val('');
1249
+ wpvivid_result_list_search='';
1250
+ alert('No items found.');
1251
+ //jQuery('#wpvivid_scan_result_list').html(old_html);
1252
+ }
1253
+ else
1254
+ {
1255
+ jQuery('#wpvivid_scan_result_list').html(jsonarray.html);
1256
+ }
1257
  }
1258
  else
1259
  {
1266
  }
1267
  }, function (XMLHttpRequest, textStatus, errorThrown)
1268
  {
1269
+ var error_message = wpvivid_output_ajaxerror('get list', textStatus, errorThrown);
1270
  alert(error_message);
1271
  });
1272
  }
1273
 
1274
+ jQuery('#wpvivid_scan_result_list').on("click",'.wpvivid-no-item',function()
1275
+ {
1276
+ wpvivid_result_list_search='';
1277
+ jQuery('#wpvivid_result_list_search').val('');
1278
+ wpvivid_get_result_list('first');
1279
+ });
1280
+
1281
  jQuery('#wpvivid_scan_result_list').on("click",'.first-page',function()
1282
  {
1283
  wpvivid_get_result_list('first');
1344
  jQuery('#wpvivid_scan_result_list').find('.action').prop('disabled', true);
1345
  //jQuery('#wpvivid_isolate_selected_image').prop('disabled', true);
1346
  //jQuery('#wpvivid_isolate_list_image').prop('disabled', true);
 
1347
  var ajax_data = {
1348
  'action': 'wpvivid_uc_add_exclude_files',
1349
  'selected':selected,
1378
  jQuery('#wpvivid_scan_result_list').find('.action').prop('disabled', false);
1379
  //jQuery('#wpvivid_isolate_selected_image').prop('disabled', false);
1380
  //jQuery('#wpvivid_isolate_list_image').prop('disabled', false);
1381
+ var error_message = wpvivid_output_ajaxerror('add options', textStatus, errorThrown);
1382
  alert(error_message);
1383
  });
1384
  }
1405
  'search':wpvivid_result_list_search,
1406
  'folder':wpvivid_result_list_folder
1407
  };
1408
+ jQuery('#wpvivid_isolate_progress').show();
1409
  wpvivid_post_request(ajax_data, function (data)
1410
  {
1411
+ jQuery('#wpvivid_isolate_progress').hide();
1412
  //jQuery('#wpvivid_isolate_selected_image').prop('disabled', false);
1413
  //jQuery('#wpvivid_isolate_list_image').prop('disabled', false);
1414
  jQuery('#wpvivid_scan_result_list').find('.action').prop('disabled', false);
1432
  }
1433
  }, function (XMLHttpRequest, textStatus, errorThrown)
1434
  {
1435
+ jQuery('#wpvivid_isolate_progress').hide();
1436
  jQuery('#wpvivid_scan_result_list').find('.action').prop('disabled', false);
1437
  //jQuery('#wpvivid_isolate_selected_image').prop('disabled', false);
1438
  //jQuery('#wpvivid_isolate_list_image').prop('disabled', false);
1439
+ var error_message = wpvivid_output_ajaxerror('add isolate files', textStatus, errorThrown);
1440
  alert(error_message);
1441
  });
1442
  }
1448
  'search':wpvivid_result_list_search,
1449
  'folder':wpvivid_result_list_folder
1450
  };
1451
+ jQuery('#wpvivid_isolate_progress').show();
1452
  //jQuery('#wpvivid_isolate_selected_image').prop('disabled', true);
1453
  //jQuery('#wpvivid_isolate_list_image').prop('disabled', true);
1454
  jQuery('#wpvivid_scan_result_list').find('.action').prop('disabled', true);
1455
  wpvivid_post_request(ajax_data, function (data)
1456
  {
1457
+ jQuery('#wpvivid_isolate_progress').hide();
1458
  try
1459
  {
1460
  var jsonarray = jQuery.parseJSON(data);
1486
  }
1487
  }, function (XMLHttpRequest, textStatus, errorThrown)
1488
  {
1489
+ jQuery('#wpvivid_isolate_progress').hide();
1490
  jQuery('#wpvivid_scan_result_list').find('.action').prop('disabled', false);
1491
  //jQuery('#wpvivid_isolate_selected_image').prop('disabled', false);
1492
  //jQuery('#wpvivid_isolate_list_image').prop('disabled', false);
1493
 
1494
+ var error_message = wpvivid_output_ajaxerror('add isolate files', textStatus, errorThrown);
1495
  alert(error_message);
1496
  });
1497
  }
1537
 
1538
  }, function(XMLHttpRequest, textStatus, errorThrown)
1539
  {
1540
+ var error_message = wpvivid_output_ajaxerror('add isolate files', textStatus, errorThrown);
1541
  alert(error_message);
1542
  jQuery('#wpvivid_scan_result_list').find('.action').prop('disabled', false);
1543
  //jQuery('#wpvivid_isolate_selected_image').prop('disabled', false);
1615
 
1616
  }, function(XMLHttpRequest, textStatus, errorThrown)
1617
  {
1618
+ var error_message = wpvivid_output_ajaxerror('scan files', textStatus, errorThrown);
1619
  alert(error_message);
1620
 
1621
  jQuery('#wpvivid_uc_progress').hide();
1670
 
1671
  }, function(XMLHttpRequest, textStatus, errorThrown)
1672
  {
1673
+ var error_message = wpvivid_output_ajaxerror('scan files', textStatus, errorThrown);
1674
  alert(error_message);
1675
 
1676
  jQuery('#wpvivid_uc_progress').hide();
1724
 
1725
  }, function(XMLHttpRequest, textStatus, errorThrown)
1726
  {
1727
+ var error_message = wpvivid_output_ajaxerror('scan files', textStatus, errorThrown);
1728
  alert(error_message);
1729
 
1730
  jQuery('#wpvivid_uc_progress').hide();
1779
 
1780
  }, function(XMLHttpRequest, textStatus, errorThrown)
1781
  {
1782
+ var error_message = wpvivid_output_ajaxerror('scan files', textStatus, errorThrown);
1783
  alert(error_message);
1784
 
1785
  jQuery('#wpvivid_uc_progress').hide();
1820
  <select id="wpvivid_iso_list_folder" style="margin-top: -5px;">
1821
  <option selected="selected" value="0">All Folders</option>
1822
  <?php
1823
+ asort($result['folders']);
1824
  foreach ($result['folders'] as $folder)
1825
  {
1826
  echo "<option value='$folder'>$folder</option>";
1874
 
1875
  wpvivid_post_request(ajax_data, function (data)
1876
  {
1877
+ //jQuery('#wpvivid_iso_files_list').html('');
1878
  try
1879
  {
1880
  var jsonarray = jQuery.parseJSON(data);
1881
  if (jsonarray.result === 'success')
1882
  {
1883
+ if(jsonarray.empty)
1884
+ {
1885
+ jQuery('#wpvivid_iso_list_search').val('');
1886
+ wpvivid_iso_list_search='';
1887
+ alert('No items found.');
1888
+ }
1889
+ else
1890
+ {
1891
+ jQuery('#wpvivid_iso_files_list').html(jsonarray.html);
1892
+ }
1893
+
1894
  }
1895
  else
1896
  {
1903
  }
1904
  }, function (XMLHttpRequest, textStatus, errorThrown)
1905
  {
1906
+ var error_message = wpvivid_output_ajaxerror('get list', textStatus, errorThrown);
1907
  alert(error_message);
1908
  });
1909
  }
1913
  wpvivid_get_iso_list('first');
1914
  });
1915
 
1916
+ jQuery('#wpvivid_iso_files_list').on("click",'.wpvivid-no-item',function()
1917
+ {
1918
+ wpvivid_iso_list_search='';
1919
+ jQuery('#wpvivid_iso_files_list').val('');
1920
+ wpvivid_get_iso_list('first');
1921
+ });
1922
+
1923
  jQuery('#wpvivid_iso_files_list').on("click",'.prev-page',function()
1924
  {
1925
  var page=parseInt(jQuery(this).attr('value'));
1990
  'search':wpvivid_iso_list_search,
1991
  'folder':wpvivid_iso_list_folder
1992
  };
1993
+ jQuery('#wpvivid_restore_delete_progress').show();
1994
+ jQuery('#wpvivid_restore_delete_text').html('Deleting images...');
1995
  wpvivid_post_request(ajax_data, function (data)
1996
  {
1997
+ jQuery('#wpvivid_restore_delete_progress').hide();
1998
  jQuery('#wpvivid_iso_files_list').find('.action').prop('disabled', false);
1999
 
2000
  jQuery('#wpvivid_iso_files_list').html('');
2016
  }
2017
  }, function (XMLHttpRequest, textStatus, errorThrown)
2018
  {
2019
+ jQuery('#wpvivid_restore_delete_progress').hide();
2020
  jQuery('#wpvivid_iso_files_list').find('.action').prop('disabled', false);
2021
  //jQuery('#wpvivid_delete_selected_image').prop('disabled', false);
2022
  //jQuery('#wpvivid_delete_list_image').prop('disabled', false);
2023
  //jQuery('#wpvivid_restore_selected_image').prop('disabled', false);
2024
  //jQuery('#wpvivid_restore_list_image').prop('disabled', false);
2025
 
2026
+ var error_message = wpvivid_output_ajaxerror('delete files', textStatus, errorThrown);
2027
  alert(error_message);
2028
  });
2029
  }
2036
  'folder':wpvivid_iso_list_folder
2037
  };
2038
  jQuery('#wpvivid_iso_files_list').find('.action').prop('disabled', true);
2039
+ jQuery('#wpvivid_restore_delete_progress').show();
2040
+ jQuery('#wpvivid_restore_delete_text').html('Deleting images...');
2041
  wpvivid_post_request(ajax_data, function (data)
2042
  {
2043
+ jQuery('#wpvivid_restore_delete_progress').hide();
2044
  try
2045
  {
2046
  var jsonarray = jQuery.parseJSON(data);
2072
  }
2073
  }, function (XMLHttpRequest, textStatus, errorThrown)
2074
  {
2075
+ jQuery('#wpvivid_restore_delete_progress').hide();
2076
  jQuery('#wpvivid_iso_files_list').find('.action').prop('disabled', false);
2077
  //jQuery('#wpvivid_delete_selected_image').prop('disabled', false);
2078
  //jQuery('#wpvivid_delete_list_image').prop('disabled', false);
2079
  //jQuery('#wpvivid_restore_selected_image').prop('disabled', false);
2080
  //jQuery('#wpvivid_restore_list_image').prop('disabled', false);
2081
 
2082
+ var error_message = wpvivid_output_ajaxerror('delete files', textStatus, errorThrown);
2083
  alert(error_message);
2084
  });
2085
  }
2123
 
2124
  }, function(XMLHttpRequest, textStatus, errorThrown)
2125
  {
2126
+ var error_message = wpvivid_output_ajaxerror('delete files', textStatus, errorThrown);
2127
  alert(error_message);
2128
  jQuery('#wpvivid_iso_files_list').find('.action').prop('disabled', false);
2129
  });
2151
  'search':wpvivid_iso_list_search,
2152
  'folder':wpvivid_iso_list_folder
2153
  };
2154
+ jQuery('#wpvivid_restore_delete_progress').show();
2155
+ jQuery('#wpvivid_restore_delete_text').html('Restoring images...');
2156
  wpvivid_post_request(ajax_data, function (data)
2157
  {
2158
+ jQuery('#wpvivid_restore_delete_progress').hide();
2159
  jQuery('#wpvivid_iso_files_list').find('.action').prop('disabled', false);
2160
 
2161
  jQuery('#wpvivid_iso_files_list').html('');
2178
  }
2179
  }, function (XMLHttpRequest, textStatus, errorThrown)
2180
  {
2181
+ jQuery('#wpvivid_restore_delete_progress').hide();
2182
  jQuery('#wpvivid_iso_files_list').find('.action').prop('disabled', false);
2183
  //jQuery('#wpvivid_delete_selected_image').prop('disabled', false);
2184
  //jQuery('#wpvivid_delete_list_image').prop('disabled', false);
2185
  //jQuery('#wpvivid_restore_selected_image').prop('disabled', false);
2186
  //jQuery('#wpvivid_restore_list_image').prop('disabled', false);
2187
 
2188
+ var error_message = wpvivid_output_ajaxerror('restore files', textStatus, errorThrown);
2189
  alert(error_message);
2190
  });
2191
  }
2197
  'search':wpvivid_iso_list_search,
2198
  'folder':wpvivid_iso_list_folder
2199
  };
2200
+ jQuery('#wpvivid_restore_delete_progress').show();
2201
+ jQuery('#wpvivid_restore_delete_text').html('Restoring images...');
2202
  wpvivid_post_request(ajax_data, function (data)
2203
  {
2204
+ jQuery('#wpvivid_restore_delete_progress').hide();
2205
  try
2206
  {
2207
  var jsonarray = jQuery.parseJSON(data);
2233
  }
2234
  }, function (XMLHttpRequest, textStatus, errorThrown)
2235
  {
2236
+ jQuery('#wpvivid_restore_delete_progress').hide();
2237
  jQuery('#wpvivid_iso_files_list').find('.action').prop('disabled', false);
2238
  //jQuery('#wpvivid_delete_selected_image').prop('disabled', false);
2239
  //jQuery('#wpvivid_delete_list_image').prop('disabled', false);
2240
  //jQuery('#wpvivid_restore_selected_image').prop('disabled', false);
2241
  //jQuery('#wpvivid_restore_list_image').prop('disabled', false);
2242
 
2243
+ var error_message = wpvivid_output_ajaxerror('restore files', textStatus, errorThrown);
2244
  alert(error_message);
2245
  });
2246
  }
2286
 
2287
  }, function(XMLHttpRequest, textStatus, errorThrown)
2288
  {
2289
+ var error_message = wpvivid_output_ajaxerror('restore files', textStatus, errorThrown);
2290
  alert(error_message);
2291
  jQuery('#wpvivid_iso_files_list').find('.action').prop('disabled', false);
2292
  //jQuery('#wpvivid_delete_selected_image').prop('disabled', false);
2318
 
2319
  $uploads_files[0]=$uploads_scanner->scan_sidebars_widgets();
2320
 
2321
+ $files=$uploads_scanner->scan_termmeta_thumbnail();
2322
+ $uploads_files[0]=array_merge($uploads_files[0],$files);
2323
+ $files=$uploads_scanner->scan_divi_options();
2324
+ $uploads_files[0]=array_merge($uploads_files[0],$files);
2325
 
2326
  $count=$uploads_scanner->get_post_count();
2327
 
2362
  $result['percent']=intval(($start/$count)*100);
2363
  $result['total_posts']=$start;
2364
  $result['scanned_posts']=$count;
2365
+ $result['descript']='Scanning files from posts';
2366
  $result['progress_html']='
2367
  <div class="action-progress-bar">
2368
  <div class="action-progress-bar-percent" style="height:24px;width:' . $result['percent'] . '%"></div>
2470
  $result['percent']=intval(($start/$count)*100);
2471
  $result['total_posts']=$start;
2472
  $result['scanned_posts']=$count;
2473
+ $result['descript']='Scanning files from posts';
2474
  $result['progress_html']='
2475
  <div class="action-progress-bar">
2476
  <div class="action-progress-bar-percent" style="height:24px;width:' . $result['percent'] . '%"></div>
2845
  $list=new WPvivid_Unused_Upload_Files_List();
2846
  $scanner=new WPvivid_Uploads_Scanner();
2847
  $result=$scanner->get_scan_result($search,$folder);
2848
+
2849
  if(isset($_POST['page']))
2850
  {
2851
  $list->set_list($result,$_POST['page']);
2862
 
2863
  $ret['result']='success';
2864
  $ret['html']=$html;
2865
+ if(empty($result))
2866
+ {
2867
+ $ret['empty']=1;
2868
+ }
2869
+ else
2870
+ {
2871
+ $ret['empty']=0;
2872
+ }
2873
  echo json_encode($ret);
2874
  }
2875
  catch (Exception $error)
3152
 
3153
  $ret['result']='success';
3154
  $ret['html']=$html;
3155
+ if(empty($result))
3156
+ {
3157
+ $ret['empty']=1;
3158
+ }
3159
+ else
3160
+ {
3161
+ $ret['empty']=0;
3162
+ }
3163
  echo json_encode($ret);
3164
  }
3165
  catch (Exception $error)
includes/upload-cleaner/class-wpvivid-uploads-scanner.php CHANGED
@@ -186,6 +186,51 @@ class WPvivid_Uploads_Scanner
186
  return $files;
187
  }
188
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
  public function get_images_from_widget($widget)
190
  {
191
  $widget_class = $widget['callback'][0]->option_name;
186
  return $files;
187
  }
188
 
189
+ public function scan_divi_options()
190
+ {
191
+ $files=array();
192
+ $options=get_option('et_divi',false);
193
+
194
+ if($options!==false)
195
+ {
196
+ if(isset($options['divi_logo']))
197
+ {
198
+ $files[]=$this->get_src($options['divi_logo']);
199
+ }
200
+ }
201
+
202
+ $options=get_option('widget_text',false);
203
+
204
+ if($options!==false)
205
+ {
206
+ foreach ($options as $option)
207
+ {
208
+ if(isset($option['title']))
209
+ {
210
+ $this->get_img_from_divi($option['title'],$files);
211
+ }
212
+
213
+ if(isset($option['text']))
214
+ {
215
+ $this->get_img_from_divi($option['text'],$files);
216
+ }
217
+ }
218
+ }
219
+
220
+
221
+ $options=get_option('theme_mods_Divi',false);
222
+
223
+ if($options!==false)
224
+ {
225
+ if(isset($options['background_image']))
226
+ {
227
+ $files[]=$this->get_src($options['background_image']);
228
+ }
229
+ }
230
+
231
+ return $files;
232
+ }
233
+
234
  public function get_images_from_widget($widget)
235
  {
236
  $widget_class = $widget['callback'][0]->option_name;
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: wpvivid
3
  Tags: move, clone, migrate, cleaner, backup, restore, auto backup, cloud backup
4
  Requires at least: 4.5
5
- Tested up to: 5.5
6
  Requires PHP: 5.3
7
- Stable tag: 0.9.45
8
  License: GPLv3 or later
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
10
 
@@ -27,7 +27,7 @@ Click to download [WPvivid Backup for MainWP](https://wordpress.org/plugins/wpvi
27
  * Incremental backups
28
  * Database backups encryption
29
  * Auto backup WordPress core, themes, and plugins
30
- * Unused images cleaner
31
  * WordPress Multisite backup
32
  * Create a staging for a WordPress MU
33
  * Create a fresh WP install
@@ -69,7 +69,7 @@ Set a schedule to run backups automatically on your website. You can set the bac
69
  Send your backups offsite to a remote location. WPvivid Backup Plugin supports the leading cloud storage providers: Dropbox, Google Drive, Amazon S3, Microsoft OneDrive, DigitalOcean Spaces, FTP and SFTP.
70
  = 5. One-Click Restore =
71
  Restore your WordPress site from a backup with a single click.
72
- = 6. Unused Images Cleaner =
73
  Scan your WP media library to find unused images, then you can choose to clean specific or all unused images.
74
 
75
  == Cloud Storage Supported ==
@@ -80,7 +80,7 @@ The pro version also supports Wasabi, pCloud and more are coming soon.
80
  == Features Spotlight ==
81
  * One-Click Site Move or Migration
82
  * Upload Backups to Restore or Migrate
83
- * Unused Images Cleaner
84
  * Schedule Automated Backups
85
  * Restore A Backup with One Click
86
  * Create A Manual Backup
@@ -185,6 +185,13 @@ Thank you for translating WPvivid Backup Plugin to your languages!
185
  * Valentin Lyong (Bulgarian)
186
 
187
  == Changelog ==
 
 
 
 
 
 
 
188
  = 0.9.45 =
189
  - New feature Added: Find and clean unused images in your WP media library.
190
  - Fixed some bugs in the plugin code.
2
  Contributors: wpvivid
3
  Tags: move, clone, migrate, cleaner, backup, restore, auto backup, cloud backup
4
  Requires at least: 4.5
5
+ Tested up to: 5.5.1
6
  Requires PHP: 5.3
7
+ Stable tag: 0.9.46
8
  License: GPLv3 or later
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
10
 
27
  * Incremental backups
28
  * Database backups encryption
29
  * Auto backup WordPress core, themes, and plugins
30
+ * Unused images cleaner (Beta)
31
  * WordPress Multisite backup
32
  * Create a staging for a WordPress MU
33
  * Create a fresh WP install
69
  Send your backups offsite to a remote location. WPvivid Backup Plugin supports the leading cloud storage providers: Dropbox, Google Drive, Amazon S3, Microsoft OneDrive, DigitalOcean Spaces, FTP and SFTP.
70
  = 5. One-Click Restore =
71
  Restore your WordPress site from a backup with a single click.
72
+ = 6. Unused Images Cleaner (Beta) =
73
  Scan your WP media library to find unused images, then you can choose to clean specific or all unused images.
74
 
75
  == Cloud Storage Supported ==
80
  == Features Spotlight ==
81
  * One-Click Site Move or Migration
82
  * Upload Backups to Restore or Migrate
83
+ * Unused Images Cleaner (Beta)
84
  * Schedule Automated Backups
85
  * Restore A Backup with One Click
86
  * Create A Manual Backup
185
  * Valentin Lyong (Bulgarian)
186
 
187
  == Changelog ==
188
+ = 0.9.46 =
189
+ - Fixed: Some special characters in database could not be restored properly.
190
+ - Fixed: Only 1000 backups stored on Amazon S3 could be displayed.
191
+ - Fixed: Unused image cleaner also isolated images used in CSS files.
192
+ - Successfully tested with WordPress 5.5.1.
193
+ - Fixed some bugs in the plugin code.
194
+ - Optimized the plugin code.
195
  = 0.9.45 =
196
  - New feature Added: Find and clean unused images in your WP media library.
197
  - Fixed some bugs in the plugin code.
wpvivid-backuprestore.php CHANGED
@@ -7,7 +7,7 @@
7
  * @wordpress-plugin
8
  * Plugin Name: WPvivid Backup Plugin
9
  * Description: Clone or copy WP sites then move or migrate them to new host (new domain), schedule backups, transfer backups to leading remote storage. All in one.
10
- * Version: 0.9.45
11
  * Author: WPvivid Team
12
  * Author URI: https://wpvivid.com
13
  * License: GPL-3.0+
@@ -21,7 +21,7 @@ if ( ! defined( 'WPINC' ) ) {
21
  die;
22
  }
23
 
24
- define( 'WPVIVID_PLUGIN_VERSION', '0.9.45' );
25
  //
26
  define('WPVIVID_RESTORE_INIT','init');
27
  define('WPVIVID_RESTORE_READY','ready');
7
  * @wordpress-plugin
8
  * Plugin Name: WPvivid Backup Plugin
9
  * Description: Clone or copy WP sites then move or migrate them to new host (new domain), schedule backups, transfer backups to leading remote storage. All in one.
10
+ * Version: 0.9.46
11
  * Author: WPvivid Team
12
  * Author URI: https://wpvivid.com
13
  * License: GPL-3.0+
21
  die;
22
  }
23
 
24
+ define( 'WPVIVID_PLUGIN_VERSION', '0.9.46' );
25
  //
26
  define('WPVIVID_RESTORE_INIT','init');
27
  define('WPVIVID_RESTORE_READY','ready');