Migration, Backup, Staging – WPvivid - Version 0.9.49

Version Description

  • Fixed: A 404 error would returned when sending a request to wp-cron.php in some multilingual websites.
  • Fixed: Could not turn pages in the backup list.
  • 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.49
Comparing to
See all releases

Code changes from version 0.9.48 to 0.9.49

admin/class-wpvivid-admin.php CHANGED
@@ -325,6 +325,7 @@ class WPvivid_Admin {
325
  $wpvivid_siteurl = array();
326
  $wpvivid_siteurl['home_url'] = home_url();
327
  $wpvivid_siteurl['plug_url'] = plugins_url();
 
328
  return $wpvivid_siteurl;
329
  }
330
 
@@ -600,7 +601,7 @@ class WPvivid_Admin {
600
  var wpvivid_siteurl = '<?php
601
  $wpvivid_siteurl = array();
602
  $wpvivid_siteurl=WPvivid_Admin::wpvivid_get_siteurl();
603
- echo esc_url($wpvivid_siteurl['home_url']);
604
  ?>';
605
  var wpvivid_plugurl = '<?php
606
  echo WPVIVID_PLUGIN_URL;
325
  $wpvivid_siteurl = array();
326
  $wpvivid_siteurl['home_url'] = home_url();
327
  $wpvivid_siteurl['plug_url'] = plugins_url();
328
+ $wpvivid_siteurl['site_url'] = get_option( 'siteurl' );
329
  return $wpvivid_siteurl;
330
  }
331
 
601
  var wpvivid_siteurl = '<?php
602
  $wpvivid_siteurl = array();
603
  $wpvivid_siteurl=WPvivid_Admin::wpvivid_get_siteurl();
604
+ echo esc_url($wpvivid_siteurl['site_url']);
605
  ?>';
606
  var wpvivid_plugurl = '<?php
607
  echo WPVIVID_PLUGIN_URL;
admin/partials/wpvivid-backup-restore-page-display.php CHANGED
@@ -2124,7 +2124,7 @@ function wpvivid_backuppage_add_page_downlaod(){
2124
  jQuery('#wpvivid_init_download_info').show();
2125
  jQuery('#wpvivid_init_download_info').find('.spinner').addClass('is-active');
2126
 
2127
- wpvivid_post_request_addon(ajax_data, function(data)
2128
  {
2129
  jQuery('#wpvivid_init_download_info').hide();
2130
  jQuery('#wpvivid_init_download_info').find('.spinner').removeClass('is-active');
2124
  jQuery('#wpvivid_init_download_info').show();
2125
  jQuery('#wpvivid_init_download_info').find('.spinner').addClass('is-active');
2126
 
2127
+ wpvivid_post_request(ajax_data, function(data)
2128
  {
2129
  jQuery('#wpvivid_init_download_info').hide();
2130
  jQuery('#wpvivid_init_download_info').find('.spinner').removeClass('is-active');
includes/class-wpvivid-restore-site.php CHANGED
@@ -130,7 +130,7 @@ class WPvivid_RestoreSite
130
  {
131
  @rename(get_home_path() . '.htaccess', get_home_path() . '.htaccess_old');
132
  }
133
- $ret = $zip->extract($all_files, $root_path);
134
 
135
  if (isset($option['file_type'])) {
136
  if ($option['file_type'] == 'themes') {
@@ -139,7 +139,7 @@ class WPvivid_RestoreSite
139
  if (empty($slug))
140
  continue;
141
  $wpvivid_plugin->restore_data->write_log('remove ' . get_theme_root() . DIRECTORY_SEPARATOR . $slug, 'notice');
142
- $this->delTree(get_theme_root() . DIRECTORY_SEPARATOR . $slug);
143
  }
144
  }
145
  } else if ($option['file_type'] == 'plugin') {
@@ -148,7 +148,7 @@ class WPvivid_RestoreSite
148
  if (empty($slug))
149
  continue;
150
  $wpvivid_plugin->restore_data->write_log('remove ' . WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $slug, 'notice');
151
- $this->delTree(WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $slug);
152
  }
153
  }
154
  }
130
  {
131
  @rename(get_home_path() . '.htaccess', get_home_path() . '.htaccess_old');
132
  }
133
+ $ret = $zip->extract($all_files, $root_path, $option);
134
 
135
  if (isset($option['file_type'])) {
136
  if ($option['file_type'] == 'themes') {
139
  if (empty($slug))
140
  continue;
141
  $wpvivid_plugin->restore_data->write_log('remove ' . get_theme_root() . DIRECTORY_SEPARATOR . $slug, 'notice');
142
+ //$this->delTree(get_theme_root() . DIRECTORY_SEPARATOR . $slug);
143
  }
144
  }
145
  } else if ($option['file_type'] == 'plugin') {
148
  if (empty($slug))
149
  continue;
150
  $wpvivid_plugin->restore_data->write_log('remove ' . WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $slug, 'notice');
151
+ //$this->delTree(WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $slug);
152
  }
153
  }
154
  }
includes/class-wpvivid-zipclass.php CHANGED
@@ -5,6 +5,9 @@ if (!defined('WPVIVID_PLUGIN_DIR')){
5
  }
6
 
7
  require_once WPVIVID_PLUGIN_DIR . '/includes/class-wpvivid-compress-default.php';
 
 
 
8
  class WPvivid_ZipClass extends Wpvivid_Compress_Default
9
  {
10
  public $last_error = '';
@@ -380,8 +383,12 @@ class WPvivid_ZipClass extends Wpvivid_Compress_Default
380
  return $ret;
381
  }
382
 
383
- public function extract($files,$path = '')
384
  {
 
 
 
 
385
  global $wpvivid_plugin;
386
  //$wpvivid_plugin->restore_data->write_log('start prepare extract','notice');
387
  define(PCLZIP_TEMPORARY_DIR,dirname($path));
@@ -767,6 +774,11 @@ class WPvivid_ZipClass extends Wpvivid_Compress_Default
767
  else
768
  $exclude_files_regex=array();
769
 
 
 
 
 
 
770
  if(isset($data['compress'])&&$data['compress']['exclude_file_size'])
771
  $exclude_file_size=$data['compress']['exclude_file_size'];
772
  else
@@ -785,7 +797,7 @@ class WPvivid_ZipClass extends Wpvivid_Compress_Default
785
 
786
  foreach ($data['files'] as $file)
787
  {
788
- $this->get_file_cache($size,$file,$cache_perfix,$cache_file_handle,$number,$sumsize,$exclude_files_regex,$exclude_file_size,$skip_files_time);
789
  }
790
 
791
  $file_cache=array();
@@ -797,7 +809,7 @@ class WPvivid_ZipClass extends Wpvivid_Compress_Default
797
  return $file_cache;
798
  }
799
 
800
- public function get_file_cache($size,$path,$cache_perfix,&$cache_file_handle,&$number,&$sumsize,$exclude_files_regex,$exclude_file_size,$skip_files_time)
801
  {
802
  if(!$cache_file_handle)
803
  {
@@ -813,10 +825,17 @@ class WPvivid_ZipClass extends Wpvivid_Compress_Default
813
  {
814
  if ($filename != "." && $filename != "..")
815
  {
816
- if(is_dir($path . DIRECTORY_SEPARATOR . $filename))
817
  {
818
- $this->get_file_cache($size,$path . DIRECTORY_SEPARATOR . $filename,$cache_perfix,$cache_file_handle,$number,$sumsize,$exclude_files_regex,$exclude_file_size,$skip_files_time);
 
 
 
819
  }
 
 
 
 
820
  else
821
  {
822
  if($this->regex_match($exclude_files_regex, $filename, 0))
@@ -1014,6 +1033,13 @@ class WPvivid_PclZip_Class
1014
 
1015
  $wpvivid_plugin->wpvivid_log->WriteLog('Prepare to zip files. file: '.basename($name),'notice');
1016
 
 
 
 
 
 
 
 
1017
  if($no_compress)
1018
  {
1019
  if($use_temp_file==1)
@@ -1122,6 +1148,33 @@ function wpvivid_function_pre_extract_callback($p_event, &$p_header)
1122
  {
1123
  $plugins = substr(WP_PLUGIN_DIR, strpos(WP_PLUGIN_DIR, 'wp-content/'));
1124
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1125
  if(strpos($p_header['filename'],$plugins.DIRECTORY_SEPARATOR.'wpvivid-backuprestore')!==false)
1126
  {
1127
  return 0;
5
  }
6
 
7
  require_once WPVIVID_PLUGIN_DIR . '/includes/class-wpvivid-compress-default.php';
8
+
9
+ $wpvivid_extract_option = array();
10
+
11
  class WPvivid_ZipClass extends Wpvivid_Compress_Default
12
  {
13
  public $last_error = '';
383
  return $ret;
384
  }
385
 
386
+ public function extract($files, $path = '', $option = array())
387
  {
388
+ if(!empty($option)){
389
+ $GLOBALS['wpvivid_extract_option'] = $option;
390
+ }
391
+
392
  global $wpvivid_plugin;
393
  //$wpvivid_plugin->restore_data->write_log('start prepare extract','notice');
394
  define(PCLZIP_TEMPORARY_DIR,dirname($path));
774
  else
775
  $exclude_files_regex=array();
776
 
777
+ if(isset($data['exclude_regex']))
778
+ $exclude_regex=$data['exclude_regex'];
779
+ else
780
+ $exclude_regex=array();
781
+
782
  if(isset($data['compress'])&&$data['compress']['exclude_file_size'])
783
  $exclude_file_size=$data['compress']['exclude_file_size'];
784
  else
797
 
798
  foreach ($data['files'] as $file)
799
  {
800
+ $this->get_file_cache($size,$file,$cache_perfix,$cache_file_handle,$number,$sumsize,$exclude_regex,$exclude_files_regex,$exclude_file_size,$skip_files_time);
801
  }
802
 
803
  $file_cache=array();
809
  return $file_cache;
810
  }
811
 
812
+ public function get_file_cache($size,$path,$cache_perfix,&$cache_file_handle,&$number,&$sumsize,$exclude_regex,$exclude_files_regex,$exclude_file_size,$skip_files_time)
813
  {
814
  if(!$cache_file_handle)
815
  {
825
  {
826
  if ($filename != "." && $filename != "..")
827
  {
828
+ if (is_dir($path . DIRECTORY_SEPARATOR . $filename))
829
  {
830
+ if ($this->regex_match($exclude_regex, $path . DIRECTORY_SEPARATOR . $filename, 0))
831
+ {
832
+ $this->get_file_cache($size,$path . DIRECTORY_SEPARATOR . $filename,$cache_perfix,$cache_file_handle,$number,$sumsize,$exclude_regex,$exclude_files_regex,$exclude_file_size,$skip_files_time);
833
+ }
834
  }
835
+ /*if(is_dir($path . DIRECTORY_SEPARATOR . $filename))
836
+ {
837
+ $this->get_file_cache($size,$path . DIRECTORY_SEPARATOR . $filename,$cache_perfix,$cache_file_handle,$number,$sumsize,$exclude_regex,$exclude_files_regex,$exclude_file_size,$skip_files_time);
838
+ }*/
839
  else
840
  {
841
  if($this->regex_match($exclude_files_regex, $filename, 0))
1033
 
1034
  $wpvivid_plugin->wpvivid_log->WriteLog('Prepare to zip files. file: '.basename($name),'notice');
1035
 
1036
+ /*foreach ($files as $index => $file){
1037
+ if(!is_dir($file) && filesize($file) === 0){
1038
+ $wpvivid_plugin->wpvivid_log->WriteLog('Ignore files with size 0. file: '.$file,'notice');
1039
+ unset($files[$index]);
1040
+ }
1041
+ }*/
1042
+
1043
  if($no_compress)
1044
  {
1045
  if($use_temp_file==1)
1148
  {
1149
  $plugins = substr(WP_PLUGIN_DIR, strpos(WP_PLUGIN_DIR, 'wp-content/'));
1150
 
1151
+ $option = $GLOBALS['wpvivid_extract_option'];
1152
+ if (isset($option['file_type'])) {
1153
+ if ($option['file_type'] == 'themes') {
1154
+ if (isset($option['remove_themes'])) {
1155
+ foreach ($option['remove_themes'] as $slug => $themes) {
1156
+ if (empty($slug))
1157
+ continue;
1158
+ if(strpos($p_header['filename'],$plugins.DIRECTORY_SEPARATOR.$slug)!==false)
1159
+ {
1160
+ return 0;
1161
+ }
1162
+ }
1163
+ }
1164
+ } else if ($option['file_type'] == 'plugin') {
1165
+ if (isset($option['remove_plugin'])) {
1166
+ foreach ($option['remove_plugin'] as $slug => $plugin) {
1167
+ if (empty($slug))
1168
+ continue;
1169
+ if(strpos($p_header['filename'],$plugins.'/'.$slug)!==false)
1170
+ {
1171
+ return 0;
1172
+ }
1173
+ }
1174
+ }
1175
+ }
1176
+ }
1177
+
1178
  if(strpos($p_header['filename'],$plugins.DIRECTORY_SEPARATOR.'wpvivid-backuprestore')!==false)
1179
  {
1180
  return 0;
includes/lib/google-api-php-client/src/Google/Service/Resource.php CHANGED
@@ -294,7 +294,12 @@ class Google_Service_Resource
294
  }
295
 
296
  if (count($queryVars)) {
297
- $requestUrl .= '?' . implode($queryVars, '&');
 
 
 
 
 
298
  }
299
 
300
  return $requestUrl;
294
  }
295
 
296
  if (count($queryVars)) {
297
+ if (version_compare(PHP_VERSION, '7.4', '>=')) {
298
+ $requestUrl .= '?' . implode('&', $queryVars);
299
+ }
300
+ else{
301
+ $requestUrl .= '?' . implode($queryVars, '&');
302
+ }
303
  }
304
 
305
  return $requestUrl;
readme.txt CHANGED
@@ -1,14 +1,14 @@
1
- === Backup & Migration & Unused Images Cleaner - WPvivid Backup Plugin ===
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.6
6
  Requires PHP: 5.3
7
- Stable tag: 0.9.48
8
  License: GPLv3 or later
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
10
 
11
- Migrate a backup of WP site, schedule offsite backups, clean unused images before backup and migration. All in one backup & migration plugin
12
 
13
  == Description ==
14
  WPvivid Backup Plugin offers backup and migration as basic features, and is integrating more and more elegant features, such as unused images cleaner etc.
@@ -19,7 +19,7 @@ Migrate a copy of WP site to a new host (a new domain), schedule backups, send b
19
  [WPvivid Backup for MainWP](https://wpvivid.com/wpvivid-backup-for-mainwp) is now available to download.
20
  This extension allows you to set up and control WPvivid Backup Free and Pro for all child sites directly from your MainWP dashboard.
21
 
22
- Click to download [WPvivid Backup for MainWP](https://wordpress.org/plugins/wpvivid-backup-mainwp/)
23
 
24
  == WPvivid Backup Pro is Now Available ==
25
  * Customize everything to backup
@@ -186,6 +186,11 @@ Thank you for translating WPvivid Backup Plugin to your languages!
186
  * [Daniel Wilczkowiak](https://profiles.wordpress.org/virtual03/) (German)
187
 
188
  == Changelog ==
 
 
 
 
 
189
  = 0.9.48 =
190
  - Redesigned the Download section for better UX.
191
  - Fixed the insufficient permission error that occurred when authenticating FTP in some cases.
1
+ === Backup & Migration - WPvivid Backup and Migration Plugin ===
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.6
6
  Requires PHP: 5.3
7
+ Stable tag: 0.9.49
8
  License: GPLv3 or later
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
10
 
11
+ Schedule offsite backup, automatic migration. All in one backup & migration plugin.
12
 
13
  == Description ==
14
  WPvivid Backup Plugin offers backup and migration as basic features, and is integrating more and more elegant features, such as unused images cleaner etc.
19
  [WPvivid Backup for MainWP](https://wpvivid.com/wpvivid-backup-for-mainwp) is now available to download.
20
  This extension allows you to set up and control WPvivid Backup Free and Pro for all child sites directly from your MainWP dashboard.
21
 
22
+ Click to download **[WPvivid Backup for MainWP](https://wordpress.org/plugins/wpvivid-backup-mainwp/)**
23
 
24
  == WPvivid Backup Pro is Now Available ==
25
  * Customize everything to backup
186
  * [Daniel Wilczkowiak](https://profiles.wordpress.org/virtual03/) (German)
187
 
188
  == Changelog ==
189
+ = 0.9.49 =
190
+ - Fixed: A 404 error would returned when sending a request to wp-cron.php in some multilingual websites.
191
+ - Fixed: Could not turn pages in the backup list.
192
+ - Fixed some bugs in the plugin code.
193
+ - Optimized the plugin code.
194
  = 0.9.48 =
195
  - Redesigned the Download section for better UX.
196
  - Fixed the insufficient permission error that occurred when authenticating FTP in some cases.
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.48
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.48' );
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.49
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.49' );
25
  //
26
  define('WPVIVID_RESTORE_INIT','init');
27
  define('WPVIVID_RESTORE_READY','ready');