summaryrefslogtreecommitdiff
blob: c459a1f922ccc11a9aaa34ab80619f396b89f828 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php

// If uninstall is not called from WordPress, exit
if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) {
    exit();
}

require_once('core/config.php');
require_once('core/class-wmp.php');

// create uploads folder and define constants
if ( !defined( 'WMP_FILES_UPLOADS_DIR' ) && !defined( 'WMP_FILES_UPLOADS_URL' ) ){
    $WMP_Uploads = new WMobilePack_Uploads();
    $WMP_Uploads->define_uploads_dir();
}

// remove uploaded images and uploads folder
$WMP_Uploads = new WMobilePack_Uploads();
$WMP_Uploads->remove_uploads_dir();

// delete plugin settings
WMobilePack_Options::uninstall();