/** * make sure the value returned is in the fonts array * * @param type $id * @return type */ function styleguide_sanitize_fonts($id) { $_fonts = styleguide_fonts(); if (isset($_fonts[$id])) { return $id; } return ''; }
/** * return the available fonts * * @return type */ function get_fonts() { $_fonts = styleguide_fonts(); $fonts = array('' => array('name' => __('Default', 'styleguide'), 'family' => '')); foreach ($_fonts as $key => $font) { $fonts[$key] = $font; } return $fonts; }