function fontyourface_add_css_in_preprocess in @font-your-face 6.2
Same name and namespace in other branches
- 6 fontyourface.module \fontyourface_add_css_in_preprocess()
- 7.2 fontyourface.module \fontyourface_add_css_in_preprocess()
- 7 fontyourface.module \fontyourface_add_css_in_preprocess()
Adds a stylesheet in preproce
5 calls to fontyourface_add_css_in_preprocess()
- fontdeck_preprocess_page in modules/
fontdeck/ fontdeck.module - Implements template_preprocess_page().
- fontsquirrel_preprocess_page in modules/
fontsquirrel/ fontsquirrel.module - Implements template_preprocess_page().
- fontyourface_preprocess_page in ./
fontyourface.module - Implements template_preprocess_page().
- google_fonts_api_preprocess_page in modules/
google_fonts_api/ google_fonts_api.module - Implements template_preprocess_page().
- local_fonts_preprocess_page in modules/
local_fonts/ local_fonts.module - Implements template_preprocess_page().
File
- ./
fontyourface.module, line 747
Code
function fontyourface_add_css_in_preprocess(&$vars, $css_path, $remote = FALSE) {
if ($remote) {
$link = '<link href="' . $css_path . '" rel="stylesheet" type="text/css" />';
drupal_set_html_head($link);
$vars['head'] = drupal_get_html_head();
}
else {
drupal_add_css($css_path, 'module');
$vars['css']['all']['module'][$css_path] = TRUE;
$vars['styles'] = drupal_get_css();
}
// else
}