compile .less files into css without enqueueing?? (3 posts)

  1. saas
    Posted 3 years ago #

    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');



  2. oncletom
    Plugin Author

    Posted 3 years ago #

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

  3. saas
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic