jetpack_less_css_preprocess

The Jetpack by WordPress.com jetpack less css preprocess function.

Description

jetpack_less_css_preprocess( $less ); 

Parameters (1)

0. $less
The less.

Usage

  1. if ( !function_exists( 'jetpack_less_css_preprocess' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/custom-css/custom-css/preprocessors.php'; 
  3.  
  4. // The less. 
  5. $less = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = jetpack_less_css_preprocess($less); 
  9.  

Defined (1)

The function is defined in the following location(s).

/modules/custom-css/custom-css/preprocessors.php  
  1. function jetpack_less_css_preprocess( $less ) { 
  2. require_once( dirname( __FILE__ ) . '/preprocessors/lessc.inc.php' ); 
  3.  
  4. $compiler = new lessc(); 
  5.  
  6. try { 
  7. return $compiler->compile( $less ); 
  8. } catch ( Exception $e ) { 
  9. return $less;