function fontsquirrel_preprocess_page in @font-your-face 6
Same name and namespace in other branches
- 6.2 modules/fontsquirrel/fontsquirrel.module \fontsquirrel_preprocess_page()
- 7 modules/fontsquirrel/fontsquirrel.module \fontsquirrel_preprocess_page()
Implements template_preprocess_page().
File
- modules/
fontsquirrel/ fontsquirrel.module, line 151
Code
function fontsquirrel_preprocess_page(&$vars) {
if (!empty($vars['fontyourface']) && $_GET['q'] != 'admin/build/themes/fontyourface/add') {
$paths = array();
$fonts = fontsquirrel_list();
foreach ($vars['fontyourface'] as $used_font) {
if ($used_font->provider == 'fontsquirrel') {
$paths[] = $fonts[$used_font->group_name]['fonts'][$used_font->name]['path'];
}
// if
}
// foreach
if (count($paths) > 0) {
foreach ($paths as $path) {
fontyourface_add_css_in_preprocess($vars, file_directory_path() . '/fontyourface/fontsquirrel/' . $path . '-fontfacekit/stylesheet.css');
}
// foreach
}
// if
}
// if
}