This chapter will cover:
- What the theme lock function does
- Why you might want to use it
- How to enable it on your book
What is the theme lock feature?
Theme lock allows you to lock in your book’s styling, exactly as it is when you’re finished working on it.
As we update the Pressbooks system, our changes sometimes have an impact on existing books. While most are improvements to the different themes — fixing errors, adding new options etc. — they can very occasionally impact the page count of a book, which can cause trouble when you go to reprint. While we make every effort to avoid this, it helps to have a safety built in.
This is what the theme lock provides. By enabling it, you lock in the current version of your theme, meaning that no changes we make can have unintended consequences when you go to export a new copy for a reprint or second edition.
NOTE: The theme lock feature is not available with the Custom CSS theme as this already acts to lock in your theme and prevent any changes being made to it by system updates.
What happens once the theme lock is enabled?
Once you have locked your theme, you will no longer be able to make any changes to your theme options, nor will you be able to change to a new theme without first changing the theme lock settings.
This means you should only turn it on when you’re finished making all your theme customizations and are sure you are satisfied with your PDF, ebook and web outputs. If you do try to access the “Appearance” menus, a message will appear instructing you to first switch off the theme lock option.
What happens if I turn the theme lock off?
If you have had the theme lock enabled and choose to switch it off, the system will automatically update your theme to the most recent version available. It will also allow you to once again change your theme and edit your theme options.
NOTE: once you turn off the theme lock you will not be able to restore the previous version of your theme! Make sure you’re sure you want to update your theme before you go ahead.
How do I lock my theme?
To enable this option:
- Go to “Settings” –> “Export”
- Select “Lock your theme at its current version”
- Save your changes
If you don’t see this option appear, you most likely have the Custom CSS theme applied, so don’t need to apply this setting — your formatting and styles are already locked in!