by Agence Ecedi
* php 5.4.\* or Up (tested on PHP 5.5.17)
* Wordpress 4.01 or more (should work on older versions)
Go to github Agence Ecedi and download master or latest tag archive
ex: wp-less-compile.master.zip
And extract it to your wp-content/plugins folder and rename the folder less-compile
In your composer.json file add the following
{
"require": {
"ecedi/wp-less-compile": "dev-master",
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/ecedi/wp-less-compile"
}
]
}
then run
composer update
Just enable the plugin, it should do the work: - Find all enqueued .less files and compile them when needed - From Admin you can force compilation of active theme .less (beta)
To enqueue a .less file, do as usual for any styles
wp_enqueue_style('my-less', get_stylesheet_directory().'/styles.less', array(), 'v1.0');