PluginProbe ʕ •ᴥ•ʔ
WPvivid — Backup, Migration & Staging / 0.9.99
WPvivid — Backup, Migration & Staging v0.9.99
0.9.129 0.9.128 0.9.127 0.9.126 0.9.33 0.9.34 0.9.35 0.9.36 0.9.37 0.9.38 0.9.39 0.9.4 0.9.40 0.9.41 0.9.42 0.9.43 0.9.44 0.9.45 0.9.46 0.9.47 0.9.48 0.9.49 0.9.5 0.9.50 0.9.51 0.9.52 0.9.53 0.9.54 0.9.55 0.9.56 0.9.57 0.9.58 0.9.59 0.9.6 0.9.60 0.9.61 0.9.62 0.9.63 0.9.64 0.9.65 0.9.66 0.9.67 0.9.68 0.9.69 0.9.7 0.9.70 0.9.71 0.9.72 0.9.73 0.9.74 0.9.75 0.9.76 0.9.77 0.9.78 0.9.79 0.9.8 0.9.80 0.9.81 0.9.82 0.9.83 0.9.84 0.9.85 0.9.86 0.9.87 0.9.88 0.9.89 0.9.9 0.9.90 0.9.91 0.9.92 0.9.93 0.9.94 0.9.95 0.9.96 0.9.97 0.9.98 0.9.99 trunk 0.9.1 0.9.10 0.9.100 0.9.101 0.9.102 0.9.103 0.9.104 0.9.105 0.9.106 0.9.107 0.9.108 0.9.109 0.9.11 0.9.110 0.9.111 0.9.112 0.9.113 0.9.114 0.9.115 0.9.116 0.9.117 0.9.118 0.9.119 0.9.12 0.9.120 0.9.121 0.9.122 0.9.123 0.9.124 0.9.125 0.9.13 0.9.14 0.9.15 0.9.16 0.9.17 0.9.18 0.9.19 0.9.2 0.9.20 0.9.21 0.9.22 0.9.23 0.9.24 0.9.25 0.9.26 0.9.27 0.9.28 0.9.29 0.9.3 0.9.30 0.9.31 0.9.32
wpvivid-backuprestore / uninstall.php
wpvivid-backuprestore Last commit date
admin 2 years ago includes 2 years ago languages 4 years ago vendor 2 years ago index.php 7 years ago readme.txt 2 years ago uninstall.php 2 years ago wpvivid-backuprestore.php 2 years ago
uninstall.php
116 lines
1 <?php
2
3 // If uninstall not called from WordPress, then exit.
4 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
5 exit;
6 }
7
8 function wpvivid_clear_free_dir($directory){
9 if(file_exists($directory)){
10 if($dir_handle=@opendir($directory)){
11 while($filename=readdir($dir_handle)){
12 if($filename!='.' && $filename!='..'){
13 $subFile=$directory."/".$filename;
14 if(is_dir($subFile)){
15 wpvivid_clear_free_dir($subFile);
16 }
17 if(is_file($subFile)){
18 wp_delete_file($subFile);
19 }
20 }
21 }
22 closedir($dir_handle);
23 rmdir($directory);
24 }
25 }
26 }
27
28 $wpvivid_common_setting = get_option('wpvivid_common_setting', array());
29 if(!empty($wpvivid_common_setting))
30 {
31 if(isset($wpvivid_common_setting['uninstall_clear_folder']) && $wpvivid_common_setting['uninstall_clear_folder'])
32 {
33 $wpvivid_local_setting = get_option('wpvivid_local_setting', array());
34 if(isset($wpvivid_local_setting['path']))
35 {
36 if($wpvivid_local_setting['path'] !== 'wpvividbackups')
37 {
38 wpvivid_clear_free_dir(WP_CONTENT_DIR.DIRECTORY_SEPARATOR.'wpvividbackups');
39 }
40 $wpvivid_local_setting['path']=basename($wpvivid_local_setting['path']);
41 $source_array=array('.', '..', 'plugins', 'themes', 'uploads');
42 if(!empty($wpvivid_local_setting['path']) && !in_array($wpvivid_local_setting['path'], $source_array))
43 {
44 if(is_dir(WP_CONTENT_DIR.DIRECTORY_SEPARATOR.$wpvivid_local_setting['path']))
45 {
46 wpvivid_clear_free_dir(WP_CONTENT_DIR.DIRECTORY_SEPARATOR.$wpvivid_local_setting['path']);
47 }
48 }
49 }
50 else
51 {
52 wpvivid_clear_free_dir(WP_CONTENT_DIR.DIRECTORY_SEPARATOR.'wpvividbackups');
53 }
54 }
55 }
56
57 delete_option('wpvivid_schedule_setting');
58 delete_option('wpvivid_email_setting');
59 delete_option('wpvivid_compress_setting');
60 delete_option('wpvivid_local_setting');
61 delete_option('wpvivid_upload_setting');
62 delete_option('wpvivid_common_setting');
63 delete_option('wpvivid_backup_list');
64 delete_option('wpvivid_task_list');
65 delete_option('wpvivid_init');
66 delete_option('wpvivid_remote_init');
67 delete_option('wpvivid_last_msg');
68 delete_option('wpvivid_download_cache');
69 delete_option('wpvivid_download_task');
70 delete_option('wpvivid_user_history');
71 delete_option('wpvivid_saved_api_token');
72 delete_option('wpvivid_import_list_cache');
73 delete_option('wpvivid_importer_task_list');
74 delete_option('wpvivid_list_cache');
75 delete_option('wpvivid_exporter_task_list');
76 delete_option('wpvivid_need_review');
77 delete_option('wpvivid_review_msg');
78 delete_option('wpvivid_migrate_status');
79 delete_option('clean_task');
80 delete_option('cron_backup_count');
81 delete_option('wpvivid_backup_success_count');
82 delete_option('wpvivid_backup_error_array');
83 delete_option('wpvivid_amazons3_notice');
84 delete_option('wpvivid_hide_mwp_tab_page_v1');
85 delete_option('wpvivid_hide_wp_cron_notice');
86 delete_option('wpvivid_transfer_error_array');
87 delete_option('wpvivid_transfer_success_count');
88 delete_option('wpvivid_api_token');
89 delete_option('wpvivid_download_task_v2');
90 delete_option('wpvivid_export_list');
91 delete_option('wpvivid_backup_report');
92
93 $options=get_option('wpvivid_staging_options',array());
94 $staging_keep_setting=isset($options['staging_keep_setting']) ? $options['staging_keep_setting'] : true;
95 if($staging_keep_setting)
96 {
97
98 }
99 else
100 {
101 delete_option('wpvivid_staging_task_list');
102 delete_option('wpvivid_staging_task_cancel');
103 delete_option('wpvivid_staging_options');
104 delete_option('wpvivid_staging_history');
105 delete_option('wpvivid_staging_list');
106 }
107
108 define('WPVIVID_MAIN_SCHEDULE_EVENT','wpvivid_main_schedule_event');
109
110 if(wp_get_schedule(WPVIVID_MAIN_SCHEDULE_EVENT))
111 {
112 wp_clear_scheduled_hook(WPVIVID_MAIN_SCHEDULE_EVENT);
113 $timestamp = wp_next_scheduled(WPVIVID_MAIN_SCHEDULE_EVENT);
114 wp_unschedule_event($timestamp,WPVIVID_MAIN_SCHEDULE_EVENT);
115 }
116