Пример #1
0
 /**
  * Create font families array
  *
  * @since 1.0.0
  * @param string $return array to return websafe|google-fonts
  * @return array
  */
 static function fonts($return = 'websafe')
 {
     if ($return == 'websafe') {
         if (!function_exists('hoot_fonts_list')) {
             if (file_exists(trailingslashit(HOOTOPTIONS_DIR) . 'includes/fonts.php')) {
                 require_once trailingslashit(HOOTOPTIONS_DIR) . 'includes/fonts.php';
             } else {
                 return array();
             }
         }
         return hoot_fonts_list();
     }
     if ($return == 'google-fonts' || $return == 'google-font') {
         if (!function_exists('hoot_googlefonts_list')) {
             if (file_exists(trailingslashit(HOOTOPTIONS_DIR) . 'includes/fonts-google.php')) {
                 require_once trailingslashit(HOOTOPTIONS_DIR) . 'includes/fonts-google.php';
             } else {
                 return array();
             }
         }
         return hoot_googlefonts_list();
     }
 }
Пример #2
0
 /**
  * Create font families array
  *
  * @since 1.0.0
  * @param string $return array to return websafe|google-fonts
  * @return array
  */
 static function fonts($return = 'websafe')
 {
     if ($return == 'websafe') {
         if (function_exists('hoot_fonts_list')) {
             return hoot_fonts_list();
         } else {
             return array();
         }
     }
     if ($return == 'google-fonts' || $return == 'google-font') {
         if (function_exists('hoot_googlefonts_list')) {
             return hoot_googlefonts_list();
         } else {
             return apply_filters('hoot_google_fonts', array());
         }
     }
     return array();
 }