I was experimenting in the theme editor and screwed up. I had pasted some code into functions.php and it did not work. So I deleted it, being careful not to touch anything else.
After Update File, I got:
Quote:
Parse error: syntax error, unexpected T_STRING in /home/joebandh/public_html/wp-content/themes/atahualpa346/functions.php on line 665 |
Next, I opened my backup copy of Atahualpa (POINT #1 of this tutorial - ALWAYS BACKUP BEFORE WORKING ON ANY CODE - it can never be said often enough - and there is nothing worse than screwing up and not having protected your arrogant, over-confident self) and did a Ctrl-c copy of the contents of my backup functions.php pasted Ctrl-v into the broken file.
Update File - and the problem had not gone away. The T_STRING error persisted. It was a genuine WTF moment.
I tried a very Hail Mary thing.
I opened the site in my FTP client and uploaded my local drive backup copy of functions.php to the server and OVERWROTE the entire damaged file.
That fixed the problem. No more T_STRING error.
Why did that work? I have no idea. I leave it to my betters, of whom there are many.
If anyone can add that explanation it would be welcome. But the essential point is, that overwriting did what copy/paste did not. I hope it helps someone in the future.