Font Squirrel api
-
Has anyone used the font squirrel api? I have a json callback downloading a font file from font squirrel and i have WordPress creating a folder in a sub directory for the file. But the folder that is created has some arbitrary name and the folder is empty. Has anyone done this before?
function kdr_awesome_fonts_font_family_choice(){ $font_family_input = get_option( 'font_family_choice', $default = false ); ?> <select name="font_family_choice"> <?php $fonts = kdr_awesome_fonts_fontfamily_jsoncall(); $i=0; //if the json request works render a select box for the list of the family names foreach($fonts as $key => $value){ echo "<option value='".$i."' ". selected($i, $font_family_input).">".$fonts[$key]->family_name."</option>"; $i++; } ?> </select> <?php $font_position = kdr_postion($font_family_input); $font_position_placement = wp_remote_request('https://www.fontsquirrel.com/fontfacekit/'.$font_position -> family_urlname.''); <p>} <?php $upload_dir = wp_upload_dir('web-fonts/'.$font_position_placement); }
- The topic ‘Font Squirrel api’ is closed to new replies.