From d5e50962efd3f0adfad5ed1e779117222deceb0f Mon Sep 17 00:00:00 2001
From: lucha <lucha@paranoici.org>
Date: Sun, 6 Jan 2013 20:52:20 +0100
Subject: [PATCH] Patched Constructor theme to remove Google Font API

---
 .../constructor/admin/settings/fonts.php      | 19 +++++++++----------
 wp-content/themes/constructor/css-editor.php  | 10 +++++-----
 wp-content/themes/constructor/css.php         |  6 +++---
 .../constructor/libs/Constructor/Admin.php    |  6 +++---
 4 files changed, 20 insertions(+), 21 deletions(-)

diff --git a/wp-content/themes/constructor/admin/settings/fonts.php b/wp-content/themes/constructor/admin/settings/fonts.php
index fafd3dafe..fde7c97e0 100644
--- a/wp-content/themes/constructor/admin/settings/fonts.php
+++ b/wp-content/themes/constructor/admin/settings/fonts.php
@@ -36,15 +36,15 @@ $(document).ready(function(){
 });
 
 })(jQuery);
-var loaded = new Array();
-function loadFont(font) {
-    if (loaded.indexOf(font) >= 0) return true;
-    loaded.push(font);
-    font = font.replace(/\"/gi, '');
-    font = font.replace(/ /gi, '+');
+/* var loaded = new Array(); */
+/* function loadFont(font) { */
+/*     if (loaded.indexOf(font) >= 0) return true; */
+/*     loaded.push(font); */
+/*     font = font.replace(/\"/gi, ''); */
+/*     font = font.replace(/ /gi, '+'); */
 
-    jQuery('head').append("<link href='http://fonts.googleapis.com/css?family="+font+"' rel='stylesheet' type='text/css'>");
-}
+/*     jQuery('head').append("<link href='http://fonts.googleapis.com/css?family="+font+"' rel='stylesheet' type='text/css'>"); */
+/* } */
 /* ]]> */
 </script>
 <table class="form-table">
@@ -76,8 +76,7 @@ function loadFont(font) {
             </p>
         </td>
         <td rowspan="5" valign="top" class="updated quick-links" width="320px">
-            <h3><?php _e('Google Web Fonts', 'constructor') ?></h3>
-            <p><a href="http://www.google.com/webfonts"><?php _e('Google Web Fonts lets you browse all the fonts available via the Google Web Fonts API. All fonts in the directory are available for use on your website under an open source license and are served by Google servers.', 'constructor') ?></a></p>
+
             <h3><?php _e('Font Weight', 'constructor') ?></h3>
             <p><?php _e('Defines from thin to thick characters. 400 is the same as "normal", and 700 is the same as "bold"', 'constructor') ?>
             </p>
diff --git a/wp-content/themes/constructor/css-editor.php b/wp-content/themes/constructor/css-editor.php
index aab74426d..793d0e886 100644
--- a/wp-content/themes/constructor/css-editor.php
+++ b/wp-content/themes/constructor/css-editor.php
@@ -82,11 +82,11 @@ if (array_search($constructor['fonts']['content']['family'], $font_face) !== fal
         array_push($include_fonts, $font);
     }
 }
-if (!empty($include_fonts)) {
-    $font_face = '@import url(http://fonts.googleapis.com/css?family='.join('|',$include_fonts).');'."\n";
-} else {
-    $font_face = '';
-}
+/* if (!empty($include_fonts)) { */
+/*     $font_face = '@import url(http://fonts.googleapis.com/css?family='.join('|',$include_fonts).');'."\n"; */
+/* } else { */
+/*     $font_face = ''; */
+/* } */
 
 $title_font = <<<CSS
     font-family:{$constructor['fonts']['title']['family']};
diff --git a/wp-content/themes/constructor/css.php b/wp-content/themes/constructor/css.php
index 266ff3437..0a89de64a 100644
--- a/wp-content/themes/constructor/css.php
+++ b/wp-content/themes/constructor/css.php
@@ -82,11 +82,11 @@ if (array_search($options['fonts']['content']['family'], $font_face) !== false)
         array_push($include_fonts, $font);
     }
 }
-if (!empty($include_fonts)) {
-    $font_face = '@import url(http://fonts.googleapis.com/css?family='.join('|',$include_fonts).');'."\n";
+/*if (!empty($include_fonts)) {
+     $font_face = '@import url(http://fonts.googleapis.com/css?family='.join('|',$include_fonts).');'."\n";
 } else {
     $font_face = '';
-}
+    }*/
 
 $title_font = <<<CSS
     font-family:{$options['fonts']['title']['family']};
diff --git a/wp-content/themes/constructor/libs/Constructor/Admin.php b/wp-content/themes/constructor/libs/Constructor/Admin.php
index 47d0b41a6..0a7e2c48c 100644
--- a/wp-content/themes/constructor/libs/Constructor/Admin.php
+++ b/wp-content/themes/constructor/libs/Constructor/Admin.php
@@ -557,8 +557,8 @@ Author URI: $author_uri
         <?php
         endforeach;
         $k++; // start from this is font
-        $font_face = require CONSTRUCTOR_DIRECTORY . '/admin/font-face.php';
-        echo "<optgroup label='".__('Google Fonts', 'constructor')."'>";
+        /*$font_face = require CONSTRUCTOR_DIRECTORY . '/admin/font-face.php';
+	echo "<optgroup label='".__('Google Fonts', 'constructor')."'>";
         foreach ($font_face as $i => $font) :
             if ($font == $constructor['fonts'][$key]['family']) :
                 $loadFont = $font;
@@ -571,7 +571,7 @@ Author URI: $author_uri
             <?php
             endif;
         endforeach;
-        echo "</optgroup>";
+        echo "</optgroup>";*/
         echo "</select>";
         if (isset($loadFont)) {
             ?>
-- 
GitLab