-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathuninstall.php
More file actions
executable file
·30 lines (26 loc) · 955 Bytes
/
uninstall.php
File metadata and controls
executable file
·30 lines (26 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
/**
* @package koko-analytics
* @license GPL-3.0+
* @author Danny van Kooten
*
* Perform the necessary steps to completely uninstall Koko Analytics
*/
// if uninstall.php is not called by WordPress, die
if (!defined('WP_UNINSTALL_PLUGIN')) {
die;
}
// delete wp-options
delete_option("koko_analytics_settings");
delete_option("koko_analytics_use_custom_endpoint");
delete_option("koko_analytics_realtime_pageview_count");
delete_option('koko_analytics_jetpack_import_params');
// delete historical data?
//
// global $wpdb;
// delete_option("koko_analytics_version");
// $wpdb->query("DROP TABLE {$wpdb->prefix}koko_analytics_site_stats;");
// $wpdb->query("DROP TABLE {$wpdb->prefix}koko_analytics_post_stats;");
// $wpdb->query("DROP TABLE {$wpdb->prefix}koko_analytics_paths;");
// $wpdb->query("DROP TABLE {$wpdb->prefix}koko_analytics_referrer_stats;");
// $wpdb->query("DROP TABLE {$wpdb->prefix}koko_analytics_referrer_urls;");