示例#1
0
 /**
  * Return an array of all available Google Fonts.
  *
  * @return array    All Google Fonts.
  */
 public static function get_google_fonts()
 {
     if (null === self::$google_fonts || empty(self::$google_fonts)) {
         $fonts = (include wp_normalize_path(Kirki::$path . '/includes/webfonts.php'));
         $google_fonts = array();
         if (is_array($fonts)) {
             foreach ($fonts['items'] as $font) {
                 $google_fonts[$font['family']] = array('label' => $font['family'], 'variants' => $font['variants'], 'subsets' => $font['subsets'], 'category' => $font['category']);
             }
         }
         self::$google_fonts = apply_filters('kirki/fonts/google_fonts', $google_fonts);
     }
     return self::$google_fonts;
 }