function _google_fonts_family_pathname in Google Fonts 7
Same name and namespace in other branches
- 6.2 google_fonts.module \_google_fonts_family_pathname()
- 7.2 google_fonts.module \_google_fonts_family_pathname()
2 calls to _google_fonts_family_pathname()
- google_fonts_admin_settings_form in ./
google_fonts.admin.inc - Implements hook_admin_settings() for configuring the module
- google_fonts_init in ./
google_fonts.module - Implements hook_init().
File
- ./
google_fonts.module, line 133 - This module enables Google Fonts on your website.
Code
function _google_fonts_family_pathname($family, $variants = NULL, $subset = NULL) {
$string = str_replace(' ', '+', $family);
if ($variants) {
if (sizeof($variants) == 1 && isset($variants['regular'])) {
unset($variants['regular']);
}
if ($variants) {
$string .= ':' . implode(',', $variants);
}
}
// for latin, we don't need to declare a subset.
if ($subset && $subset != 'latin') {
$string .= '&subset=' . $subset;
}
return $string;
}