From d1e5df272a68eda0746baae6eb1d17624b4a1354 Mon Sep 17 00:00:00 2001 From: bipoza Date: Tue, 21 Mar 2023 15:17:54 +0100 Subject: [PATCH] remove db after uninstall the plugin --- wp-uptime.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wp-uptime.php b/wp-uptime.php index c3e0c1f..c1bfdfc 100644 --- a/wp-uptime.php +++ b/wp-uptime.php @@ -97,4 +97,11 @@ function wp_uptime_settings() { register_setting('wp_uptime_settings', 'wp_uptime_endpoint_path'); register_setting('wp_uptime_settings', 'wp_uptime_response_value'); +} + +register_uninstall_hook(__FILE__, 'wp_uptime_uninstall'); +function wp_uptime_uninstall() +{ + delete_option('wp_uptime_endpoint_path'); + delete_option('wp_uptime_response_value'); } \ No newline at end of file