What exactly does Live Preview do?
-
I had a major problem with my server yesterday when I uploaded a theme, but did not activate it. See this thread: https://wordpress.org/support/topic/uploading-theme-changes-siteurl?replies=3
The outcome of this is that I would like to better understand what Live Preview (as opposed to Activate) does.
The theme I was handed by my designer had the following lines in function.php:
update_option(‘siteurl’,'<server>/’);
update_option(‘home’,'<server>/’);Is it correct that even in Live Preview mode these lines will be run? Since these are “server-wide” settings, does that effectively mean that Live Preview of a theme, before it is activated, has the potential to bring a web site down?
And, in summary, do lines like this generally belong in a theme that is intended to be installed on a different server (which, I assume, is a best practice anyway – no idea why a theme would hard code where it is installed).
I’d love to understand all this more, for future reference.
Mark
The topic ‘What exactly does Live Preview do?’ is closed to new replies.