WordPress.org

Ready to get started?Download WordPress

Forums

WP-LESS
Feature Request: Allow disabling the chache during development (8 posts)

  1. timarthurlee
    Member
    Posted 3 years ago #

    Can you please add a filter hook to the "processStylesheet" function located in the Plugin.class.php file. I would suggest something like this:
    $force = apply_filter('wp-less_process_stylesheet_force', $force);

    Thanks,

    Tim

    http://wordpress.org/extend/plugins/wp-less/

  2. timarthurlee
    Member
    Posted 3 years ago #

    This would allow disabling the cache during development where you make frequent changes and curtain changes that do not trigger a cache reset.

  3. timarthurlee
    Member
    Posted 3 years ago #

    sorry, that's apply_filters not apply_filter.

  4. oncletom
    Member
    Plugin Author

    Posted 2 years ago #

    Well, each time you change a less file it is recompiled.

    At least, we could detect that through the WP_DEV constant.

  5. timarthurlee
    Member
    Posted 2 years ago #

    The issue I find is that if all you're changing is the value of variables, it doesn't detect the change. For ex.
    if you change from this:
    "
    @test: 5em;
    .test {
    line-height:@test;
    }
    "
    to
    "
    @test: 10em;
    .test {
    line-height:@test;
    }
    "
    it doesn't seem to detect it. Also I don't think it detects changes to files that are included.
    That's the reason I suggested this capability (and implemented it on my installation). Thanks for any input you jave on this, And thanks again for the plugin.

  6. oncletom
    Member
    Plugin Author

    Posted 2 years ago #

    Do this occurs on imported stylesheets (via @import) or on WP registered stylesheets?

  7. Tom Schimana
    Member
    Posted 2 years ago #

    I need a a filter hook to force function, too.
    If I use addVariable (Example: Theme Options within WordPress Backend) the cache is not automatically renewable. I must change something in style.less first. PHP custom variables make no sense, since if style.less must always be touched.

  8. oncletom
    Member
    Plugin Author

    Posted 2 years ago #

    Ok, I'll add something to deal with variables, and eventually an automatic rebuild when WP_DEBUG is set to true.

    In 1.4.2, the plugin detects variable changes and recompile if needed.

    Thanks for you feedback!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags