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

Version Description

  • Preload path should include absolute url, instead of relative, to prevent issues with CDN usage.
Download this release

Release Info

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

Code changes from version 3.4.4 to 3.4.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.4.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.4.5
8
  * Author: Daan van den Bergh
9
  * Author URI: https://daan.dev
10
  * License: GPL2v2 or later
includes/frontend/class-functions.php CHANGED
@@ -240,8 +240,7 @@ class OMGF_Frontend_Functions
240
  $urls = array_reduce($font_urls, 'array_merge', []);
241
 
242
  foreach ($urls as $url) {
243
- $path = parse_url($url)['path'];
244
- echo "<link rel='preload' href='$path' as='font' type='font/" . pathinfo($url, PATHINFO_EXTENSION) . "' crossorigin='anonymous'>\n";
245
  }
246
  }
247
  }
240
  $urls = array_reduce($font_urls, 'array_merge', []);
241
 
242
  foreach ($urls as $url) {
243
+ echo "<link rel='preload' href='$url' as='font' type='font/" . pathinfo($url, PATHINFO_EXTENSION) . "' crossorigin='anonymous'>\n";
 
244
  }
245
  }
246
  }
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.4.4
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -108,10 +108,14 @@ N/A
108
 
109
  == Changelog ==
110
 
 
 
 
111
  = 3.4.4 =
112
  * OMGF is now loaded inline with other plugins, not last. And,
113
  * only Auto Detect is now triggered (if enabled) after all other plugins are loaded.
114
  * An 'Evil Cache Plugin' warning is now thrown, when OMGF is activated and one of the Evil Cache Plugins are installed, prompting the user to move the webfonts-folder **outside** of the `wp-content/cache` folder.
 
115
  * Fixed bug where Pre Update functions weren't triggered anymore, e.g. move fonts after cache path change.
116
  * Minor code optimizations/clean up.
117
 
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.4.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.4.5 =
112
+ * Preload path should include absolute url, instead of relative, to prevent issues with CDN usage.
113
+
114
  = 3.4.4 =
115
  * OMGF is now loaded inline with other plugins, not last. And,
116
  * only Auto Detect is now triggered (if enabled) after all other plugins are loaded.
117
  * An 'Evil Cache Plugin' warning is now thrown, when OMGF is activated and one of the Evil Cache Plugins are installed, prompting the user to move the webfonts-folder **outside** of the `wp-content/cache` folder.
118
+ * 'Evil Cache Plugins' aren't necessarily evil. They just empty the entire cache folder (include OMGF's fonts) when a cache flush is triggered.
119
  * Fixed bug where Pre Update functions weren't triggered anymore, e.g. move fonts after cache path change.
120
  * Minor code optimizations/clean up.
121
 
templates/admin/block-advanced-settings.phtml CHANGED
@@ -66,7 +66,7 @@ $utmTags = '?utm_source=omgf&utm_medium=plugin&utm_campaign=settings';
66
  <td>
67
  <input id="<?= OMGF_Admin_Settings::OMGF_ADV_SETTING_CACHE_PATH; ?>" class="<?= OMGF_Admin_Settings::OMGF_ADV_SETTING_CACHE_PATH; ?>" type="text" name="<?= OMGF_Admin_Settings::OMGF_ADV_SETTING_CACHE_PATH; ?>" placeholder="<?= __('e.g. /cache/omgf-webfonts', 'host-webfonts-local'); ?>" value="<?= OMGF_CACHE_PATH; ?>"/>
68
  <p class="description">
69
- <?php _e("The folder (inside <code>wp-content</code>) where font files should be stored. Some caching plugins (e.g. WP Super Cache) empty the entire <code>wp-content/cache</code> folder when the cache if flushed. Change this value if you're using such a plugin. Give each site a unique value if you're using Multisite. Defaults to <code>/cache/omgf-webfonts</code>. After changing this setting, the folder will be created if it doesn't exist and existing files will be moved automatically.", 'host-webfonts-local'); ?>
70
  </p>
71
  </td>
72
  </tr>
66
  <td>
67
  <input id="<?= OMGF_Admin_Settings::OMGF_ADV_SETTING_CACHE_PATH; ?>" class="<?= OMGF_Admin_Settings::OMGF_ADV_SETTING_CACHE_PATH; ?>" type="text" name="<?= OMGF_Admin_Settings::OMGF_ADV_SETTING_CACHE_PATH; ?>" placeholder="<?= __('e.g. /cache/omgf-webfonts', 'host-webfonts-local'); ?>" value="<?= OMGF_CACHE_PATH; ?>"/>
68
  <p class="description">
69
+ <?php _e("The folder (inside <code>wp-content</code>) where font files should be stored. Give each site a unique value if you're using Multisite. Defaults to <code>/cache/omgf-webfonts</code>. After changing this setting, the folder will be created if it doesn't exist and existing files will be moved automatically.", 'host-webfonts-local'); ?>
70
  </p>
71
  </td>
72
  </tr>