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

Version Description

  • Fixed bug where OMGF would trigger too late for the requests to fonts.googleapis.com to be captured.
Download this release

Release Info

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

Code changes from version 4.0.1 to 4.0.2

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 automatically saving Google Fonts to your server and removing the external Google Fonts.
7
- * Version: 4.0.1
8
  * Author: Daan (from Fast FW Press)
9
  * Author URI: https://ffwp.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 automatically saving Google Fonts to your server and removing the external Google Fonts.
7
+ * Version: 4.0.2
8
  * Author: Daan (from Fast FW Press)
9
  * Author URI: https://ffwp.dev
10
  * License: GPL2v2 or later
includes/class-omgf.php CHANGED
@@ -31,7 +31,7 @@ class OMGF
31
  }
32
 
33
  if (!is_admin()) {
34
- add_action('plugins_loaded', [$this, 'do_frontend']);
35
  }
36
 
37
  add_action('rest_api_init', [$this, 'register_routes']);
31
  }
32
 
33
  if (!is_admin()) {
34
+ $this->do_frontend();
35
  }
36
 
37
  add_action('rest_api_init', [$this, 'register_routes']);
includes/frontend/class-functions.php CHANGED
@@ -102,7 +102,7 @@ class OMGF_Frontend_Functions
102
  continue;
103
  }
104
 
105
- $wp_styles->registered[ $handle ]->src = str_replace( 'https://fonts.googleapis.com/', site_url( '/wp-json/omgf/v1/download/' ), $font->src ) . "&handle=$handle";
106
  }
107
  }
108
 
102
  continue;
103
  }
104
 
105
+ $wp_styles->registered[ $handle ]->src = str_replace( [ 'https://fonts.googleapis.com/', '//fonts.googleapis.com/' ], site_url( '/wp-json/omgf/v1/download/' ), $font->src ) . "&handle=$handle";
106
  }
107
  }
108
 
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.5
6
- Stable tag: 4.0.1
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -112,6 +112,9 @@ N/A
112
 
113
  == Changelog ==
114
 
 
 
 
115
  = 4.0.1 =
116
  * The tiniest bugfix ever: one space too much in a str_replace() caused Font Names with spaces (e.g. Roboto Condensed, or Open Sans) to not be captured correctly.
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.5
6
+ Stable tag: 4.0.2
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
112
 
113
  == Changelog ==
114
 
115
+ = 4.0.2 =
116
+ * Fixed bug where OMGF would trigger too late for the requests to fonts.googleapis.com to be captured.
117
+
118
  = 4.0.1 =
119
  * The tiniest bugfix ever: one space too much in a str_replace() caused Font Names with spaces (e.g. Roboto Condensed, or Open Sans) to not be captured correctly.
120