You are here

function fontdeck_preprocess_html in @font-your-face 7.2

Implements template_preprocess_html().

File

modules/fontdeck/fontdeck.module, line 179

Code

function fontdeck_preprocess_html(&$vars) {
  $project = variable_get('fontdeck_project', '');
  $domain = fontdeck_get_domain();
  if (!empty($vars['fontyourface']) && $project != '') {
    $enabled_fonts = FALSE;
    foreach ($vars['fontyourface'] as $used_font) {
      if ($used_font->provider == 'fontdeck') {
        $enabled_fonts = TRUE;
      }

      // if
    }

    // foreach
    if ($enabled_fonts) {
      $fontdeck_css = variable_get('fontdeck_css', array());
      if (isset($fontdeck_css[$project][$domain])) {
        fontyourface_add_css_in_preprocess($vars, $fontdeck_css[$project][$domain], 'remote');
      }

      // if
    }

    // if
  }

  // if
}