Local Google Fonts - Version 0.18

Version Description

Download this release

Release Info

Developer everpress
Plugin Icon 128x128 Local Google Fonts
Version 0.18
Comparing to
See all releases

Code changes from version 0.17 to 0.18

README.md CHANGED
@@ -4,11 +4,9 @@ Contributors: everpress, xaverb
4
  Tags: googlefonts, google, fonts, gdpr, lgf, font, speed
5
  Requires at least: 4.6
6
  Tested up to: 6.0
7
- Stable tag: 0.17
8
  Requires PHP: 5.6+
9
  License: GPLv2 or later
10
- Author: EverPress
11
- Author URI: https://everpress.co
12
  Donate link: https://evp.to/donate
13
 
14
  ## Description
@@ -78,12 +76,25 @@ The plugin currently only checks fonts embedded via [`wp_enqueue_style`](https:/
78
 
79
  The Divi theme has a custom implementation of Google Fonts. To use LGF with Divi disable _Improve Google Fonts Loading_ on the Performance Settings page of Divi.
80
 
 
 
 
 
 
 
 
 
 
81
  ### Why are some characters displayed in the fallback font?
82
 
83
  You may have loaded a subset which doesn't included required characters. Check additional subsets on the settings page and reload your font.
84
 
85
  ## Changelog
86
 
 
 
 
 
87
  ### 0.17
88
 
89
  - remove `ver` query argument from URLs as they are added by WordPress. _Please review settings as fonts may have to be reloaded_
@@ -94,7 +105,7 @@ You may have loaded a subset which doesn't included required characters. Check a
94
 
95
  ### 0.16
96
 
97
- - using absolute path to support Google Fonts in [Mailster](https://mailster.co/?utm_campaign=wporg&utm_source=Local+Google+Fonts&utm_medium=readme).
98
 
99
  ### 0.15
100
 
4
  Tags: googlefonts, google, fonts, gdpr, lgf, font, speed
5
  Requires at least: 4.6
6
  Tested up to: 6.0
7
+ Stable tag: 0.18
8
  Requires PHP: 5.6+
9
  License: GPLv2 or later
 
 
10
  Donate link: https://evp.to/donate
11
 
12
  ## Description
76
 
77
  The Divi theme has a custom implementation of Google Fonts. To use LGF with Divi disable _Improve Google Fonts Loading_ on the Performance Settings page of Divi.
78
 
79
+ ### How to host Fonts loaded with Slider Revolution?
80
+
81
+ Slider Revolution uses it's own way to load Google Fonts and LGF cannot handle them. Slider Revolution has a built in feature for their sliders.
82
+
83
+ 1. Goto Slider Revolution
84
+ 2. Click on "Global" in the top navigation
85
+ 3. Find the "Fonts" section and Choose "Cache Fonts Local" on "Enable Google Fonts download"
86
+ 4. Save your settings.
87
+
88
  ### Why are some characters displayed in the fallback font?
89
 
90
  You may have loaded a subset which doesn't included required characters. Check additional subsets on the settings page and reload your font.
91
 
92
  ## Changelog
93
 
94
+ ### 0.18
95
+
96
+ - do not use `remove_query_arg` to strip args as it can break some URLs
97
+
98
  ### 0.17
99
 
100
  - remove `ver` query argument from URLs as they are added by WordPress. _Please review settings as fonts may have to be reloaded_
105
 
106
  ### 0.16
107
 
108
+ - using absolute path to support Google Fonts in [Mailster](https://mailster.co/?utm_campaign=wporg&utm_source=wordpress.org&utm_medium=readme&utm_term=Local+Google+Fonts).
109
 
110
  ### 0.15
111
 
includes/class-local-google-fonts-admin.php CHANGED
@@ -136,7 +136,7 @@ class LGF_Admin {
136
  $folder_url = WP_CONTENT_URL . '/uploads/fonts';
137
 
138
  // remove 'ver' query arg as it is added by WP
139
- $src = remove_query_arg( 'ver', $src );
140
 
141
  $id = md5( $src );
142
 
136
  $folder_url = WP_CONTENT_URL . '/uploads/fonts';
137
 
138
  // remove 'ver' query arg as it is added by WP
139
+ $src = preg_replace('/&ver=([^&]+)/', '', $src);
140
 
141
  $id = md5( $src );
142
 
includes/class-local-google-fonts.php CHANGED
@@ -55,7 +55,7 @@ class LGF {
55
  public function process_url( $src, $handle ) {
56
 
57
  // remove 'ver' query arg as it is added by WP
58
- $src = remove_query_arg( 'ver', $src );
59
 
60
  $id = md5( $src );
61
 
@@ -184,7 +184,7 @@ class LGF {
184
  $org = $src;
185
 
186
  // remove 'ver' query arg as it is added by WP
187
- $src = remove_query_arg( 'ver', $src );
188
 
189
  $id = md5( $src );
190
 
55
  public function process_url( $src, $handle ) {
56
 
57
  // remove 'ver' query arg as it is added by WP
58
+ $src = preg_replace('/&ver=([^&]+)/', '', $src);
59
 
60
  $id = md5( $src );
61
 
184
  $org = $src;
185
 
186
  // remove 'ver' query arg as it is added by WP
187
+ $src = preg_replace('/&ver=([^&]+)/', '', $src);
188
 
189
  $id = md5( $src );
190
 
local-google-fonts.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Local Google Fonts
4
  Description: Host your used Google fonts on your server and make your site GDPR compliant.
5
- Version: 0.17
6
  Author: EverPress
7
  Author URI: https://everpress.co
8
  License: GPLv2 or later
2
  /*
3
  Plugin Name: Local Google Fonts
4
  Description: Host your used Google fonts on your server and make your site GDPR compliant.
5
+ Version: 0.18
6
  Author: EverPress
7
  Author URI: https://everpress.co
8
  License: GPLv2 or later