| Server IP : 62.173.141.34 / Your IP : 216.73.217.113 Web Server : Apache/2.4.63 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/3.0.2 System : Linux server7.msonline.ru 5.15.0-179-generic #189-Ubuntu SMP Tue May 5 18:20:56 UTC 2026 x86_64 User : izihss ( 1005) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,exec,system,passthru,shell_exec,proc_open,popen MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/izihss/web/izihss.ru/public_html/wp-content/plugins/wp-database-backup/ |
Upload File : |
<?php
// If uninstall is not called from WordPress, exit
if (!defined('WP_UNINSTALL_PLUGIN')) {
exit();
}
// Function to delete options for a specific site
function wp_db_delete_options_for_site() {
$wp_db_remove_on_uninstall = get_option('wp_db_remove_on_uninstall', false);
if ($wp_db_remove_on_uninstall) {
// Remove options
$options_to_remove = array(
'wp_db_backup_destination_SFTP',
'wp_db_backup_destination_FTP',
'wp_db_backup_destination_Email',
'wp_db_backup_destination_s3',
'wp_db_remove_local_backup',
'wp_db_remove_on_uninstall',
'wp_db_backup_backup_type',
'wp_db_backup_exclude_dir',
'wp_db_backup_backups_dir',
'wp_db_backup_sftp_details',
'wpdb_dest_bb_s3_bucket',
'wpdb_dest_bb_s3_bucket_key',
'wpdb_dest_bb_s3_bucket_secret',
'wpdb_dest_bb_s3_bucket_host',
'wp_db_backup_destination_bb',
'wp_db_backup_backups',
'wp_db_backup_options'
);
foreach ($options_to_remove as $option) {
delete_option($option);
}
}
}
if (is_multisite()) {
// Get all sites in the network
$sites = get_sites();
if(!empty($sites) && is_array($sites)) {
foreach ($sites as $site) {
switch_to_blog($site->blog_id);
wp_db_delete_options_for_site();
restore_current_blog();
}
}
} else {
// Single site
wp_db_delete_options_for_site();
}