Title: Plugin changes theme folder styles version in frontend
Last modified: September 12, 2024

---

# Plugin changes theme folder styles version in frontend

 *  Resolved [Ov3rfly](https://wordpress.org/support/users/ov3rfly/)
 * (@ov3rfly)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/plugin-changes-theme-folder-styles-version-in-frontend/)
 * At every use of cache clear this code runs and stores an option value for `theme`
   key.
 *     ```wp-block-code
       $time = time();update_option( '_ccfm_style_timestamp_theme', $time );
       ```
   
 * In `wp_head` two filters are set up:
 *     ```wp-block-code
       add_filter( 'style_loader_src', 'ccfm_show_src_version', 10, 2 );add_filter( 'script_loader_src', 'ccfm_show_src_version', 10, 2 );
       ```
   
 * The filter uses above `theme` key and changes the `ver` parameter in theme file
   urls to the timestamp of last cache clear time.
 *     ```wp-block-code
       function ccfm_show_src_version ( $src, $handle ) {    $key = ccfm_custom_src_key( $src );    $timestamp = get_option( '_ccfm_style_timestamp_' . $key, '' );    ...        $query['ver'] = $timestamp;        return add_query_arg( $query, $src_parts[0] );    ...}
       ```
   
 * This happens no matter what and can not be switched off.
 * Would expect the plugin to not change theme scripts/styles version in frontend
   output.
 * Clear Cache for Me 2.2, WordPress 6.6.2
 * PS. Please also update “tested up to” WordPress version.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [webheadcoder](https://wordpress.org/support/users/webheadllc/)
 * (@webheadllc)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/plugin-changes-theme-folder-styles-version-in-frontend/#post-18011289)
 * Thanks for your feedback. Just curious, is this conflicting with another plugin
   or some custom code you have?
 * I can imagine common situations where you wouldn’t want to serve a new version
   of the theme’s scripts and styles. I’ll be adding an option like below.
 * **Force browser to fetch new version of theme’s CSS and JS files:**
    - Always, every time clear-cache-for-me runs
    - Only when the Clear Cache For Me button is clicked
    - Never
 * and thanks for the heads up on the “tested up to”.
 *  Thread Starter [Ov3rfly](https://wordpress.org/support/users/ov3rfly/)
 * (@ov3rfly)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/plugin-changes-theme-folder-styles-version-in-frontend/#post-18011311)
 * Thanks for quick feedback.
 * This is e.g. conflicting with analyzing, debugging, fixing version numbers in
   themes and also with custom caching mechanisms. It also affects files which were
   not changed at all and causes unnecessary reload from browsers.
 * A plugin should never change frontend output without notice and without option
   to disable that (and _disabled_ should be default option).
 * Forcing browser to fetch new version actually should only be done by the cache/
   minify plugins, not by a plugin which is only there to trigger cache clearing
   mechanisms of other plugins.
 * Took me quite a while to find the reason in your plugin, never would have thought
   it would change frontend content.
 *  Plugin Author [webheadcoder](https://wordpress.org/support/users/webheadllc/)
 * (@webheadllc)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/plugin-changes-theme-folder-styles-version-in-frontend/#post-18011566)
 * To limit the functionality of this plugin to what it “should” and “shouldn’t 
   do” would mean this plugin shouldn’t exist at all. This plugin is all about clearing
   cache in general. I can see how the description doesn’t explicitly say the front
   end versions will be changed, but it does mention it will force the browser to
   get a new version of the theme’s JS and CSS.
 * I totally understand the need for this to be optional so I’ll add the option 
   in the settings. The default will most likely be the 2nd option though as it 
   has been in the plugin for several years now. I’ll let you know when it’s available
   so you can disable it.
 * Thank you for your support and feedback through all these years [@ov3rfly](https://wordpress.org/support/users/ov3rfly/).
   I appreciate it.
 *  Plugin Author [webheadcoder](https://wordpress.org/support/users/webheadllc/)
 * (@webheadllc)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/plugin-changes-theme-folder-styles-version-in-frontend/#post-18042898)
 * [@ov3rfly](https://wordpress.org/support/users/ov3rfly/) the option to disable
   changing the theme’s CSS and JS urls is in. The default is set to only adjust
   the urls when the button is clicked, but you can disable it.
 *  Thread Starter [Ov3rfly](https://wordpress.org/support/users/ov3rfly/)
 * (@ov3rfly)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/plugin-changes-theme-folder-styles-version-in-frontend/#post-18048810)
 * Thanks for the update, Clear Cache for Me 2.3 fixes the issue.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Plugin changes theme folder styles version in frontend’ is closed to 
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/clear-cache-for-widgets.svg)
 * [Clear Cache for Me](https://wordpress.org/plugins/clear-cache-for-widgets/)
 * [Support Threads](https://wordpress.org/support/plugin/clear-cache-for-widgets/)
 * [Active Topics](https://wordpress.org/support/plugin/clear-cache-for-widgets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/clear-cache-for-widgets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/clear-cache-for-widgets/reviews/)

## Tags

 * [frontend](https://wordpress.org/support/topic-tag/frontend/)
 * [script](https://wordpress.org/support/topic-tag/script/)
 * [style](https://wordpress.org/support/topic-tag/style/)
 * [version](https://wordpress.org/support/topic-tag/version/)

 * 5 replies
 * 2 participants
 * Last reply from: [Ov3rfly](https://wordpress.org/support/users/ov3rfly/)
 * Last activity: [1 year, 6 months ago](https://wordpress.org/support/topic/plugin-changes-theme-folder-styles-version-in-frontend/#post-18048810)
 * Status: resolved