You are here

function wysiwyg_get_css in Wysiwyg 6.2

Same name and namespace in other branches
  1. 5.2 wysiwyg.module \wysiwyg_get_css()
  2. 5 wysiwyg.module \wysiwyg_get_css()
  3. 6 wysiwyg.module \wysiwyg_get_css()
  4. 7.2 wysiwyg.module \wysiwyg_get_css()

Retrieve stylesheets for HTML/IFRAME-based editors.

This assumes that the content editing area only needs stylesheets defined for the scope 'theme'.

Return value

An array containing CSS files, including proper base path.

5 calls to wysiwyg_get_css()
wysiwyg_ckeditor_settings in editors/ckeditor.inc
Return runtime editor settings for a given wysiwyg profile.
wysiwyg_fckeditor_settings in editors/fckeditor.inc
Return runtime editor settings for a given wysiwyg profile.
wysiwyg_tinymce_settings in editors/tinymce.inc
Return runtime editor settings for a given wysiwyg profile.
wysiwyg_wymeditor_settings in editors/wymeditor.inc
Return runtime editor settings for a given wysiwyg profile.
wysiwyg_yui_settings in editors/yui.inc
Return runtime editor settings for a given wysiwyg profile.

File

./wysiwyg.module, line 681
Integrates client-side editors with Drupal.

Code

function wysiwyg_get_css() {
  static $files;
  if (isset($files)) {
    return $files;
  }

  // In node form previews, the theme has not been initialized yet.
  if (!empty($_POST)) {
    init_theme();
  }
  $files = array();
  $query = ($string = variable_get('css_js_query_string', NULL)) ? '?' . $string : '';
  foreach (drupal_add_css() as $media => $css) {
    if ($media != 'print') {
      foreach ($css['theme'] as $filepath => $preprocess) {
        if (file_exists($filepath)) {
          $files[] = base_path() . $filepath . $query;
        }
      }
    }
  }
  return $files;
}