Commits

Doug Stewart committed 2e42038

Switching from old-n-busted CSS detection to New LESS Hotness detection.

Comments (0)

Files changed (1)

includes/parent-options.php

  * @since		Elbee-Elgee 1.0
  */
 
+// Look for layout LESS files to auto-load
+$less_layout_path = TEMPLATEPATH . '/layouts/less/';
+$less_layouts = array();
+
+if ( is_dir($less_layout_path) ) {
+	if ($less_layout_dir = opendir($less_layout_path) ) { 
+		while ( ($less_layout_file = readdir($less_layout_dir)) !== false ) {
+			if(stristr($less_layout_file, ".less") !== false) {
+				$less_layouts[] = $less_layout_file;
+			}
+		}	
+	}
+}	
+
 // Look for layout CSS files to auto-load
 $layout_path = TEMPLATEPATH . '/layouts/css/'; 
 $layouts = array();
 						"desc" => sprintf( __( 'Place additional layout stylesheets in %s to add them as layout options', 'lblg' ), '<code>' . TEMPLATEPATH . '/layouts/</code>' ),
 			    		"std" => "Select a layout:",
 			    		"type" => "select",
-			    		"options" => $layouts),
+			    		// "options" => $layouts),
+			    		"options" => $less_layouts),
 
 				"alt_stylesheet" => array(	"name" => __('Theme Stylesheet', 'lblg' ),
 						"desc" => __('Place additional theme stylesheets and assets in ', 'lblg' ) . '<code>' . TEMPLATEPATH . "/styles/</code> " . __('to add them as styling options', 'lblg' ),