Commit 63a5b206 authored by lucha's avatar lucha

Patched Constructor theme to remove Google Font API

parent 61fbacbb
......@@ -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>
......
......@@ -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']};
......
......@@ -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']};
......
......@@ -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)) {
?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment