/** * Format Choices Array From Fonts Group */ function tamatebako_fonts_format_choices($font_groups) { /* Output */ $output = array(); /* For each group, add it in array. */ foreach ($font_groups as $font_group) { /* Add websafe font */ if ('websafe' == $font_group) { $fonts = tamatebako_fonts_websafe(); foreach ($fonts as $font_name => $font_data) { $output[$font_name] = $font_data['name']; } } elseif ('heading' == $font_group) { $fonts = tamatebako_fonts_heading(); foreach ($fonts as $font_name => $font_data) { $output[$font_name] = $font_data['name']; } } elseif ('base' == $font_group) { $fonts = tamatebako_fonts_base(); foreach ($fonts as $font_name => $font_data) { $output[$font_name] = $font_data['name']; } } } return $output; }
/** * MErge All Google Fonts */ function tamatebako_fonts_google() { $fonts = array_merge(tamatebako_fonts_heading(), tamatebako_fonts_base()); return apply_filters('tamatebako_fonts_google', $fonts); }