Selecting style.less or style.css

As I open an official child theme functions.php file I see this code:

<?php

// Include Beans. Do not remove the line below.
require_once( get_template_directory() . '/lib/init.php' );

/*
* Remove this action and callback function if you do not whish to use LESS to style your site or overwrite UIkit variables.
* If you are using LESS, make sure to enable development mode via the Admin->Appearance->Settings option. LESS will then be processed on the fly.
*/
add_action( 'beans_uikit_enqueue_scripts', 'beans_child_enqueue_uikit_assets' );

function beans_child_enqueue_uikit_assets() {

beans_compiler_add_fragment( 'uikit', get_stylesheet_directory_uri() . '/style.less', 'less' );

}

// Remove this action and callback function if you are not adding CSS in the style.css file.
add_action( 'wp_enqueue_scripts', 'beans_child_enqueue_assets' );

function beans_child_enqueue_assets() {

wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css' );

}

 

As I use CSS. I will then remove (or hide) the code that has to do with less. So that I end up having my functions.php files look like this:

<?php

// Include Beans. Do not remove the line below.
require_once( get_template_directory() . '/lib/init.php' );

/*
* Remove this action and callback function if you do not whish to use LESS to style your site or overwrite UIkit variables.
* If you are using LESS, make sure to enable development mode via the Admin->Appearance->Settings option. LESS will then be processed on the fly.
*/
/*
add_action( 'beans_uikit_enqueue_scripts', 'beans_child_enqueue_uikit_assets' );
function beans_child_enqueue_uikit_assets() {
beans_compiler_add_fragment( 'uikit', get_stylesheet_directory_uri() . '/style.less', 'less' );
}
*/

// Remove this action and callback function if you are not adding CSS in the style.css file.
add_action( 'wp_enqueue_scripts', 'beans_child_enqueue_assets' );
function beans_child_enqueue_assets() {
wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css' );
}


/* ------- My Custom Code ---- */

 

I will then add my custom code.

 

No comment yet, add your voice below!


Add a Comment

Your email address will not be published. Required fields are marked *

Comment *
Name *
Email *
Website