| 1 |
<?php // Uninstall Plugin |
| 2 |
|
| 3 |
if (!defined('ABSPATH') && !defined('WP_UNINSTALL_PLUGIN')) exit(); |
| 4 |
|
| 5 |
delete_option('banhammer_settings'); |
| 6 |
delete_option('banhammer_armory'); |
| 7 |
delete_option('banhammer_tower'); |
| 8 |
delete_option('banhammer_secret_key'); |
| 9 |
delete_option('banhammer-dismiss-notice'); |
| 10 |
|
| 11 |
$timestamp = wp_next_scheduled('banhammer_cron_reset'); |
| 12 |
wp_unschedule_event($timestamp, 'banhammer_cron_reset'); |
| 13 |
wp_clear_scheduled_hook('banhammer_cron_reset'); |
| 14 |
|
| 15 |
global $wpdb; |
| 16 |
$table = $wpdb->prefix .'banhammer'; |
| 17 |
$wpdb->query('DROP TABLE IF EXISTS '. $table); |