-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix cache refresh when switching themes #43
Comments
So this is what I'm running into. +1000 |
Maybe the easiest way to not touch upstream code here is to filter get_cache_dir() to make stuff like "wp-less-" . basename( get_stylesheet_directory() ). Going to try this now. |
@lkraav Hi Leo - sorry I'm just catching up with this. I should be able to invalidate the caches on the switch theme hook so that might work. Alternatively I could use a theme specific & site specific sub directory to add multisite support. Thanks for the ideas :) |
Hi, I'm currently running into a similar issue and I'm looking for a way to run a callback function which would invalidate the CSS cache. The context I'm working with is a Theme which is customizable from the WP Admin - so the user can change the background color for instance. After they save that new background color in the admin, it's using PHP to inject the variable with the 'less_vars' hook, but the cache isn't being updated until I make some edits to the LESS files. Is there a simple callback I can run which invalidates the cache? |
Hopefully fixed by #73 |
Using the code included in two different themes, switching between themes doesn't update the cache so the newly selected theme still displays using the old stylesheet.
The text was updated successfully, but these errors were encountered: