FriendsOfFlarum / nightmode

🌙 Turn off the lights!
https://discuss.flarum.org/d/21492-friendsofflarum-night-mode
MIT License
33 stars 22 forks source link

Change MEDIAEMBED_THEME rendering parameter #68

Open clarkwinkelmann opened 1 year ago

clarkwinkelmann commented 1 year ago

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

Required changes: