PHP code example of ed-itsolutions / wp_enqueue_less
1. Go to this page and download the library: Download ed-itsolutions/wp_enqueue_less library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ed-itsolutions / wp_enqueue_less example snippets
add_action('wp_enqueue_scripts', function(){
wp_enqueue_style('theme-stylesheet', get_stylesheet_uri());
wp_enqueue_less('theme-main', get_template_directory() . '/less/main.less', array(
'main-color' => '#99bbff' // becomes @main-color in your less stylesheet.
));
});