Support » Plugin: WP-LESS » compile .less files into css without enqueueing??

  • Hi,
    I was wondering if I could do something like this:

    foreach($my_less_files as $less_file){

    without first enqueueing it??? or with wp_register_sytle only (no enqueue)???

    as opossed to this
    wp_enqueue_style('my_css', 'path/to/my/style.css');
    * $WPLessPlugin->processStylesheet('my_css');


Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author oncletom


    Why would you like not to enqueuing?
    It’s the recommended way of including CSS files into any template files.

    I am not using it on live site, I needed it for my development environment only, that’s why I didn’t want to enqueue it (as I have several skins compiled at same time, so in case of enqueue, they all will get loaded :(), so I wanted to play with register and then compile only registered files (filtered, only less files), and I was able to do it by forking your code and making it work for my development purposes only and its working fine so far (not ideal, but working ;))

    So my suggestion is, you should allow some helper functions etc, so if user want to register some less files himself (via filter hooks or similar), and then your plugin should accept those less files and compile as per user requirement (just an idea, not necessarily everybody will be needing it).

    Keep up the good work.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘compile .less files into css without enqueueing??’ is closed to new replies.