function fontyourface_add_css_in_preprocess in @font-your-face 6
Same name and namespace in other branches
- 6.2 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 preprocess
4 calls to fontyourface_add_css_in_preprocess()
- 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().
- kernest_preprocess_page in modules/
kernest/ kernest.module - Implements template_preprocess_page().
File
- ./
fontyourface.module, line 659
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
}