PluginProbe
Import WP – CSV & XML Import Export for WordPress / 2.15.0
Import WP – CSV & XML Import Export for WordPress v2.15.0
2.15.1 2.15.0 2.14.24 2.14.23 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.9.0 2.9.1 All 144 releases
← All changes | uninstall.php +6 -1 2.7.32.15.0 View file →
@@ -8,8 +8,10 @@
8 8 if (!defined('WP_UNINSTALL_PLUGIN')) {
9 9 die;
10 10 }
11 11
12 +do_action('iwp/uninstall_plugin');
13 +
12 14 // Escape if cleanup has not been enabled.
13 15 $uninstall_enabled = get_option('iwp_settings');
14 16 if (!isset($uninstall_enabled['cleanup']) || true !== $uninstall_enabled['cleanup']) {
15 17 return;
@@ -41,9 +43,12 @@
41 43
42 44 // 2. Delete /wp-content/importwp folder
43 45 require_once ABSPATH . '/wp-admin/includes/class-wp-filesystem-direct.php';
44 46 $fileSystemDirect = new \WP_Filesystem_Direct(false);
45 -$fileSystemDirect->rmdir(WP_CONTENT_DIR . '/uploads/importwp', true);
47 +$upload_dir = wp_upload_dir();
48 +
49 +$fileSystemDirect->rmdir($upload_dir['basedir'] . DIRECTORY_SEPARATOR . 'importwp', true);
50 +$fileSystemDirect->rmdir($upload_dir['basedir'] . DIRECTORY_SEPARATOR . 'exportwp', true);
46 51
47 52
48 53 // 3. Uninstall DB
49 54 $migrations = new Migrations();