• It seems like maybe your plugin is now caching child style sheets and adding version numbers. Is this true?

    Then when I update the child theme you completely mess up my formatting of my stylesheet. We all have our own style for coding……and you messed the whole thing up?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author lilaeamedia

    (@lilaeamedia)

    CTC does not use a cache. It does however set the version number based on the version of the theme. You can change this manually during the configuration step.

    Thread Starter sgumby

    (@sgumby)

    Why would it mess up the code format?

    Thread Starter sgumby

    (@sgumby)

    At first glance this bug appears to be messing up enqueued style sheets for plugins as well. If you run in to this problem you need to add your version (browser cache busting) string directly to the file name.

    If anyone else is running in to this problems here’s what I had to do to get around this.

    
    wp_enqueue_style( 'my-style-sheet_css', PLUGIN_URL . '/css/my-style-sheet.css?child-theme-configurator-breaks-versioning=PLUGIN_VERSION' . '.' . time(), array(), <false or blank because child-theme-configurator-breaks > );
    

    I like this plugin so I hope you guys will fix this.

    Thread Starter sgumby

    (@sgumby)

    This solution also works.

    add_filter( 'style_loader_src', 'fix_child_theme_version', 10, 2 );
    
    function fix_child_theme_version( $src, $handle ) {
        // only filter links for current theme
        if ( is_child_theme() && strstr( $src, get_stylesheet() . "/style.css" ) && ( $ver = time() ) )
            $src = preg_replace( "/ver=(.*?)(\&|$)/", 'ver=' . $ver . "$2", $src );
        return $src;
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Stylesheet Cache and Messed Up’ is closed to new replies.