From 6f357445dd3fe12542146b283594b7a00481edc6 Mon Sep 17 00:00:00 2001 From: peptiderepo Date: Sun, 5 Apr 2026 20:27:16 +0700 Subject: [PATCH] feat: add peptide-news-plugin/uninstall.php --- peptide-news-plugin/uninstall.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 peptide-news-plugin/uninstall.php diff --git a/peptide-news-plugin/uninstall.php b/peptide-news-plugin/uninstall.php new file mode 100644 index 0000000..1f36e5d --- /dev/null +++ b/peptide-news-plugin/uninstall.php @@ -0,0 +1,28 @@ +query( "DROP TABLE IF EXISTS {$wpdb->prefix}peptide_news_daily_stats" ); +$wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}peptide_news_clicks" ); +$wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}peptide_news_articles" ); + +// Remove all options. +$options = $wpdb->get_col( + "SELECT option_name FROM {$wpdb->options} WHERE option_name LIKE 'peptide_news_%'" +); + +foreach ( $options as $option ) { + delete_option( $option ); +}