PluginProbe ʕ •ᴥ•ʔ
WPvivid — Backup, Migration & Staging / 0.9.85
WPvivid — Backup, Migration & Staging v0.9.85
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 3 years ago includes 3 years ago languages 4 years ago vendor 3 years ago index.php 7 years ago readme.txt 3 years ago uninstall.php 4 years ago wpvivid-backuprestore.php 3 years ago
uninstall.php
103 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 unlink($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 if(isset($wpvivid_common_setting['uninstall_clear_folder']) && $wpvivid_common_setting['uninstall_clear_folder']){
31 $wpvivid_local_setting = get_option('wpvivid_local_setting', array());
32 if(isset($wpvivid_local_setting['path'])){
33 if($wpvivid_local_setting['path'] !== 'wpvividbackups'){
34 wpvivid_clear_free_dir(WP_CONTENT_DIR.DIRECTORY_SEPARATOR.'wpvividbackups');
35 }
36 wpvivid_clear_free_dir(WP_CONTENT_DIR.DIRECTORY_SEPARATOR.$wpvivid_local_setting['path']);
37 }
38 else{
39 wpvivid_clear_free_dir(WP_CONTENT_DIR.DIRECTORY_SEPARATOR.'wpvividbackups');
40 }
41 }
42 }
43
44 delete_option('wpvivid_schedule_setting');
45 delete_option('wpvivid_email_setting');
46 delete_option('wpvivid_compress_setting');
47 delete_option('wpvivid_local_setting');
48 delete_option('wpvivid_upload_setting');
49 delete_option('wpvivid_common_setting');
50 delete_option('wpvivid_backup_list');
51 delete_option('wpvivid_task_list');
52 delete_option('wpvivid_init');
53 delete_option('wpvivid_remote_init');
54 delete_option('wpvivid_last_msg');
55 delete_option('wpvivid_download_cache');
56 delete_option('wpvivid_download_task');
57 delete_option('wpvivid_user_history');
58 delete_option('wpvivid_saved_api_token');
59 delete_option('wpvivid_import_list_cache');
60 delete_option('wpvivid_importer_task_list');
61 delete_option('wpvivid_list_cache');
62 delete_option('wpvivid_exporter_task_list');
63 delete_option('wpvivid_need_review');
64 delete_option('wpvivid_review_msg');
65 delete_option('wpvivid_migrate_status');
66 delete_option('clean_task');
67 delete_option('cron_backup_count');
68 delete_option('wpvivid_backup_success_count');
69 delete_option('wpvivid_backup_error_array');
70 delete_option('wpvivid_amazons3_notice');
71 delete_option('wpvivid_hide_mwp_tab_page_v1');
72 delete_option('wpvivid_hide_wp_cron_notice');
73 delete_option('wpvivid_transfer_error_array');
74 delete_option('wpvivid_transfer_success_count');
75 delete_option('wpvivid_api_token');
76 delete_option('wpvivid_download_task_v2');
77 delete_option('wpvivid_export_list');
78 delete_option('wpvivid_backup_report');
79
80 $options=get_option('wpvivid_staging_options',array());
81 $staging_keep_setting=isset($options['staging_keep_setting']) ? $options['staging_keep_setting'] : true;
82 if($staging_keep_setting)
83 {
84
85 }
86 else
87 {
88 delete_option('wpvivid_staging_task_list');
89 delete_option('wpvivid_staging_task_cancel');
90 delete_option('wpvivid_staging_options');
91 delete_option('wpvivid_staging_history');
92 delete_option('wpvivid_staging_list');
93 }
94
95 define('WPVIVID_MAIN_SCHEDULE_EVENT','wpvivid_main_schedule_event');
96
97 if(wp_get_schedule(WPVIVID_MAIN_SCHEDULE_EVENT))
98 {
99 wp_clear_scheduled_hook(WPVIVID_MAIN_SCHEDULE_EVENT);
100 $timestamp = wp_next_scheduled(WPVIVID_MAIN_SCHEDULE_EVENT);
101 wp_unschedule_event($timestamp,WPVIVID_MAIN_SCHEDULE_EVENT);
102 }
103