diff options
author | 2016-02-12 22:22:00 -0500 | |
---|---|---|
committer | 2016-02-12 22:22:00 -0500 | |
commit | 657cafe0e955cf88033597f131aa50835140c617 (patch) | |
tree | cf21a30d319cb2a238a6cfb8b4eb3b20b1b5dcff /plugins/wordpress-mobile-pack/uninstall.php | |
parent | Adding New Mantra version 2.4.1.1 - Bug 574468 (diff) | |
download | blogs-gentoo-657cafe0e955cf88033597f131aa50835140c617.tar.gz blogs-gentoo-657cafe0e955cf88033597f131aa50835140c617.tar.bz2 blogs-gentoo-657cafe0e955cf88033597f131aa50835140c617.zip |
Updating plugins easy-table, jetpack, openid, public-post preview, talbe-of-contents-plus, wordress-mobile-pack - Bug 574468
Diffstat (limited to 'plugins/wordpress-mobile-pack/uninstall.php')
-rw-r--r-- | plugins/wordpress-mobile-pack/uninstall.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/plugins/wordpress-mobile-pack/uninstall.php b/plugins/wordpress-mobile-pack/uninstall.php new file mode 100644 index 00000000..be20413c --- /dev/null +++ b/plugins/wordpress-mobile-pack/uninstall.php @@ -0,0 +1,33 @@ +<?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');
+
+$apiKey = WMobilePack_Options::get_setting('premium_api_key');
+$isPremiumActive = WMobilePack_Options::get_setting('premium_active');
+
+if ($apiKey != '' && $isPremiumActive == 1) {
+
+ // check if we have a https connection
+ $is_secure = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443;
+
+ WMobilePack::read_data( ($is_secure ? WMP_APPTICLES_DISCONNECT_SSL : WMP_APPTICLES_DISCONNECT).'?apiKey='.$apiKey);
+}
+
+// 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();
\ No newline at end of file |