function typography(){ foreach (get_option_array() as $mid){ foreach($mid as $oid => $o){ if($o['type'] == 'typography'){ $type_foundry = new PageLinesFoundry; $type = pagelines_option($oid); $font_id = $type['font']; // Don't render if font isn't set. if(isset($font_id) && isset($type_foundry->foundry[$font_id]) ){ if($type_foundry->foundry[$font_id]['google']) $google_fonts[] = $font_id; $type_selectors = $o['selectors']; if( isset($type['selectors']) && !empty($type['selectors']) ) $type_selectors .= ',' . trim(trim($type['selectors']), ","); $type_css = $type_foundry->get_type_css($type); $type_css_keys[] = $type_selectors . "{".$type_css."}".$this->nl; } } } } if(isset($google_fonts) && is_array($google_fonts )){ if( $this->comments ) $this->css .= '/* Import Google Fonts --------------- */'.$this->nl2; $this->css .= $type_foundry->google_import($google_fonts) . $this->nl; } if( $this->comments ) $this->css .= '/* Set Type --------------- */'.$this->nl2; // Render the font CSS if(isset($type_css_keys) && is_array($type_css_keys)){ foreach($type_css_keys as $typeface){ $this->css .= $typeface .$this->nl; } } }