This repository has been archived on 2021-10-26. You can view files and clone it, but cannot push or open issues or pull requests.
biofriction-web/biofriction-plugin/uninstall.php

24 lines
462 B
PHP

<?php
/*
howto uninstall the pluggin
https://developer.wordpress.org/plugins/plugin-basics/uninstall-methods/
*/
// if uninstall.php is not called by WordPress, die
if (!defined('WP_UNINSTALL_PLUGIN')) {
die;
}
$option_name = 'wporg_option';
delete_option($option_name);
// for site options in Multisite
delete_site_option($option_name);
// drop a custom database table
global $wpdb;
$wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}mytable");
?>