chore: uninstall cleanup, WP readme
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
// If uninstall not called from WordPress, exit.
|
||||
if (!defined('WP_UNINSTALL_PLUGIN')) exit;
|
||||
|
||||
global $wpdb;
|
||||
$table = $wpdb->prefix . 'cf7stg_queue';
|
||||
$wpdb->query("DROP TABLE IF EXISTS {$table}");
|
||||
|
||||
$options = [
|
||||
'cf7stg_bot_token_enc',
|
||||
'cf7stg_chat_id',
|
||||
'cf7stg_site_title',
|
||||
'cf7stg_last_test',
|
||||
'cf7stg_db_version',
|
||||
];
|
||||
foreach ($options as $opt) {
|
||||
delete_option($opt);
|
||||
}
|
||||
|
||||
wp_clear_scheduled_hook('cf7stg_dispatch');
|
||||
wp_clear_scheduled_hook('cf7stg_cleanup');
|
||||
Reference in New Issue
Block a user