From 9ecb915a02475a757f77c9db19296e8b926b782e Mon Sep 17 00:00:00 2001
From: Kyle Taylor <kyletaylored@gmail.com>
Date: Sun, 21 Jan 2018 00:41:30 -0600
Subject: [PATCH] HTTPS path update

---
 modules/google_fonts_api/google_fonts_api.module | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/modules/google_fonts_api/google_fonts_api.module b/modules/google_fonts_api/google_fonts_api.module
index 8a34580..ba25d80 100644
--- a/modules/google_fonts_api/google_fonts_api.module
+++ b/modules/google_fonts_api/google_fonts_api.module
@@ -7,8 +7,8 @@ function google_fonts_api_fontyourface_info() {
 
   $info = array(
     'name' => 'Google',
-    'url' => 'http://code.google.com/webfonts',
-    'base_path' => 'http://www.google.com/webfonts/family?family=',
+    'url' => 'https://fonts.google.com',
+    'base_path' => 'https://www.google.com/webfonts/family?family=',
   );
 
   return $info;
@@ -110,11 +110,7 @@ function google_fonts_api_preprocess_html(&$vars) {
       } // if
       else {
 
-        $base = 'http://fonts.googleapis.com/css?family=';
-
-        if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
-          $base = 'https://fonts.googleapis.com/css?family=';
-        } // if
+        $base = 'https://fonts.googleapis.com/css?family=';
 
         $url = $base . implode('|', $families) . '&subset=' . implode(',', $all_subsets);
 
@@ -246,7 +242,7 @@ function _google_fonts_api_convert_api_results($json_font_list) {
         
         $fonts[$font_id] = new stdClass;
         $fonts[$font_id]->name = $font_id;
-        $fonts[$font_id]->url = 'http://www.google.com/webfonts/family?family=' . $json_font->family . '&subset=' . $json_font_subset . '#' . $json_font_variant;
+        $fonts[$font_id]->url = 'https://www.google.com/webfonts/family?family=' . $json_font->family . '&subset=' . $json_font_subset . '#' . $json_font_variant;
         $fonts[$font_id]->provider = 'google_fonts_api';
         $fonts[$font_id]->css_family = $json_font->family;
         $fonts[$font_id]->css_style = $css_style;
-- 
2.14.3 (Apple Git-98)

