Cache Busting Theme CSS (if used)
-
Hello! Love the plugin, thanks!
Not sure if this is an option in the pro version, but in the free version, we would appreciate being able to have the theme’s version # applied/appended to the theme’s CSS, if used for the Print page – e.g. checked “Use Theme CSS For Print Page” feature. That way, we can get cache busting of that CSS file whenever the theme is updated. Some aggressively cached sites won’t otherwise pickup that latest theme CSS, as we have encountered.
NB: Only
style.css
is utilized with the “Use Theme CSS For Print Page” feature.Here’s one way that might be achieved:
Using current Print-O-Matic plugin v1.7.12, in file
print-o-matic.php
, change line 183 from:
$pom_site_css = get_stylesheet_uri();
to:
$pom_site_css = get_stylesheet_uri() . '?ver=' . wp_get_theme()->get( 'Version' );
- The topic ‘Cache Busting Theme CSS (if used)’ is closed to new replies.