| 1 |
<?php |
| 2 |
/* |
| 3 |
+=====================================================================+ |
| 4 |
| ____ _ ____ __ _ _ | |
| 5 |
| / ___|___ __| | ___ | _ \ _ __ ___ / _(_) | ___ _ __ | |
| 6 |
| | | / _ \ / _` |/ _ \ | |_) | '__/ _ \| |_| | |/ _ \ '__| | |
| 7 |
| | |__| (_) | (_| | __/ | __/| | | (_) | _| | | __/ | | |
| 8 |
| \____\___/ \__,_|\___| |_| |_| \___/|_| |_|_|\___|_| | |
| 9 |
| | |
| 10 |
| (c) Jerome Bruandet ~ https://nintechnet.com/codeprofiler/ | |
| 11 |
+=====================================================================+ |
| 12 |
*/ |
| 13 |
|
| 14 |
if (! defined('WP_UNINSTALL_PLUGIN') ) { |
| 15 |
exit('Not allowed'); |
| 16 |
} |
| 17 |
|
| 18 |
// ===================================================================== |
| 19 |
// Code Profiler's uninstaller (database + files). |
| 20 |
|
| 21 |
$cp_options = get_option('code-profiler'); |
| 22 |
|
| 23 |
global $wp_filesystem; |
| 24 |
require_once ABSPATH .'wp-admin/includes/file.php'; |
| 25 |
WP_Filesystem(); |
| 26 |
|
| 27 |
define('CODE_PROFILER_VERSION', '1'); |
| 28 |
require_once 'lib/helper.php'; |
| 29 |
|
| 30 |
if ( $wp_filesystem->exists( WPMU_PLUGIN_DIR .'/'. CODE_PROFILER_MUPLUGIN ) ) { |
| 31 |
$wp_filesystem->delete( WPMU_PLUGIN_DIR .'/'. CODE_PROFILER_MUPLUGIN, false, 'f'); |
| 32 |
} |
| 33 |
|
| 34 |
// Delete options in the DB |
| 35 |
delete_option('code-profiler'); |
| 36 |
|
| 37 |
// Delete profiles on disk |
| 38 |
$wp_filesystem->delete( CODE_PROFILER_UPLOAD_DIR, true, 'd'); |
| 39 |
|
| 40 |
return; |
| 41 |
// ===================================================================== |
| 42 |
// EOF |
| 43 |
|