function _google_fonts_format_variants in Google Fonts 7
Same name and namespace in other branches
- 6.2 google_fonts.admin.inc \_google_fonts_format_variants()
- 7.2 google_fonts.admin.inc \_google_fonts_format_variants()
Return an array with formatted variants (eg: change bolditalic into Bold/Italic)
2 calls to _google_fonts_format_variants()
- google_fonts_admin_settings_form in ./
google_fonts.admin.inc - Implements hook_admin_settings() for configuring the module
- _google_fonts_admin_font_example in ./
google_fonts.admin.inc - Returns the font family name, including a span with added styling
File
- ./
google_fonts.admin.inc, line 286 - Administrative page callbacks for the Google Fonts module.
Code
function _google_fonts_format_variants($variants) {
foreach ($variants as $key => $variant) {
switch ($variant) {
case 'bolditalic':
$variants[$key] = 'Bold/Italic';
break;
default:
$variants[$key] = ucfirst(check_plain($variant));
}
}
return $variants;
}