15 lines
606 B
PHP
15 lines
606 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('interweb_ao_status_settings', 'interweb_ao_status_api_key', 'interweb_ao_status_api_key_hint', 'interweb_ao_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_interweb_ao_status_') . '%',
|
|
$wpdb->esc_like('_transient_timeout_interweb_ao_status_') . '%'
|
|
));
|