You are here

function wysiwyg_get_css in Wysiwyg 5.2

Same name and namespace in other branches
  1. 5 wysiwyg.module \wysiwyg_get_css()
  2. 6.2 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.

6 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_openwysiwyg_settings in editors/openwysiwyg.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.

... See full list

File

./wysiwyg.module, line 546
Integrate 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();
  foreach (drupal_add_css() as $media => $css) {
    if ($media != 'print') {
      foreach ($css['theme'] as $filepath => $preprocess) {
        if (file_exists($filepath)) {
          $files[] = base_path() . $filepath;
        }
      }
    }
  }
  return $files;
}