Created
June 14, 2013 16:03
-
-
Save WPsites/5783087 to your computer and use it in GitHub Desktop.
Example restore code added to a backup file created automatically with the WPide plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php /* start WPide restore code */ | |
if ($_POST["restorewpnonce"] === "d859796ed783fd60ae9fc9db3a5e32a585e948a587"){ | |
if ( file_put_contents ( "/var/www/sites/sites.co.uk/sites.co.uk/subdomains/site/html/wp-content/themes/mm/customer-comments.php" , preg_replace("#<\?php /\* start WPide(.*)end WPide restore code \*/ \?>#s", "", file_get_contents("/var/www/sites/sites.co.uk/sites.co.uk/subdomains/site/html/wp-content/plugins/wpide/backups/themes/handyman-mm/customer-comments_2013-04-11-23.php") ) ) ){ | |
echo "Your file has been restored, overwritting the recently edited file! \n\n The active editor still contains the broken or unwanted code. If you no longer need that content then close the tab and start fresh with the restored file."; | |
} | |
}else{ | |
echo "-1"; | |
} | |
die(); | |
/* end WPide restore code */ ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment