forked from rock-solid/wordpress-mobile-pack
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuninstall.php
More file actions
25 lines (20 loc) · 782 Bytes
/
uninstall.php
File metadata and controls
25 lines (20 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
// If uninstall is not called from WordPress, exit
if (!defined('WP_UNINSTALL_PLUGIN')) {
exit();
}
require_once('core/class-config.php');
$Pt_Pwa_Config = new Pt_Pwa_Config();
require_once('core/class-pwa.php');
// Create uploads folder and define constants
if (!defined('PWA_FILES_UPLOADS_DIR') && !defined('PWA_FILES_UPLOADS_URL')) {
$WMP_Uploads = new PtPwa_Uploads();
$WMP_Uploads->define_uploads_dir();
}
// Remove uploaded images and uploads folder
$WMP_Uploads = new PtPwa_Uploads();
$WMP_Uploads->remove_uploads_dir();
// Delete plugin settings
delete_option('pt_pwa_enabled');
PtPwa_Options::uninstall();
//delete service worker and manifest files