You are here

function fontyourface_wysiwyg_rewrite_css in @font-your-face 7.2

Re-writes wysiwyg.css file.

1 call to fontyourface_wysiwyg_rewrite_css()
fontyourface_wysiwyg_preprocess_page in modules/fontyourface_wysiwyg/fontyourface_wysiwyg.module
Implements template_preprocess_page().

File

modules/fontyourface_wysiwyg/fontyourface_wysiwyg.module, line 59

Code

function fontyourface_wysiwyg_rewrite_css($css) {

  // Write CSS.
  $destination = file_stream_wrapper_uri_normalize('public://fontyourface/wysiwyg.css');
  $destination_directory = dirname($destination);
  if (file_prepare_directory($destination_directory, FILE_CREATE_DIRECTORY)) {
    file_unmanaged_save_data($css, $destination, FILE_EXISTS_REPLACE);
  }

  // if
}