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

Version Description

  • OMGF now checks secure (https://) and non-secure (http://) requests to Google Fonts, because apparently some themes still do that, even though it's 2020, but whatever.
    • Tested with Divi and Bridge Theme. Works.
Download this release

Release Info

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

Code changes from version 4.2.0 to 4.2.1

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, leverage browser cache and speed up WordPress by saving Google Fonts to your server and removing external Google Fonts requests.
7
- * Version: 4.2.0
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, leverage browser cache and speed up WordPress by saving Google Fonts to your server and removing external Google Fonts requests.
7
+ * Version: 4.2.1
8
  * Author: Daan (from Fast FW Press)
9
  * Author URI: https://ffwp.dev
10
  * License: GPL2v2 or later
includes/frontend/class-functions.php CHANGED
@@ -188,7 +188,8 @@ class OMGF_Frontend_Functions
188
  }
189
 
190
  if ( OMGF_OPTIMIZATION_MODE == 'auto' || ( OMGF_OPTIMIZATION_MODE == 'manual' && isset( $_GET['omgf_optimize'] ) ) ) {
191
- $wp_styles->registered[ $handle ]->src = str_replace( [ 'https://fonts.googleapis.com/', '//fonts.googleapis.com/' ], site_url( '/wp-json/omgf/v1/download/' ), $font->src ) . "&handle=$updated_handle&original_handle=$handle";
 
192
  }
193
  }
194
  }
188
  }
189
 
190
  if ( OMGF_OPTIMIZATION_MODE == 'auto' || ( OMGF_OPTIMIZATION_MODE == 'manual' && isset( $_GET['omgf_optimize'] ) ) ) {
191
+ $api_url = str_replace( [ 'http:', 'https:' ], '', site_url( '/wp-json/omgf/v1/download/' ) );
192
+ $wp_styles->registered[ $handle ]->src = str_replace( '//fonts.googleapis.com/', $api_url, $font->src ) . "&handle=$updated_handle&original_handle=$handle";
193
  }
194
  }
195
  }
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.2.0
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -122,6 +122,10 @@ No, not yet. But I will definitely try to make it compatible in the future!
122
 
123
  == Changelog ==
124
 
 
 
 
 
125
  = 4.2.0 | The What-4.0-should've-been Edition | October 7th, 2020 =
126
  * **IMPORTANT NOTICE: If you're upgrading from v4.x.x it's required to Empty your Cache Directory. Otherwise the Optimized Google Fonts Overview will not work.**
127
  * Added CSS2 (Variable Fonts) compatiblity,
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.2.1
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
122
 
123
  == Changelog ==
124
 
125
+ = 4.2.1 =
126
+ * OMGF now checks secure (https://) and non-secure (http://) requests to Google Fonts, because apparently some themes still do that, even though it's 2020, but whatever.
127
+ * Tested with Divi and Bridge Theme. Works.
128
+
129
  = 4.2.0 | The What-4.0-should've-been Edition | October 7th, 2020 =
130
  * **IMPORTANT NOTICE: If you're upgrading from v4.x.x it's required to Empty your Cache Directory. Otherwise the Optimized Google Fonts Overview will not work.**
131
  * Added CSS2 (Variable Fonts) compatiblity,