You are here

function fontyourface_wysiwyg_preprocess_page in @font-your-face 7.2

Implements template_preprocess_page().

File

modules/fontyourface_wysiwyg/fontyourface_wysiwyg.module, line 7

Code

function fontyourface_wysiwyg_preprocess_page(&$vars) {
  $fonts = fontyourface_get_fonts();
  $css = fontyourface_wysiwyg_generate_css($fonts);
  $css_md5 = md5($css);
  if ($css_md5 != variable_get('fontyourface_wysiwyg_css_md5', '')) {
    fontyourface_wysiwyg_rewrite_css($css);
    variable_set('fontyourface_wysiwyg_css_md5', $css_md5);
  }

  // if
  if ($css != '') {
    fontyourface_add_css_in_preprocess($vars, 'fontyourface/wysiwyg.css');
  }

  // if
}