_name; } /* (non-PHPdoc) * @see Ai1ec_File_Abstract::process_file() */ public function process_file() { // 1. Look for a CSS file in the directory of the current theme. // 2. Look for a LESS version in the directory of the current theme. // 3. Look for a LESS file into the default theme folder. $name = $this->_name; $css_file = $name . '.css'; $less_file = $name . '.less'; $files_to_check = array(); foreach ( $this->_paths as $path ) { $files_to_check[] = $path . self::THEME_LESS_FOLDER . DIRECTORY_SEPARATOR . $less_file; $files_to_check[] = $path . self::THEME_CSS_FOLDER . DIRECTORY_SEPARATOR . $css_file; if ( '..' . DIRECTORY_SEPARATOR . 'style' === $name ) { $files_to_check[] = $path . self::THEME_LESS_FOLDER . DIRECTORY_SEPARATOR . $css_file; } } foreach ( $files_to_check as $file_to_check ) { if ( file_exists( $file_to_check ) ) { $this->_content = file_get_contents( $file_to_check ); $this->_name = $file_to_check; return true; } } return false; } }