OMGF | GDPR/DSVGO Compliant, Faster Google Fonts. Easy. - Version 3.3.5

Version Description

  • Minor bug and usability fixes.
Download this release

Release Info

Developer DaanvandenBergh
Plugin Icon 128x128 OMGF | GDPR/DSVGO Compliant, Faster Google Fonts. Easy.
Version 3.3.5
Comparing to
See all releases

Code changes from version 3.3.4 to 3.3.5

host-webfonts-local.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: OMGF
5
  * Plugin URI: https://daan.dev/wordpress-plugins/host-google-fonts-locally
6
  * Description: Minimize DNS requests and leverage browser cache by easily saving Google Fonts to your server and removing the external Google Fonts.
7
- * Version: 3.3.4
8
  * Author: Daan van den Bergh
9
  * Author URI: https://daan.dev
10
  * License: GPL2v2 or later
4
  * Plugin Name: OMGF
5
  * Plugin URI: https://daan.dev/wordpress-plugins/host-google-fonts-locally
6
  * Description: Minimize DNS requests and leverage browser cache by easily saving Google Fonts to your server and removing the external Google Fonts.
7
+ * Version: 3.3.5
8
  * Author: Daan van den Bergh
9
  * Author URI: https://daan.dev
10
  * License: GPL2v2 or later
includes/ajax/class-generate.php CHANGED
@@ -103,6 +103,10 @@ class OMGF_AJAX_Generate extends OMGF_AJAX
103
  $fontSources = $fontSources + (isset($font['url_ttf_local']) ? array('truetype' => esc_url_raw($font['url_ttf_local'])) : array());
104
  $locals = explode(',', sanitize_text_field($font['local']));
105
 
 
 
 
 
106
  $this->fonts[$i] = "@font-face { \n";
107
  $this->fonts[$i] .= $this->build_property('font-family', $font['font_family']);
108
  $this->fonts[$i] .= $this->build_property('font-display', $fontDisplay);
103
  $fontSources = $fontSources + (isset($font['url_ttf_local']) ? array('truetype' => esc_url_raw($font['url_ttf_local'])) : array());
104
  $locals = explode(',', sanitize_text_field($font['local']));
105
 
106
+ if (empty($fontSources)) {
107
+ OMGF_Admin_Notice::set_notice(__('<strong>Download Fonts</strong> before generating the stylesheet.', 'host-webfonts-local'), true, 'error');
108
+ }
109
+
110
  $this->fonts[$i] = "@font-face { \n";
111
  $this->fonts[$i] .= $this->build_property('font-family', $font['font_family']);
112
  $this->fonts[$i] .= $this->build_property('font-display', $fontDisplay);
includes/class-api.php CHANGED
@@ -67,7 +67,7 @@ class OMGF_API
67
  'font_family' => $variant->fontFamily,
68
  'font_weight' => $variant->fontWeight,
69
  'font_style' => $variant->fontStyle,
70
- 'local' => implode(',', $variant->local),
71
  'preload' => 0,
72
  'downloaded' => 0,
73
  'url_ttf' => $variant->ttf,
67
  'font_family' => $variant->fontFamily,
68
  'font_weight' => $variant->fontWeight,
69
  'font_style' => $variant->fontStyle,
70
+ 'local' => implode(',', $variant->local ?? []),
71
  'preload' => 0,
72
  'downloaded' => 0,
73
  'url_ttf' => $variant->ttf,
includes/class-omgf.php CHANGED
@@ -67,7 +67,7 @@ class OMGF
67
  define('OMGF_DISPLAY_OPTION', esc_attr(get_option(OMGF_Admin_Settings::OMGF_ADV_SETTING_DISPLAY_OPTION)) ?: 'auto');
68
  define('OMGF_REMOVE_GFONTS', esc_attr(get_option(OMGF_Admin_Settings::OMGF_ADV_SETTING_REMOVE_GOOGLE_FONTS)));
69
  define('OMGF_PRELOAD', esc_attr(get_option(OMGF_Admin_Settings::OMGF_ADV_SETTING_ENABLE_PRELOAD)));
70
- define('OMGF_ENQUEUE_ORDER', esc_attr(get_option(OMGF_Admin_Settings::OMGF_ADV_SETTING_ENQUEUE_ORDER, 100)));
71
  define('OMGF_UNINSTALL', esc_attr(get_option(OMGF_Admin_Settings::OMGF_ADV_SETTING_UNINSTALL)));
72
  }
73
 
67
  define('OMGF_DISPLAY_OPTION', esc_attr(get_option(OMGF_Admin_Settings::OMGF_ADV_SETTING_DISPLAY_OPTION)) ?: 'auto');
68
  define('OMGF_REMOVE_GFONTS', esc_attr(get_option(OMGF_Admin_Settings::OMGF_ADV_SETTING_REMOVE_GOOGLE_FONTS)));
69
  define('OMGF_PRELOAD', esc_attr(get_option(OMGF_Admin_Settings::OMGF_ADV_SETTING_ENABLE_PRELOAD)));
70
+ define('OMGF_ENQUEUE_ORDER', esc_attr(get_option(OMGF_Admin_Settings::OMGF_ADV_SETTING_ENQUEUE_ORDER, 10)));
71
  define('OMGF_UNINSTALL', esc_attr(get_option(OMGF_Admin_Settings::OMGF_ADV_SETTING_UNINSTALL)));
72
  }
73
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: DaanvandenBergh
3
  Tags: google, fonts, gdpr, cache, speed, preload, font-display, webfonts, subsets, remove, minimize, external, requests
4
  Requires at least: 4.6
5
  Tested up to: 5.4
6
- Stable tag: 3.3.4
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -108,6 +108,9 @@ N/A
108
 
109
  == Changelog ==
110
 
 
 
 
111
  = 3.3.4 =
112
  * Fixed bug in preload.
113
 
3
  Tags: google, fonts, gdpr, cache, speed, preload, font-display, webfonts, subsets, remove, minimize, external, requests
4
  Requires at least: 4.6
5
  Tested up to: 5.4
6
+ Stable tag: 3.3.5
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
108
 
109
  == Changelog ==
110
 
111
+ = 3.3.5 =
112
+ * Minor bug and usability fixes.
113
+
114
  = 3.3.4 =
115
  * Fixed bug in preload.
116