| 1 |
<?php |
| 2 |
// If uninstall is not called from WordPress, exit |
| 3 |
if (!defined('WP_UNINSTALL_PLUGIN')) { |
| 4 |
exit(); |
| 5 |
} |
| 6 |
|
| 7 |
global $wp_filesystem; |
| 8 |
|
| 9 |
// Remove cache (also parent directory but only if it's empty). |
| 10 |
$wp_filesystem->rmdir(WP_CONTENT_DIR . '/cache/gantry5', true); |
| 11 |
$wp_filesystem->rmdir(WP_CONTENT_DIR . '/cache', false); |
| 12 |
|
| 13 |
// Remove options. |
| 14 |
delete_option('gantry5_plugin'); |
| 15 |
|