array(), ); foreach ($stylesheets as $stylesheet) { $styles['#items'][$stylesheet] = array( // Paths are expected to be relative to DRUPAL_ROOT. 'data' => trim($stylesheet, '/'), ); } $styles = _less_pre_render($styles); $processed_stylesheets = array(); foreach ($styles['#items'] as $file) { $processed_stylesheets[] = file_create_url($file['data']); } switch ($wysiwyg) { case 'tinymce': $settings['content_css'] = implode(',', $processed_stylesheets); break; case 'fckeditor': $settings['EditorAreaCSS'] = implode(',', $processed_stylesheets); break; case 'ckeditor': $settings['contentsCss'] = $processed_stylesheets; break; } } } function less_form_wysiwyg_profile_form_alter(&$form, $form_state, $form_id) { $form['css']['css_path']['#description'] .= '
' . t('You may enter a path to a LESS file and it will be parsed automatically.'); }