ERROR: Missing font family: $font. The requested font family is not available.

"; } else { $errormessage = "

ERROR: Something has gone wrong with your font request. Google returned an error.

"; } } else { $font = urldecode($font); if($fontdata) { //get current font count $fontcount = substr_count($fontdata, ",") +1; if(isset($_POST["remove"])) { //remove font to the list if($fontcount > 1 && $_POST["remove"] != "all"){ $fonts = explode(",", $fontdata); while(($i = array_search($font, $fonts)) !== false) { unset($fonts[$i]); } $fontdata = implode(",", $fonts); update_option("wp_googlefontmgr_fonts", $fontdata); delete_option('wp_googlefontmgr_styleopts'); } else { delete_option("wp_googlefontmgr_fonts"); } } else { //add to font list $fontlist = explode(',',$fontdata); if (!in_array($font, $fontlist)) { $fontdata .= ",$font"; update_option("wp_googlefontmgr_fonts", $fontdata); } else { $errormessage = "

ERROR: $font is already in your font list!

"; } } } else { if($font != "none"){ update_option("wp_googlefontmgr_fonts", $font); } } } $fontdata = get_option("wp_googlefontmgr_fonts"); ?>