beans_compile_less_fragments

Compile LESS fragments, convert to CSS and enqueue compiled file.

This function should be used in a similar fashion to wp_enqueue_script().

Fragments can be added to the compiler using beans_compiler_add_fragment().

beans_compile_less_fragments( $id, $fragments, $args = array() )

Source

function beans_compile_less_fragments( $id, $fragments, $args = array() ) {

	if ( empty( $fragments ) ) {
		return false;
	}

	$params = array(
		'id'        => $id,
		'type'      => 'style',
		'format'    => 'less',
		'fragments' => (array) $fragments,
	);

	new _Beans_Compiler( $params + $args );

}