15 lines
588 B
PHP
15 lines
588 B
PHP
<?php
|
|
// Runs when the plugin is deleted from WordPress: removes its settings, the saved key and its caches.
|
|
if (!defined('WP_UNINSTALL_PLUGIN')) {
|
|
exit;
|
|
}
|
|
|
|
foreach (array('mozout_reseller_settings', 'mozout_reseller_api_key', 'mozout_reseller_api_key_hint', 'mozout_reseller_activity_log') as $opt) {
|
|
delete_option($opt);
|
|
}
|
|
global $wpdb;
|
|
$wpdb->query($wpdb->prepare(
|
|
"DELETE FROM {$wpdb->options} WHERE option_name LIKE %s OR option_name LIKE %s",
|
|
$wpdb->esc_like('_transient_mozout_reseller_') . '%',
|
|
$wpdb->esc_like('_transient_timeout_mozout_reseller_') . '%'
|
|
));
|