[wp-meta] [Making WordPress.org] #5818: Theme preview is not working for block themes
Making WordPress.org
noreply at wordpress.org
Wed Sep 8 03:49:16 UTC 2021
#5818: Theme preview is not working for block themes
-----------------------------+---------------------
Reporter: kafleg | Owner: (none)
Type: defect | Status: closed
Priority: high | Milestone:
Component: Theme Directory | Resolution: fixed
Keywords: needs-patch |
-----------------------------+---------------------
Comment (by dd32):
Replying to [comment:4 oandregal]:
> :wave: I was working on a similar issue that affected the customizer and
themes that use the global stylesheet generated by theme.json. For
reference, this is the issue
https://github.com/WordPress/gutenberg/issues/34531 It turns out there was
a cache issue that I'm fixing at
https://github.com/WordPress/gutenberg/pull/34540
Hey @oandregal!
The theme previewer doesn't call any of those such filters, as it simply
loads WordPress with a different defined stylesheet/template option.
Logic to call that function prior to rendering the page can be added
though. Preferably however, Gutenberg should be caching the styles in a
manner that is keyed by the theme being displayed.
Without looking closely right now, something else we do is use
`pre_option_*` filters to prevent some database-set options from being
respected - We could do something similar here and simply prevent the
cache option ever being set/read to force it to re-create it on every
pageload..
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/5818#comment:5>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list