Version Description
- Fixed: The object-cache.php file and protection files generated by Wordfence were not excluded during restore.
- Fixed: Some used images were falsely identified as unused.
- Added creation time for a staging site.
- Optimized the plugin code.
Download this release
Release Info
Developer | wpvivid |
Plugin | Migration, Backup, Staging – WPvivid |
Version | 0.9.67 |
Comparing to | |
See all releases |
Code changes from version 0.9.66 to 0.9.67
- includes/class-wpvivid-zipclass.php +59 -0
- includes/customclass/class-wpvivid-one-drive.php +7 -0
- includes/staging/class-wpvivid-staging-list-ui-display.php +25 -0
- includes/staging/class-wpvivid-staging-task-ex.php +7 -0
- includes/staging/class-wpvivid-staging.php +1 -0
- includes/upload-cleaner/class-wpvivid-uploads-scanner.php +69 -0
- readme.txt +6 -1
- wpvivid-backuprestore.php +2 -2
includes/class-wpvivid-zipclass.php
CHANGED
@@ -1299,6 +1299,23 @@ function wpvivid_function_per_add_callback($p_event, &$p_header)
|
|
1299 |
return 0;
|
1300 |
}*/
|
1301 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1302 |
global $wpvivid_old_time;
|
1303 |
if(time()-$wpvivid_old_time>30)
|
1304 |
{
|
@@ -1353,6 +1370,23 @@ function wpvivid_function_pre_extract_callback($p_event, &$p_header)
|
|
1353 |
}
|
1354 |
}
|
1355 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1356 |
if(strpos($p_header['filename'],$plugins.'/wpvivid-backuprestore')!==false)
|
1357 |
{
|
1358 |
return 0;
|
@@ -1373,5 +1407,30 @@ function wpvivid_function_pre_extract_callback($p_event, &$p_header)
|
|
1373 |
return 0;
|
1374 |
}
|
1375 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1376 |
return 1;
|
1377 |
}
|
1299 |
return 0;
|
1300 |
}*/
|
1301 |
|
1302 |
+
$path = str_replace('\\','/',WP_CONTENT_DIR);
|
1303 |
+
$content_path = $path.'/';
|
1304 |
+
if(strpos($p_header['filename'], $content_path.'mu-plugins/endurance-browser-cache.php')!==false)
|
1305 |
+
{
|
1306 |
+
return 0;
|
1307 |
+
}
|
1308 |
+
|
1309 |
+
if(strpos($p_header['filename'], $content_path.'mu-plugins/endurance-page-cache.php')!==false)
|
1310 |
+
{
|
1311 |
+
return 0;
|
1312 |
+
}
|
1313 |
+
|
1314 |
+
if(strpos($p_header['filename'], $content_path.'mu-plugins/endurance-php-edge.php')!==false)
|
1315 |
+
{
|
1316 |
+
return 0;
|
1317 |
+
}
|
1318 |
+
|
1319 |
global $wpvivid_old_time;
|
1320 |
if(time()-$wpvivid_old_time>30)
|
1321 |
{
|
1370 |
}
|
1371 |
}
|
1372 |
|
1373 |
+
$path = str_replace('\\','/',WP_CONTENT_DIR);
|
1374 |
+
$content_path = $path.'/';
|
1375 |
+
if(strpos($p_header['filename'], $content_path.'advanced-cache.php')!==false)
|
1376 |
+
{
|
1377 |
+
return 0;
|
1378 |
+
}
|
1379 |
+
|
1380 |
+
if(strpos($p_header['filename'], $content_path.'db.php')!==false)
|
1381 |
+
{
|
1382 |
+
return 0;
|
1383 |
+
}
|
1384 |
+
|
1385 |
+
if(strpos($p_header['filename'], $content_path.'object-cache.php')!==false)
|
1386 |
+
{
|
1387 |
+
return 0;
|
1388 |
+
}
|
1389 |
+
|
1390 |
if(strpos($p_header['filename'],$plugins.'/wpvivid-backuprestore')!==false)
|
1391 |
{
|
1392 |
return 0;
|
1407 |
return 0;
|
1408 |
}
|
1409 |
|
1410 |
+
if(strpos($p_header['filename'],'.user.ini')!==false)
|
1411 |
+
{
|
1412 |
+
return 0;
|
1413 |
+
}
|
1414 |
+
|
1415 |
+
if(strpos($p_header['filename'],'wordfence-waf.php')!==false)
|
1416 |
+
{
|
1417 |
+
return 0;
|
1418 |
+
}
|
1419 |
+
|
1420 |
+
if(strpos($p_header['filename'], $content_path.'mu-plugins/endurance-browser-cache.php')!==false)
|
1421 |
+
{
|
1422 |
+
return 0;
|
1423 |
+
}
|
1424 |
+
|
1425 |
+
if(strpos($p_header['filename'], $content_path.'mu-plugins/endurance-page-cache.php')!==false)
|
1426 |
+
{
|
1427 |
+
return 0;
|
1428 |
+
}
|
1429 |
+
|
1430 |
+
if(strpos($p_header['filename'], $content_path.'mu-plugins/endurance-php-edge.php')!==false)
|
1431 |
+
{
|
1432 |
+
return 0;
|
1433 |
+
}
|
1434 |
+
|
1435 |
return 1;
|
1436 |
}
|
includes/customclass/class-wpvivid-one-drive.php
CHANGED
@@ -112,6 +112,13 @@ class WPvivid_one_drive extends WPvivid_Remote
|
|
112 |
{
|
113 |
try
|
114 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
if (isset($_GET['auth_error']))
|
116 |
{
|
117 |
$error = urldecode($_GET['auth_error']);
|
112 |
{
|
113 |
try
|
114 |
{
|
115 |
+
if(!isset($_POST['access_token']) || !isset($_POST['refresh_token']) || !isset($_POST['expires_in']))
|
116 |
+
{
|
117 |
+
$error = 'no access token';
|
118 |
+
header('Location: ' . admin_url() . 'admin.php?page=' . WPVIVID_PLUGIN_SLUG . '&action=wpvivid_one_drive&result=error&resp_msg=' . $error);
|
119 |
+
return;
|
120 |
+
}
|
121 |
+
|
122 |
if (isset($_GET['auth_error']))
|
123 |
{
|
124 |
$error = urldecode($_GET['auth_error']);
|
includes/staging/class-wpvivid-staging-list-ui-display.php
CHANGED
@@ -154,18 +154,43 @@ class WPvivid_Staging_List_UI_Display_Free
|
|
154 |
$class_btn='staging-site';
|
155 |
}
|
156 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
?>
|
158 |
<div class="wpvivid-one-coloum" style="border:1px solid #f1f1f1;padding-top:0em; margin-top:1em;" id="<?php echo esc_attr($id); ?>">
|
159 |
<div class="wpvivid-two-col">
|
160 |
<p><span class="dashicons dashicons-awards wpvivid-dashicons-blue"></span><span><strong>Site Name: </strong></span><span><?php echo $staging_site_name; ?></span></p>
|
161 |
<p><span class="dashicons dashicons-admin-home wpvivid-dashicons-blue"></span><span><strong>Home URL: </strong></span><span><a href="<?php echo esc_url($site_url); ?>"><?php echo $site_url; ?></a></span></p>
|
162 |
<p><span class="dashicons dashicons-rest-api wpvivid-dashicons-blue"></span><span><strong><?php echo $admin_url_descript; ?>: </strong></span><span><a href="<?php echo esc_url($admin_url); ?>"><?php echo $admin_url; ?></a></span></p>
|
|
|
163 |
</div>
|
164 |
|
165 |
<div class="wpvivid-two-col">
|
166 |
<p><span class="dashicons dashicons-admin-site-alt3 wpvivid-dashicons-blue"></span><span><strong>Database Name: </strong></span><span><?php echo $db_name; ?></span></p>
|
167 |
<p><span class="dashicons dashicons-list-view wpvivid-dashicons-blue"></span><span><strong>Table Prefix: </strong></span><span><?php echo $prefix; ?></span></p>
|
168 |
<p><span class="dashicons dashicons-portfolio wpvivid-dashicons-blue"></span><span><strong>Directory: </strong></span><span><?php echo $site_dir; ?></span></p>
|
|
|
169 |
</div>
|
170 |
|
171 |
<div class="wpvivid-copy-staging-to-live-block <?php echo esc_attr($class_btn); ?>" name="<?php echo esc_attr($id); ?>" style="padding:1em 1em 0 0;">
|
154 |
$class_btn='staging-site';
|
155 |
}
|
156 |
|
157 |
+
if(isset($staging['create_time']))
|
158 |
+
{
|
159 |
+
$staging_create_time = $staging['create_time'];
|
160 |
+
$offset=get_option('gmt_offset');
|
161 |
+
$utc_time = $staging_create_time - $offset * 60 * 60;
|
162 |
+
$staging_create_time = date('M-d-Y H:i', $utc_time);
|
163 |
+
}
|
164 |
+
else
|
165 |
+
{
|
166 |
+
$staging_create_time = 'N/A';
|
167 |
+
}
|
168 |
+
|
169 |
+
if(isset($staging['copy_time']))
|
170 |
+
{
|
171 |
+
$staging_copy_time = $staging['copy_time'];
|
172 |
+
$offset=get_option('gmt_offset');
|
173 |
+
$utc_time = $staging_copy_time - $offset * 60 * 60;
|
174 |
+
$staging_copy_time = date('M-d-Y H:i', $utc_time);
|
175 |
+
}
|
176 |
+
else
|
177 |
+
{
|
178 |
+
$staging_copy_time = 'N/A';
|
179 |
+
}
|
180 |
?>
|
181 |
<div class="wpvivid-one-coloum" style="border:1px solid #f1f1f1;padding-top:0em; margin-top:1em;" id="<?php echo esc_attr($id); ?>">
|
182 |
<div class="wpvivid-two-col">
|
183 |
<p><span class="dashicons dashicons-awards wpvivid-dashicons-blue"></span><span><strong>Site Name: </strong></span><span><?php echo $staging_site_name; ?></span></p>
|
184 |
<p><span class="dashicons dashicons-admin-home wpvivid-dashicons-blue"></span><span><strong>Home URL: </strong></span><span><a href="<?php echo esc_url($site_url); ?>"><?php echo $site_url; ?></a></span></p>
|
185 |
<p><span class="dashicons dashicons-rest-api wpvivid-dashicons-blue"></span><span><strong><?php echo $admin_url_descript; ?>: </strong></span><span><a href="<?php echo esc_url($admin_url); ?>"><?php echo $admin_url; ?></a></span></p>
|
186 |
+
<p><span class="dashicons dashicons-clock wpvivid-dashicons-blue"></span><span><strong>Create Time: </strong></span><span><?php echo $staging_create_time; ?></span></p>
|
187 |
</div>
|
188 |
|
189 |
<div class="wpvivid-two-col">
|
190 |
<p><span class="dashicons dashicons-admin-site-alt3 wpvivid-dashicons-blue"></span><span><strong>Database Name: </strong></span><span><?php echo $db_name; ?></span></p>
|
191 |
<p><span class="dashicons dashicons-list-view wpvivid-dashicons-blue"></span><span><strong>Table Prefix: </strong></span><span><?php echo $prefix; ?></span></p>
|
192 |
<p><span class="dashicons dashicons-portfolio wpvivid-dashicons-blue"></span><span><strong>Directory: </strong></span><span><?php echo $site_dir; ?></span></p>
|
193 |
+
<p><span class="dashicons dashicons-clock wpvivid-dashicons-blue"></span><span><strong>Update Time: </strong></span><span><?php echo $staging_copy_time; ?></span></p>
|
194 |
</div>
|
195 |
|
196 |
<div class="wpvivid-copy-staging-to-live-block <?php echo esc_attr($class_btn); ?>" name="<?php echo esc_attr($id); ?>" style="padding:1em 1em 0 0;">
|
includes/staging/class-wpvivid-staging-task-ex.php
CHANGED
@@ -331,6 +331,13 @@ class WPvivid_Staging_Task
|
|
331 |
$this->update_task();
|
332 |
}
|
333 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
334 |
public function is_mu_single()
|
335 |
{
|
336 |
if(isset($this->task['options']['mu_single']))
|
331 |
$this->update_task();
|
332 |
}
|
333 |
|
334 |
+
public function update_action_time($action_type)
|
335 |
+
{
|
336 |
+
$this->get_task();
|
337 |
+
$this->task[$action_type]=time();
|
338 |
+
$this->update_task();
|
339 |
+
}
|
340 |
+
|
341 |
public function is_mu_single()
|
342 |
{
|
343 |
if(isset($this->task['options']['mu_single']))
|
includes/staging/class-wpvivid-staging.php
CHANGED
@@ -2339,6 +2339,7 @@ class WPvivid_Staging_Free
|
|
2339 |
$task = new WPvivid_Staging_Task();
|
2340 |
$task->set_memory_limit();
|
2341 |
$task->setup_task($option);
|
|
|
2342 |
$this->log->CreateLogFile($task->get_log_file_name(), 'no_folder', 'staging');
|
2343 |
$this->log->WriteLog('Start creating staging site.', 'notice');
|
2344 |
$this->log->WriteLogHander();
|
2339 |
$task = new WPvivid_Staging_Task();
|
2340 |
$task->set_memory_limit();
|
2341 |
$task->setup_task($option);
|
2342 |
+
$task->update_action_time('create_time');
|
2343 |
$this->log->CreateLogFile($task->get_log_file_name(), 'no_folder', 'staging');
|
2344 |
$this->log->WriteLog('Start creating staging site.', 'notice');
|
2345 |
$this->log->WriteLogHander();
|
includes/upload-cleaner/class-wpvivid-uploads-scanner.php
CHANGED
@@ -315,6 +315,43 @@ class WPvivid_Uploads_Scanner
|
|
315 |
return $files;
|
316 |
}
|
317 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
318 |
/*
|
319 |
public function get_images_from_acfwidgets( $widget)
|
320 |
{
|
@@ -768,6 +805,38 @@ class WPvivid_Uploads_Scanner
|
|
768 |
}
|
769 |
}
|
770 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
771 |
$files=array();
|
772 |
|
773 |
foreach ($postmeta_images_ids as $id)
|
315 |
return $files;
|
316 |
}
|
317 |
|
318 |
+
public function array_to_file($exploded)
|
319 |
+
{
|
320 |
+
$file='';
|
321 |
+
foreach ($exploded as $key=>$value)
|
322 |
+
{
|
323 |
+
$file=$value;
|
324 |
+
}
|
325 |
+
return $file;
|
326 |
+
}
|
327 |
+
|
328 |
+
public function scan_image_from_nextend()
|
329 |
+
{
|
330 |
+
global $wpdb;
|
331 |
+
$query = "SELECT image FROM ".$wpdb->prefix."nextend2_image_storage";
|
332 |
+
$metas = $wpdb->get_col( $query );
|
333 |
+
$file_array=array();
|
334 |
+
|
335 |
+
$upload_dir = wp_upload_dir();
|
336 |
+
$upload_path = $upload_dir['basedir'];
|
337 |
+
|
338 |
+
foreach ($metas as $meta)
|
339 |
+
{
|
340 |
+
$exploded = explode( ',', $meta );
|
341 |
+
if ( is_array( $exploded ) )
|
342 |
+
{
|
343 |
+
$file_tmp = $this->array_to_file($exploded);
|
344 |
+
$file = str_replace('$upload$', $upload_path, $file_tmp);
|
345 |
+
if(file_exists($file))
|
346 |
+
{
|
347 |
+
$file_array[] = str_replace('$upload$'.'/', '', $file_tmp);
|
348 |
+
}
|
349 |
+
continue;
|
350 |
+
}
|
351 |
+
}
|
352 |
+
return $file_array;
|
353 |
+
}
|
354 |
+
|
355 |
/*
|
356 |
public function get_images_from_acfwidgets( $widget)
|
357 |
{
|
805 |
}
|
806 |
}
|
807 |
|
808 |
+
//
|
809 |
+
$meta_key="(meta_key = '_product_image_gallery')";
|
810 |
+
$query=$wpdb->prepare("SELECT meta_value FROM {$wpdb->postmeta} WHERE post_id = %d AND $meta_key",$post);
|
811 |
+
$metas = $wpdb->get_col($query);
|
812 |
+
foreach ($metas as $meta)
|
813 |
+
{
|
814 |
+
if ( is_numeric( $meta ) )
|
815 |
+
{
|
816 |
+
if ( $meta > 0 )
|
817 |
+
array_push( $postmeta_images_ids, $meta );
|
818 |
+
continue;
|
819 |
+
}
|
820 |
+
else if ( is_serialized( $meta ) )
|
821 |
+
{
|
822 |
+
$decoded = @unserialize( $meta );
|
823 |
+
if ( is_array( $decoded ) )
|
824 |
+
{
|
825 |
+
$this->array_to_ids_or_urls( $decoded, $postmeta_images_ids, $postmeta_images_urls );
|
826 |
+
continue;
|
827 |
+
}
|
828 |
+
}
|
829 |
+
else {
|
830 |
+
$exploded = explode( ',', $meta );
|
831 |
+
if ( is_array( $exploded ) )
|
832 |
+
{
|
833 |
+
$this->array_to_ids_or_urls( $exploded, $postmeta_images_ids, $postmeta_images_urls );
|
834 |
+
continue;
|
835 |
+
}
|
836 |
+
}
|
837 |
+
}
|
838 |
+
//
|
839 |
+
|
840 |
$files=array();
|
841 |
|
842 |
foreach ($postmeta_images_ids as $id)
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: move, clone, migrate, staging, backup, restore, auto backup, cloud backup
|
|
4 |
Requires at least: 4.5
|
5 |
Tested up to: 5.8.2
|
6 |
Requires PHP: 5.3
|
7 |
-
Stable tag: 0.9.
|
8 |
License: GPLv3 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
|
10 |
|
@@ -192,6 +192,11 @@ Thank you for translating WPvivid Backup Plugin to your languages!
|
|
192 |
* [Nima](https://profiles.wordpress.org/nima78600/) (Persian)
|
193 |
|
194 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
195 |
= 0.9.66 =
|
196 |
- Fixed a Dropbox folder bug.
|
197 |
- Fixed a conflict between the unused image cleaner and some themes.
|
4 |
Requires at least: 4.5
|
5 |
Tested up to: 5.8.2
|
6 |
Requires PHP: 5.3
|
7 |
+
Stable tag: 0.9.67
|
8 |
License: GPLv3 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
|
10 |
|
192 |
* [Nima](https://profiles.wordpress.org/nima78600/) (Persian)
|
193 |
|
194 |
== Changelog ==
|
195 |
+
= 0.9.67 =
|
196 |
+
- Fixed: The object-cache.php file and protection files generated by Wordfence were not excluded during restore.
|
197 |
+
- Fixed: Some used images were falsely identified as unused.
|
198 |
+
- Added creation time for a staging site.
|
199 |
+
- Optimized the plugin code.
|
200 |
= 0.9.66 =
|
201 |
- Fixed a Dropbox folder bug.
|
202 |
- Fixed a conflict between the unused image cleaner and some themes.
|
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.
|
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.
|
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.67
|
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.67' );
|
25 |
//
|
26 |
define('WPVIVID_RESTORE_INIT','init');
|
27 |
define('WPVIVID_RESTORE_READY','ready');
|