| @@ -1,13 +1,13 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -if (!defined('WP_UNINSTALL_PLUGIN')) { | |
| 4 | - exit; | |
| 3 | +// if uninstall.php is not called by WordPress, die | |
| 4 | +if(!defined('WP_UNINSTALL_PLUGIN')){ | |
| 5 | + die; | |
| 5 | 6 | } |
| 6 | 7 | |
| 7 | -global $wpdb; | |
| 8 | - | |
| 8 | +// Deleting options | |
| 9 | 9 | delete_option('cookieadmin_version'); |
| 10 | 10 | delete_option('cookieadmin_law'); |
| 11 | -delete_option('cookieadmin_consent_settings'); | |
| 12 | - | |
| 13 | -$wpdb->query("DROP TABLE IF EXISTS ".$wpdb->prefix . 'cookieadmin_cookies'); | |
| 11 | +delete_option('cookieadmin_scan'); | |
| 12 | +delete_option('cookieadmin_settings'); | |
| 13 | +delete_option('cookieadmin_consent_settings'); | |