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

Version Description

  • Added: workaround for Divi builder to identify unique Google Fonts stylesheets.
  • Added: extra links to documentation in Manage Optimized Fonts section.
  • Fixed: Changed links to new documentation hub.
  • Fixed: don't use WP_Filesystem to get and put file contents.
Download this release

Release Info

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

Code changes from version 5.1.2 to 5.1.3

assets/css/omgf-admin.css CHANGED
@@ -188,6 +188,9 @@
188
  margin-left: -125px;
189
  border-radius: 3px;
190
  }
 
 
 
191
  .tooltip .tooltip-text .illustration {
192
  margin-top: 10px;
193
  }
188
  margin-left: -125px;
189
  border-radius: 3px;
190
  }
191
+ .tooltip .tooltip-text a {
192
+ color: white;
193
+ }
194
  .tooltip .tooltip-text .illustration {
195
  margin-top: 10px;
196
  }
assets/css/omgf-admin.css.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["omgf-admin.less"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAkBA,KACE;EACE,WAAA;EACA,qBAAA;EACA,yBAAA;EACA,gBAAA;EACA,eAAA;EACA,kBAAA;EACA,mBAAA;EACA,4BAAA;;AAEA,KAVF,eAUG;EACC,eAAA;EACA,mBAAA;EACA,WAAA;EACA,qBAAA;;;;;AAQN;EACE,oBAAA;;AADF,SAGE;EACE,eAAA;;AAJJ,SAOE,kBAAiB;EACf,oBAAA;EACA,mBAAA;;AAIJ,KAAM;EACJ,iBAAA;;AADF,KAAM,KAGJ;EACE,iBAAA;;AAJJ,KAAM,KAQJ,mBACE;EACE,eAAA;EACA,cAAA;;AAXN,KAAM,KAQJ,mBAME;EACE,eAAA;EACA,gBAAA;EACA,cAAA;EACA,eAAA;;AAlBN,KAAM,KAQJ,mBAME,GAME;EACE,mBAAA;EACA,iBAAA;EACA,kBAAA;;AAEA,KAzBF,KAQJ,mBAME,GAME,GAKG;EAC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,mBAAA;;AAFJ,eACE,SAGE;EACE,aAAA;EACA,mBAAA;EACA,8BAAA;;AAPN,eACE,SAGE,kBAKE,QACE,GACE;EACE,mBAAA;;AAEA,eAbV,SAGE,kBAKE,QACE,GACE,GAGG;EACC,mBAAA;;AAfd,eACE,SAGE,kBAKE,QACE,GACE,GAOE;EACE,qBAAA;EACA,iBAAA;;AAGE,eAtBd,SAGE,kBAKE,QACE,GACE,GAOE,EAIE,EACG;EACC,iBAAA;EACA,cAAA;;AAOV,eA/BN,SAGE,kBAKE,QAuBG;EACC,kBAAA;;AADF,eA/BN,SAGE,kBAKE,QAuBG,KAGC;EACE,kBAAA;;AAJJ,eA/BN,SAGE,kBAKE,QAuBG,KAGC,WAGE;EACE,cAAA;;AASd,wBAA0C;EACxC;IACE,cAAA;;EADF,8BAGE;IACE,kBAAA;IACA,aAAA;IACA,YAAA;;;;;;AAQN;EACE,eAAA;EACA,0CAAA;EACA,WAAA;EACA,YAAA;EACA,MAAA;EACA,kBAAA;;AANF,aAQE;EACE,QAAA;EACA,SAAA;EACA,kBAAA;EACA,eAAe,gBAAf;EACA,WAAW,gBAAX;;;;;AAOJ,gBACE;EACE,uBAAA;;AAIA,gBADF,WACG;EACC,sBAAA;;AAGF,gBALF,WAKG,WAAW;EACV,cAAA;;AAXN,gBAeE;EACE,WAAA"}
assets/css/omgf-admin.less CHANGED
@@ -116,7 +116,7 @@
116
  text-align: center;
117
  padding: 25px 50px;
118
  max-width: 1024px;
119
- margin: 20px auto 0 220px;
120
  overflow: visible;
121
  position: relative;
122
 
@@ -152,7 +152,7 @@
152
 
153
  th {
154
  padding: 5px 0 0 10px;
155
- width: 40%;
156
  }
157
 
158
  td {
@@ -164,7 +164,7 @@
164
  }
165
 
166
  .family {
167
- padding: 0 10px 0;
168
  font-weight: 600;
169
  }
170
  }
@@ -226,7 +226,7 @@
226
  left: 100%;
227
  z-index: 10000;
228
  background-color: rgba(0, 0, 0, 0.75);
229
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
230
  font-size: .8em;
231
  color: #fff;
232
  line-height: 1.5;
@@ -235,6 +235,10 @@
235
  margin-left: -125px;
236
  border-radius: 3px;
237
 
 
 
 
 
238
  .illustration {
239
  margin-top: 10px;
240
  }
@@ -266,7 +270,7 @@
266
  a {
267
  text-decoration: none;
268
  line-height: 1.45;
269
-
270
  i {
271
  &.dashicons {
272
  margin-right: 5px;
@@ -281,8 +285,8 @@
281
  margin-right: 45px;
282
 
283
  .signature {
284
- text-align: center;
285
-
286
  .dashicons-heart {
287
  color: #FF4136;
288
  }
@@ -310,7 +314,7 @@
310
  */
311
  .omgf-loading {
312
  position: fixed;
313
- background-color: rgba(255,255,255,0.6);
314
  width: 100%;
315
  height: 100%;
316
  top: 0;
@@ -328,7 +332,7 @@
328
  /**
329
  * Welcome Block
330
  */
331
- #footer-thankyou {
332
  a {
333
  vertical-align: -.65em;
334
  }
@@ -337,7 +341,7 @@
337
  &.ffwp-heart {
338
  vertical-align: middle;
339
  }
340
-
341
  &.ffwp-heart:before {
342
  color: #FF4136;
343
  }
@@ -346,4 +350,4 @@
346
  .signature-image {
347
  width: 96px;
348
  }
349
- }
116
  text-align: center;
117
  padding: 25px 50px;
118
  max-width: 1024px;
119
+ margin: 20px auto 0 220px;
120
  overflow: visible;
121
  position: relative;
122
 
152
 
153
  th {
154
  padding: 5px 0 0 10px;
155
+ width: 40%;
156
  }
157
 
158
  td {
164
  }
165
 
166
  .family {
167
+ padding: 0 10px 0;
168
  font-weight: 600;
169
  }
170
  }
226
  left: 100%;
227
  z-index: 10000;
228
  background-color: rgba(0, 0, 0, 0.75);
229
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
230
  font-size: .8em;
231
  color: #fff;
232
  line-height: 1.5;
235
  margin-left: -125px;
236
  border-radius: 3px;
237
 
238
+ a {
239
+ color: white;
240
+ }
241
+
242
  .illustration {
243
  margin-top: 10px;
244
  }
270
  a {
271
  text-decoration: none;
272
  line-height: 1.45;
273
+
274
  i {
275
  &.dashicons {
276
  margin-right: 5px;
285
  margin-right: 45px;
286
 
287
  .signature {
288
+ text-align: center;
289
+
290
  .dashicons-heart {
291
  color: #FF4136;
292
  }
314
  */
315
  .omgf-loading {
316
  position: fixed;
317
+ background-color: rgba(255, 255, 255, 0.6);
318
  width: 100%;
319
  height: 100%;
320
  top: 0;
332
  /**
333
  * Welcome Block
334
  */
335
+ #footer-thankyou {
336
  a {
337
  vertical-align: -.65em;
338
  }
341
  &.ffwp-heart {
342
  vertical-align: middle;
343
  }
344
+
345
  &.ffwp-heart:before {
346
  color: #FF4136;
347
  }
350
  .signature-image {
351
  width: 96px;
352
  }
353
+ }
host-webfonts-local.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: OMGF
5
  * Plugin URI: https://ffw.press/wordpress/omgf/
6
  * Description: Increase GDPR compliance, reduce DNS requests and leverage browser cache by automatically downloading Google Fonts to your server.
7
- * Version: 5.1.2
8
  * Author: Daan from FFW.Press
9
  * Author URI: https://ffw.press
10
  * License: GPL2v2 or later
4
  * Plugin Name: OMGF
5
  * Plugin URI: https://ffw.press/wordpress/omgf/
6
  * Description: Increase GDPR compliance, reduce DNS requests and leverage browser cache by automatically downloading Google Fonts to your server.
7
+ * Version: 5.1.3
8
  * Author: Daan from FFW.Press
9
  * Author URI: https://ffw.press
10
  * License: GPL2v2 or later
includes/admin/settings/class-optimize.php CHANGED
@@ -243,7 +243,7 @@ class OMGF_Admin_Settings_Optimize extends OMGF_Admin_Settings_Builder
243
  */
244
  $this->optimized_fonts = OMGF::optimized_fonts();
245
  ?>
246
- <span class="option-title"><?= __('Manage Optimized Fonts', $this->plugin_text_domain); ?></span>
247
  <?php if (!empty($this->optimized_fonts)) : ?>
248
  <?= $this->do_optimized_fonts_manager(); ?>
249
  <?php else : ?>
@@ -271,10 +271,10 @@ class OMGF_Admin_Settings_Optimize extends OMGF_Admin_Settings_Builder
271
  <td>&nbsp;</td>
272
  <th><?= __('Style', $this->plugin_text_domain); ?></th>
273
  <th><?= __('Weight', $this->plugin_text_domain); ?></th>
274
- <th><?= __('Preload', $this->plugin_text_domain); ?><span class="dashicons dashicons-info tooltip"><span class="tooltip-text"><span class="inline-text"><?= __('Preload font files (before everything else) so they will be available as soon as they are required for the rendering of the page. Only use preload for font files that are used above the fold.', $this->plugin_text_domain); ?></span><img width="230" class="illustration" src="<?= plugin_dir_url(OMGF_PLUGIN_FILE) . 'assets/images/above-the-fold.png'; ?>" /></span></span></th>
275
  <th><?= __('Do not load', $this->plugin_text_domain); ?></th>
276
  <th><?= __('Fallback Font Stack (Pro)', $this->plugin_text_domain); ?></th>
277
- <th><?= __('Replace (Pro)', $this->plugin_text_domain); ?><span class="dashicons dashicons-info tooltip"><span class="tooltip-text"><span class="inline-text"><?= __('When the Replace option is checked, the selected Fallback Font Stack will replace the corresponding Google Font family, instead of functioning as a fallback.', $this->plugin_text_domain); ?></span></span></span></th>
278
  </tr>
279
  </thead>
280
  <?php
243
  */
244
  $this->optimized_fonts = OMGF::optimized_fonts();
245
  ?>
246
+ <span class="option-title"><?= __('Manage Optimized Fonts', $this->plugin_text_domain); ?><span class="dashicons dashicons-info tooltip"><span class="tooltip-text"><span class="inline-text"><?php echo sprintf(__('Don\'t know where or how to start optimizing your Google Fonts? That\'s okay. <a href="%s">This guide</a> will get you sorted.', $this->plugin_text_domain), 'https://ffw.press/blog/how-to/wordpress-google-fonts/'); ?></span></span></span></span>
247
  <?php if (!empty($this->optimized_fonts)) : ?>
248
  <?= $this->do_optimized_fonts_manager(); ?>
249
  <?php else : ?>
271
  <td>&nbsp;</td>
272
  <th><?= __('Style', $this->plugin_text_domain); ?></th>
273
  <th><?= __('Weight', $this->plugin_text_domain); ?></th>
274
+ <th><?= __('Preload', $this->plugin_text_domain); ?><span class="dashicons dashicons-info tooltip"><span class="tooltip-text"><span class="inline-text"><?php echo sprintf(__('<a href="%s">Preload font files</a> prior to page rendering to improve perceived loading times. Only use preload for font files that are used above the fold.', $this->plugin_text_domain), 'https://ffw.press/blog/how-to/wordpress-google-fonts/#3-2-preloading-font-files-above-the-fold'); ?></span><img width="230" class="illustration" src="<?= plugin_dir_url(OMGF_PLUGIN_FILE) . 'assets/images/above-the-fold.png'; ?>" /></span></span></th>
275
  <th><?= __('Do not load', $this->plugin_text_domain); ?></th>
276
  <th><?= __('Fallback Font Stack (Pro)', $this->plugin_text_domain); ?></th>
277
+ <th><?= __('Replace (Pro)', $this->plugin_text_domain); ?><span class="dashicons dashicons-info tooltip"><span class="tooltip-text"><span class="inline-text"><?php echo sprintf(__('When the <a href="%s">Replace option</a> is checked, the selected Fallback Font Stack will replace the corresponding Google Font family, instead of functioning as a fallback.', $this->plugin_text_domain), 'https://ffw.press/blog/how-to/wordpress-google-fonts/#7-4-specify-a-fallback-font-stack'); ?></span></span></span></th>
278
  </tr>
279
  </thead>
280
  <?php
includes/class-omgf.php CHANGED
@@ -360,23 +360,6 @@ class OMGF
360
  }
361
  }
362
 
363
- /**
364
- * Helper to return WordPress filesystem subclass.
365
- *
366
- * @return WP_Filesystem_Base $wp_filesystem
367
- */
368
- public static function filesystem()
369
- {
370
- global $wp_filesystem;
371
-
372
- if (is_null($wp_filesystem)) {
373
- require_once ABSPATH . '/wp-admin/includes/file.php';
374
- WP_Filesystem();
375
- }
376
-
377
- return $wp_filesystem;
378
- }
379
-
380
  /**
381
  * Global debug logging function.
382
  *
360
  }
361
  }
362
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
363
  /**
364
  * Global debug logging function.
365
  *
includes/class-optimize.php CHANGED
@@ -186,13 +186,12 @@ class OMGF_Optimize
186
 
187
  $local_file = $this->path . '/' . $this->handle . '.css';
188
  $stylesheet = OMGF::generate_stylesheet($fonts, $this->original_handle);
189
- $filesystem = OMGF::filesystem();
190
 
191
  if (!file_exists($this->path)) {
192
  wp_mkdir_p($this->path);
193
  }
194
 
195
- $filesystem->put_contents($local_file, $stylesheet);
196
 
197
  $current_stylesheet = [$this->original_handle => $fonts];
198
 
186
 
187
  $local_file = $this->path . '/' . $this->handle . '.css';
188
  $stylesheet = OMGF::generate_stylesheet($fonts, $this->original_handle);
 
189
 
190
  if (!file_exists($this->path)) {
191
  wp_mkdir_p($this->path);
192
  }
193
 
194
+ file_put_contents($local_file, $stylesheet);
195
 
196
  $current_stylesheet = [$this->original_handle => $fonts];
197
 
includes/frontend/class-process.php CHANGED
@@ -186,6 +186,8 @@ class OMGF_Frontend_Process
186
  * Returns the buffer for filtering, so page cache doesn't break.
187
  *
188
  * @since v5.0.0 Tested with:
 
 
189
  * - Cache Enabler v1.8.7
190
  * - Default Settings
191
  * - Kinsta Cache (Same as Cache Enabler?)
@@ -206,7 +208,6 @@ class OMGF_Frontend_Process
206
  * - Page Cache: Enabled
207
  *
208
  * @todo Not tested (yet):
209
- * - Asset Cleanup Pro
210
  * - Swift Performance
211
  *
212
  * @return void
@@ -330,7 +331,19 @@ class OMGF_Frontend_Process
330
  continue;
331
  }
332
 
333
- $google_fonts[$key]['id'] = $id;
 
 
 
 
 
 
 
 
 
 
 
 
334
  $google_fonts[$key]['href'] = $href['href'];
335
  }
336
 
@@ -462,7 +475,7 @@ class OMGF_Frontend_Process
462
  * @param string $updated_handle e.g. example-handle-xvfdo
463
  * @param string $handle e.g. example-handle
464
  *
465
- * @return string
466
  */
467
  public function build_query($url, $updated_handle, $handle)
468
  {
186
  * Returns the buffer for filtering, so page cache doesn't break.
187
  *
188
  * @since v5.0.0 Tested with:
189
+ * - Asset Cleanup Pro
190
+ * - Works
191
  * - Cache Enabler v1.8.7
192
  * - Default Settings
193
  * - Kinsta Cache (Same as Cache Enabler?)
208
  * - Page Cache: Enabled
209
  *
210
  * @todo Not tested (yet):
 
211
  * - Swift Performance
212
  *
213
  * @return void
331
  continue;
332
  }
333
 
334
+ /**
335
+ * Compatibility fix for Divi Builder
336
+ *
337
+ * @since v5.1.3 Because Divi Builder uses the same handle for Google Fonts on each page,
338
+ * even when these contain Google Fonts, let's append a (kind of) unique
339
+ * identifier to the string, to make sure we can make a difference between
340
+ * different Google Fonts configurations.
341
+ */
342
+ if (strpos($id, 'et-builder-googlefonts') !== false) {
343
+ $google_fonts[$key]['id'] = $id . '-' . strlen($href['href']);
344
+ } else {
345
+ $google_fonts[$key]['id'] = $id;
346
+ }
347
  $google_fonts[$key]['href'] = $href['href'];
348
  }
349
 
475
  * @param string $updated_handle e.g. example-handle-xvfdo
476
  * @param string $handle e.g. example-handle
477
  *
478
+ * @return array [ 'family' => string, 'display' => string, 'handle' => string, 'original_handle' => string ]
479
  */
480
  public function build_query($url, $updated_handle, $handle)
481
  {
readme.md CHANGED
@@ -43,7 +43,7 @@ All Google Fonts are listed in the **Manage Optimized Fonts** section of OMGF's
43
  - Set a relative path to easily migrate from development/staging areas to production/live, or
44
  - Anything you like!
45
 
46
- *[Purchase OMGF Pro](https://ffw.press/wordpress/omgf-pro/) | [Documentation](https://docs.ffw.press/category/4-omgf-pro/) | [Tested Plugins & Themes](https://docs.ffw.press/article/40-list-of-compatible-themes-and-plugins-omgf-pro)*
47
 
48
  ## Installation
49
 
@@ -61,7 +61,7 @@ All Google Fonts are listed in the **Manage Optimized Fonts** section of OMGF's
61
 
62
  ## Frequently Asked Questions
63
 
64
- For the FAQ, [click here](https://docs.ffw.press/category/76-omgf-pro---faq).
65
 
66
  ## Support
67
 
43
  - Set a relative path to easily migrate from development/staging areas to production/live, or
44
  - Anything you like!
45
 
46
+ *[Purchase OMGF Pro](https://ffw.press/wordpress/omgf-pro/) | [Documentation](https://ffw.press/docs/omgf-pro/) | [Tested Plugins & Themes](https://ffw.press/docs/omgf-pro/tested-themes-plugins/)*
47
 
48
  ## Installation
49
 
61
 
62
  ## Frequently Asked Questions
63
 
64
+ For the FAQ, [click here](https://ffw.press/docs/omgf-pro-faq).
65
 
66
  ## Support
67
 
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.9
6
- Stable tag: 5.1.2
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -51,7 +51,7 @@ All Google Fonts are listed in the **Manage Optimized Fonts** section of OMGF's
51
  - Set a relative path to easily migrate from development/staging areas to production/live, or
52
  - Anything you like!
53
 
54
- *[Purchase OMGF Pro](https://ffw.press/wordpress/omgf-pro/) | [Documentation](https://docs.ffw.press/category/4-omgf-pro/) | [Tested Plugins & Themes](https://docs.ffw.press/article/40-list-of-compatible-themes-and-plugins-omgf-pro)*
55
 
56
  == Installation ==
57
 
@@ -59,11 +59,11 @@ All Google Fonts are listed in the **Manage Optimized Fonts** section of OMGF's
59
  2. Activate the plugin through the 'Plugins' screen in WordPress
60
  3. Use the Settings -> Optimize Google Fonts screen to configure the plugin
61
 
62
- For a more comprehensive guide on configuring OMGF, check out the [user manual](https://docs.ffw.press/category/4-omgf-pro/)
63
 
64
  == Frequently Asked Questions ==
65
 
66
- For the FAQ, [click here](https://docs.ffw.press/category/76-omgf-pro---faq).
67
 
68
  == Screenshots ==
69
 
@@ -75,6 +75,12 @@ For the FAQ, [click here](https://docs.ffw.press/category/76-omgf-pro---faq).
75
 
76
  == Changelog ==
77
 
 
 
 
 
 
 
78
  = 5.1.2 =
79
  * Fixed: Minor performance improvement - content_url() is no longer used to generate download file URLs.
80
  * Rewrote Modify Source URL option's description.
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.9
6
+ Stable tag: 5.1.3
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
51
  - Set a relative path to easily migrate from development/staging areas to production/live, or
52
  - Anything you like!
53
 
54
+ *[Purchase OMGF Pro](https://ffw.press/wordpress/omgf-pro/) | [Documentation](https://ffw.press/docs/omgf-pro/) | [Tested Plugins & Themes](https://ffw.press/docs/omgf-pro/tested-themes-plugins/)*
55
 
56
  == Installation ==
57
 
59
  2. Activate the plugin through the 'Plugins' screen in WordPress
60
  3. Use the Settings -> Optimize Google Fonts screen to configure the plugin
61
 
62
+ For a more comprehensive guide on configuring OMGF, check out the [user manual](https://ffw.press/docs/omgf-pro/)
63
 
64
  == Frequently Asked Questions ==
65
 
66
+ For the FAQ, [click here](https://ffw.press/docs/omgf-pro-faq/).
67
 
68
  == Screenshots ==
69
 
75
 
76
  == Changelog ==
77
 
78
+ = 5.1.3 =
79
+ * Added: workaround for Divi builder to identify unique Google Fonts stylesheets.
80
+ * Added: extra links to documentation in Manage Optimized Fonts section.
81
+ * Fixed: Changed links to new documentation hub.
82
+ * Fixed: don't use WP_Filesystem to get and put file contents.
83
+
84
  = 5.1.2 =
85
  * Fixed: Minor performance improvement - content_url() is no longer used to generate download file URLs.
86
  * Rewrote Modify Source URL option's description.