Initial import of the bdmurphy Bookshelf work: the bd-bookshelf theme, bd-bookshelf-plugin, bd-bookshelfhelper and bd-simpleemail plugins, plus the specification documents, mockups and release archives.
28 lines
689 B
PHP
28 lines
689 B
PHP
<?php
|
|
/**
|
|
* BD Bookshelf Uninstall
|
|
*
|
|
* Fired when the plugin is deleted from the Plugins page.
|
|
*
|
|
* @package BD_Bookshelf
|
|
*/
|
|
|
|
if (!defined('WP_UNINSTALL_PLUGIN')) {
|
|
exit;
|
|
}
|
|
|
|
// Include database class
|
|
require_once __DIR__ . '/includes/class-bdm-database.php';
|
|
|
|
// Drop all tables
|
|
$database = new BDM_Database();
|
|
$database->drop_tables();
|
|
|
|
// Remove options
|
|
global $wpdb;
|
|
$wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE 'bd_bookshelf_%'");
|
|
|
|
// Remove transients
|
|
$wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE '_transient_bd_bookshelf_%'");
|
|
$wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE '_transient_timeout_bd_bookshelf_%'");
|