{ "kind": "webfonts#webfont", "family": "Yesteryear", "variants": [ "regular" ], "subsets": [ "latin" ] }, { "kind": "webfonts#webfont", "family": "Zeyada", "variants": [ "regular" ], "subsets": [ "latin" ] } ]'; function ewf_ui_fonts_getFamilies() { global $_ewf_google_fonts, $_ewf_google_fonts_families; $fonts_array = json_decode($_ewf_google_fonts); foreach ($fonts_array as $obj => $font) { $_ewf_google_fonts_families[$font->family] = $font->family; } } ewf_ui_fonts_getFamilies();
"variants": [ "regular" ], "subsets": [ "latin" ] }, { "kind": "webfonts#webfont", "family": "Zeyada", "variants": [ "regular" ], "subsets": [ "latin" ] } ]'; function ewf_ui_fonts_getFamilies($_ewf_google_fonts) { global $_ewf_google_fonts_families; $fonts_array = json_decode($_ewf_google_fonts); // echo '<pre>Test'; // print_r($fonts_array); // echo '</pre>'; foreach ($fonts_array as $obj => $font) { $_ewf_google_fonts_families[$font->family] = $font->family; } } ewf_ui_fonts_getFamilies($_ewf_google_fonts);