Giter Club home page Giter Club logo

Comments (8)

thom4parisot avatar thom4parisot commented on July 30, 2024

Is WP-LESS installed as a plugin or bundled in your theme?

from wp-less.

reitermarkus avatar reitermarkus commented on July 30, 2024

I have included it in a theme, but the strange thing is, I had the exact same theme running on a multisite install and the deep recompile worked.

from wp-less.

thom4parisot avatar thom4parisot commented on July 30, 2024

Hm, strange. Have you noticed errors? Is any file compiled in wp-content/wp-less/*?

If you bundle the plugin in your theme, prefer including bootstrap-for-theme.php. The install() thing is not going to work because it's tricky to detect whenever a theme is activated or deactivated (can't do both inside the same theme).

from wp-less.

thom4parisot avatar thom4parisot commented on July 30, 2024

Hi,

I've tried to reproduce the problem but it works properly.
Maybe do you have an active cache plugin on the blog where the problem happens?

from wp-less.

reitermarkus avatar reitermarkus commented on July 30, 2024

I haven't noticed any errors, the compile is working correctly, but only if the main stylesheet is changed, not if imported files are changed.

I did include it using bootstrap-for-theme.php and the file is created in the uploads/wp-less/* folder.

from wp-less.

reitermarkus avatar reitermarkus commented on July 30, 2024

I am using the following now, but it still isn't working:

function less_fallback(){
  if (!class_exists('WPLessPlugin')){
    require(dirname(__FILE__).'/lib/php/wp/less/bootstrap-for-theme.php');
    WPLessPlugin::getInstance()->dispatch();
  }
} add_action('plugins_loaded', 'less_fallback');

Edit: When using this it is absolutely not working. It doesn't even compile. Seems as if the plugins_loaded action does not work. When using init instead, it works.

from wp-less.

thom4parisot avatar thom4parisot commented on July 30, 2024

Hi,

there was a problem with WPLessPlugin::getInstance(), fixed in #27. Tell me if it changed something.
This has been released in 1.5.2 right now.

from wp-less.

reitermarkus avatar reitermarkus commented on July 30, 2024

Thanks for informing me, unfortunately I can't check it anymore.

from wp-less.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.