biofriction-wp-theme/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");
?>