Add Preview form to choose the theme to preview #5
Labels
enhancement
New feature or request
Gutenberg
Required for the WordPress block editor - Gutenberg
help wanted
Extra attention is needed
In order to initiate the caching of a theme's patterns I added logic in oik-patterns that checks
preview_theme=theme
and switches theme if the name of theme is valid. The patterns are loaded by the theme duringinit
. At the end ofinit
, if the theme is more recent than the cachedpatterns.json
file, the updated patterns are once again cached.A rather interesting side effect of the preview logic is you get to see the website running the chosen theme.
It would be nice to be able to enable this preview capability, giving the user the opportunity to pick the theme from any of the currently installed themes...
Requirements
Proposed solution
The text was updated successfully, but these errors were encountered: