This is more of a proof of concept because it's not really doing things the way we expect.
We should update the MEDIAEMBED_THEME rendering parameter based on the selected theme. Unfortunately I'm not sure we can change this value per-request in Flarum since the Formatter::configure extender only runs after a cache clear. There's also no way to access the actor or cookies from that extender so it would require additional code.
This PR is a working solution to always apply the default theme value as the MediaEmbed theme.
Confirmed
[x] Frontend changes: tested on a local Flarum installation.
[ ] Backend changes: tests are green (run composer test).
This is more of a proof of concept because it's not really doing things the way we expect.
We should update the
MEDIAEMBED_THEME
rendering parameter based on the selected theme. Unfortunately I'm not sure we can change this value per-request in Flarum since theFormatter::configure
extender only runs after a cache clear. There's also no way to access the actor or cookies from that extender so it would require additional code.This PR is a working solution to always apply the default theme value as the MediaEmbed theme.
Confirmed
composer test
).Required changes: