Skip to content
Snippets Groups Projects
Commit fc36f47c authored by lucha's avatar lucha Committed by agata
Browse files

Patched Constructor theme to remove Google Font API

parent 6ab06aec
Branches
No related tags found
No related merge requests found
...@@ -36,15 +36,15 @@ $(document).ready(function(){ ...@@ -36,15 +36,15 @@ $(document).ready(function(){
}); });
})(jQuery); })(jQuery);
var loaded = new Array(); /* var loaded = new Array(); */
function loadFont(font) { /* function loadFont(font) { */
if (loaded.indexOf(font) >= 0) return true; /* if (loaded.indexOf(font) >= 0) return true; */
loaded.push(font); /* loaded.push(font); */
font = font.replace(/\"/gi, ''); /* font = font.replace(/\"/gi, ''); */
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> </script>
<table class="form-table"> <table class="form-table">
...@@ -76,8 +76,7 @@ function loadFont(font) { ...@@ -76,8 +76,7 @@ function loadFont(font) {
</p> </p>
</td> </td>
<td rowspan="5" valign="top" class="updated quick-links" width="320px"> <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> <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><?php _e('Defines from thin to thick characters. 400 is the same as "normal", and 700 is the same as "bold"', 'constructor') ?>
</p> </p>
......
...@@ -82,11 +82,11 @@ if (array_search($constructor['fonts']['content']['family'], $font_face) !== fal ...@@ -82,11 +82,11 @@ if (array_search($constructor['fonts']['content']['family'], $font_face) !== fal
array_push($include_fonts, $font); array_push($include_fonts, $font);
} }
} }
if (!empty($include_fonts)) { /* if (!empty($include_fonts)) { */
$font_face = '@import url(http://fonts.googleapis.com/css?family='.join('|',$include_fonts).');'."\n"; /* $font_face = '@import url(http://fonts.googleapis.com/css?family='.join('|',$include_fonts).');'."\n"; */
} else { /* } else { */
$font_face = ''; /* $font_face = ''; */
} /* } */
$title_font = <<<CSS $title_font = <<<CSS
font-family:{$constructor['fonts']['title']['family']}; font-family:{$constructor['fonts']['title']['family']};
......
...@@ -82,11 +82,11 @@ if (array_search($options['fonts']['content']['family'], $font_face) !== false) ...@@ -82,11 +82,11 @@ if (array_search($options['fonts']['content']['family'], $font_face) !== false)
array_push($include_fonts, $font); array_push($include_fonts, $font);
} }
} }
if (!empty($include_fonts)) { /*if (!empty($include_fonts)) {
$font_face = '@import url(http://fonts.googleapis.com/css?family='.join('|',$include_fonts).');'."\n"; $font_face = '@import url(http://fonts.googleapis.com/css?family='.join('|',$include_fonts).');'."\n";
} else { } else {
$font_face = ''; $font_face = '';
} }*/
$title_font = <<<CSS $title_font = <<<CSS
font-family:{$options['fonts']['title']['family']}; font-family:{$options['fonts']['title']['family']};
......
...@@ -557,8 +557,8 @@ Author URI: $author_uri ...@@ -557,8 +557,8 @@ Author URI: $author_uri
<?php <?php
endforeach; endforeach;
$k++; // start from this is font $k++; // start from this is font
$font_face = require CONSTRUCTOR_DIRECTORY . '/admin/font-face.php'; /*$font_face = require CONSTRUCTOR_DIRECTORY . '/admin/font-face.php';
echo "<optgroup label='".__('Google Fonts', 'constructor')."'>"; echo "<optgroup label='".__('Google Fonts', 'constructor')."'>";
foreach ($font_face as $i => $font) : foreach ($font_face as $i => $font) :
if ($font == $constructor['fonts'][$key]['family']) : if ($font == $constructor['fonts'][$key]['family']) :
$loadFont = $font; $loadFont = $font;
...@@ -571,7 +571,7 @@ Author URI: $author_uri ...@@ -571,7 +571,7 @@ Author URI: $author_uri
<?php <?php
endif; endif;
endforeach; endforeach;
echo "</optgroup>"; echo "</optgroup>";*/
echo "</select>"; echo "</select>";
if (isset($loadFont)) { if (isset($loadFont)) {
?> ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment