Exemple #1
0
/**
 * Sanitize font character sets
 *
 * @param string $set
 * @return string
 */
function styleguide_sanitize_character_set($set = '')
{
    $sets = styleguide_get_character_sets();
    if (!array_key_exists($set, $sets)) {
        $set = '';
    }
    return $set;
}
 /**
  * Get the character set for the current website
  * Defaults to latin,latin-ext
  *
  * @return type
  */
 function character_set()
 {
     $set = 'latin';
     $sets = styleguide_get_character_sets();
     $saved_set = styleguide_sanitize_character_set(get_option('styleguide_character_set', ''));
     if (!empty($saved_set)) {
         $set = $saved_set;
     }
     return $sets[$set]['sets'];
 }