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

Version Description

  • Modified preload feature to comply with Mozilla's regulations for the crossorigin attribute.
Download this release

Release Info

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

Code changes from version 3.3.5 to 3.3.6

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.5
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.6
8
  * Author: Daan van den Bergh
9
  * Author URI: https://daan.dev
10
  * License: GPL2v2 or later
includes/frontend/class-functions.php CHANGED
@@ -165,7 +165,7 @@ class OMGF_Frontend_Functions
165
  /** Do not add 'preload' if Minification plugins are enabled. */
166
  if ($style) {
167
  $source = $style->src . ($style->ver ? "?ver={$style->ver}" : "");
168
- echo "<link rel='preload' href='{$source}' as='style' />\n";
169
  }
170
  }
171
 
@@ -207,7 +207,8 @@ class OMGF_Frontend_Functions
207
  $urls = array_reduce($font_urls, 'array_merge', []);
208
 
209
  foreach ($urls as $url) {
210
- echo "<link rel='preload' href='$url' as='font' type='font/" . pathinfo($url, PATHINFO_EXTENSION) . "' crossorigin>\n";
 
211
  }
212
  }
213
  }
165
  /** Do not add 'preload' if Minification plugins are enabled. */
166
  if ($style) {
167
  $source = $style->src . ($style->ver ? "?ver={$style->ver}" : "");
168
+ echo "<link rel='preload' href='{$source}' as='style' crossorigin='anonymous'/>\n";
169
  }
170
  }
171
 
207
  $urls = array_reduce($font_urls, 'array_merge', []);
208
 
209
  foreach ($urls as $url) {
210
+ $path = parse_url($url)['path'];
211
+ echo "<link rel='preload' href='$path' as='font' type='font/" . pathinfo($url, PATHINFO_EXTENSION) . "' crossorigin='anonymous'>\n";
212
  }
213
  }
214
  }
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.5
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.5 =
112
  * Minor bug and usability fixes.
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.6
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.6 =
112
+ * Modified preload feature to comply with Mozilla's regulations for the crossorigin attribute.
113
+
114
  = 3.3.5 =
115
  * Minor bug and usability fixes.
116