@fwrite($robotfile, "User-agent: * \nDisallow: /" . DUPLICATOR_SSDIR_NAME . '/'); @fclose($robotfile); //PLUG DIR: Create token file in plugin $tokenfile2 = @fopen($path_plugin . 'installer/dtoken.php', 'w'); @fwrite($tokenfile2, '<?php @error_reporting(0); @require_once("../../../../wp-admin/admin.php"); global $wp_query; $wp_query->set_404(); header("HTTP/1.1 404 Not Found", true, 404); header("Status: 404 Not Found"); @include(get_template_directory () . "/404.php"); ?>'); @fclose($tokenfile2); } /** * Attempts to file zip on a users system */ public static function GetZipPath() { $filepath = null; if (self::IsShellExecAvailable()) { if (shell_exec('hash zip 2>&1') == NULL) { $filepath = 'zip'; } else { $possible_paths = array('/usr/bin/zip', '/opt/local/bin/zip'); foreach ($possible_paths as $path) { if (file_exists($path)) { $filepath = $path; break; } } } } return $filepath; } } DUP_Util::init();