15 lines
576 B
PHP
15 lines
576 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_status_settings', 'mozout_status_api_key', 'mozout_status_api_key_hint', 'mozout_status_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_status_') . '%',
|
|
$wpdb->esc_like('_transient_timeout_mozout_status_') . '%'
|
|
));
|