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 ); +}