Yes, you should definitely restore the original version of the file, using Wordfence.
Next, follow the steps in this guide, to check and clean the site:
My site was hacked. How do I use Wordfence to clean it?
Remember when it says to change all passwords, to include FTP, SSH, your control panel, and any other passwords that give you access to work on the site. You should also check your Users list in WordPress, to be sure a new admin hasn't been added. Let us know if you run into trouble with the cleanup.