| Server IP : 185.21.40.28 / Your IP : 216.73.216.64 Web Server : LiteSpeed System : Linux vm1413.enterprisecloud.nu 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64 User : nordisk-netvaerk-neuro_s2rzzojuo ( 10433) PHP Version : 8.3.32 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/nordisk-netvaerk-neurorehab.com/httpdocs/wp-content/plugins/gpltimes/ |
Upload File : |
<?php
/**
* Uninstall GPL Times
*
* This file runs when the plugin is deleted through WordPress admin.
* It cleans up all plugin data from the database.
*
* @package GPLTimes
*/
// Exit if not called by WordPress
if (!defined('WP_UNINSTALL_PLUGIN')) {
exit;
}
/**
* Backward Compatibility Toggle
* Keep in sync with gpltimes.php
* Set to false when all users have upgraded to v4.1.0+
*/
$gpltimes_backward_compat = true;
/**
* Clean up all plugin data on uninstall
*/
// Current cron hooks
$cron_hooks = [
'gpl_plugin_update_check',
'gpltimes_auth_recheck',
'gpltimes_delayed_refresh',
'gpltimes_auto_update',
'gpltimes_cleanup_backups',
];
// Legacy cron hooks (only when backward compatibility is enabled)
if ($gpltimes_backward_compat) {
$legacy_cron_hooks = [
'gpl_cron_hook',
'gpl_cron_hook_time',
'gpl_cron_hook_member',
'gpl_time_check',
'gpl_member_check',
];
$cron_hooks = array_merge($cron_hooks, $legacy_cron_hooks);
}
foreach ($cron_hooks as $hook) {
wp_clear_scheduled_hook($hook);
}
// Current options
$options = [
'username',
'password',
'gplstatus',
'gpltokenid',
'gpltimes_api_key',
'gpltimestatus',
'gplcrondata',
'gpltimes_last_update_check',
'gpldiffslug',
'gplpluginlistslug',
'current_time_gpl',
'gplpluginactive',
'gpltimes_whitelabel_settings',
'gplcrondatamember',
'gpluncheckdata',
'gpltimes_beta_updates',
'gpltimes_version',
'gpl_membership_details',
'gpltimes_autoupdate_settings',
'gpltimes_autoupdate_items',
'gpltimes_update_log',
'gpltimes_rollback_settings',
];
// Legacy options (only when backward compatibility is enabled)
if ($gpltimes_backward_compat) {
$legacy_options = [
'packagereturndata',
'gplcheckedstatus',
'gplslugdetails',
'gpltheme_slugdetails',
];
$options = array_merge($options, $legacy_options);
}
foreach ($options as $option) {
delete_option($option);
}
// Delete all transients
$transients = [
'gpltimes_api_result',
'gpltimes_daily_check_transient',
'gpltimes_notice_data',
'gpltimes_filtered_updates',
];
foreach ($transients as $transient) {
delete_transient($transient);
}
// Clean up site transients
delete_site_transient('update_plugins');
delete_site_transient('update_themes');
// Clear rollback backups directory
$backup_dir = WP_CONTENT_DIR . '/gpltimes-backups';
if (is_dir($backup_dir)) {
$iterator = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($backup_dir, RecursiveDirectoryIterator::SKIP_DOTS),
RecursiveIteratorIterator::CHILD_FIRST
);
foreach ($iterator as $file) {
if ($file->isDir()) {
@rmdir($file->getPathname());
} else {
@unlink($file->getPathname());
}
}
@rmdir($backup_dir);
}
// Clear any plugin cache
wp_cache_flush();