require_once DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php'; require_once DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php'; $nonce = wp_create_nonce('duplicator_cleanup_page'); $_GET['action'] = isset($_GET['action']) ? $_GET['action'] : 'display'; if (isset($_GET['action'])) { if ($_GET['action'] == 'installer' || $_GET['action'] == 'legacy' || $_GET['action'] == 'tmp-cache') { $verify_nonce = $_REQUEST['_wpnonce']; if (!wp_verify_nonce($verify_nonce, 'duplicator_cleanup_page')) { exit; // Get out of here bad nounce! } } } $txt_found = DUP_Util::__("File Found"); $txt_not_found = DUP_Util::__("File Removed"); $installer_files = DUP_Server::GetInstallerFiles(); switch ($_GET['action']) { case 'installer': $action_response = __('Installer file cleanup ran!'); $css_hide_msg = 'div.error {display:none}'; break; case 'legacy': DUP_Settings::LegacyClean(); $action_response = __('Legacy data removed.'); break; case 'tmp-cache': DUP_Package::TmpCleanup(true); $action_response = __('Build cache removed.'); break; } ?>
case 'duplicator_package_active': $action_response = __('Package settings have been reset.', 'duplicator'); break; } } DUP_Util::InitSnapshotDirectory(); $Package = DUP_Package::GetActive(); $package_hash = $Package->MakeHash(); $dup_tests = array(); $dup_tests = DUP_Server::GetRequirements(); $default_name = DUP_Package::GetDefaultName(); $view_state = DUP_UI::GetViewStateArray(); $ui_css_storage = isset($view_state['dup-pack-storage-panel']) && $view_state['dup-pack-storage-panel'] ? 'display:block' : 'display:none'; $ui_css_archive = isset($view_state['dup-pack-archive-panel']) && $view_state['dup-pack-archive-panel'] ? 'display:block' : 'display:none'; $ui_css_installer = isset($view_state['dup-pack-installer-panel']) && $view_state['dup-pack-installer-panel'] ? 'display:block' : 'display:none'; $dup_intaller_files = implode(", ", array_keys(DUP_Server::GetInstallerFiles())); $dbbuild_mode = DUP_Settings::Get('package_mysqldump') && DUP_Database::GetMySqlDumpPath() ? 'mysqldump' : 'PHP'; ?> <style> /* ----------------------------- REQUIREMENTS*/ div.dup-sys-section {margin:1px 0px 5px 0px} div.dup-sys-title {display:inline-block; width:250px; padding:1px; } div.dup-sys-title div {display:inline-block;float:right; } div.dup-sys-info {display:none; max-width: 98%; margin:4px 4px 12px 4px} div.dup-sys-pass {display:inline-block; color:green;} div.dup-sys-fail {display:inline-block; color:#AF0000;} div.dup-sys-contact {padding:5px 0px 0px 10px; font-size:11px; font-style:italic} span.dup-toggle {float:left; margin:0 2px 2px 0; } table.dup-sys-info-results td:first-child {width:200px}