arc-hive-wordpress-plugin/uninstall.php

24 lines
470 B
PHP
Raw Normal View History

2021-04-15 13:48:04 +02:00
<?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;
}
2022-03-30 11:25:09 +02:00
$option_name = 'arcHIVE_option';
2021-04-15 13:48:04 +02:00
delete_option($option_name);
// for site options in Multisite
delete_site_option($option_name);
// drop a custom database table
global $wpdb;
2022-03-30 11:25:09 +02:00
$wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}arcHIVEplugin");
2021-04-15 13:48:04 +02:00
?>