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

Version Description

  • Auto Detect is now compatible with Newspaper theme.
Download this release

Release Info

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

Code changes from version 3.3.1 to 3.3.2

{css → assets/css}/omgf-admin.css RENAMED
File without changes
{css → assets/css}/omgf-admin.css.map RENAMED
File without changes
{css → assets/css}/omgf-admin.less RENAMED
File without changes
{js → assets/js}/libraries/webfont.js RENAMED
File without changes
{js → assets/js}/omgf-admin.js RENAMED
File without changes
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.3.1
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.3.2
8
  * Author: Daan van den Bergh
9
  * Author URI: https://daan.dev
10
  * License: GPL2v2 or later
includes/admin/class-auto-detect.php CHANGED
@@ -109,11 +109,12 @@ class OMGF_Admin_AutoDetect
109
  * Skip over default Admin WordPress fonts; Noto Serif and Open Sans, which are always detected first (as far as I know.)
110
  * We check on iteration value, to make sure these fonts are still returned if they are also used in the theme.
111
  */
112
- if (($i == 0 && strpos($parts['query'], 'Open+Sans') !== false) || ($i == 0 && strpos($parts['query'], 'Noto+Serif') !== false)) {
 
113
  continue;
114
  }
115
 
116
- parse_str($parts['query'], $font_properties[]);
117
 
118
  /**
119
  * Some themes (like Twenty Sixteen) do chained requests using a pipe (|).
109
  * Skip over default Admin WordPress fonts; Noto Serif and Open Sans, which are always detected first (as far as I know.)
110
  * We check on iteration value, to make sure these fonts are still returned if they are also used in the theme.
111
  */
112
+ if (($i == 0 && strpos($parts['query'], 'Open+Sans') !== false) || ($i == 1 && strpos($parts['query'], 'Noto+Serif') !== false)) {
113
+ $i++;
114
  continue;
115
  }
116
 
117
+ parse_str($parts['query'], $font_properties[$i]);
118
 
119
  /**
120
  * Some themes (like Twenty Sixteen) do chained requests using a pipe (|).
includes/class-admin.php CHANGED
@@ -49,8 +49,8 @@ class OMGF_Admin
49
  public function enqueue_admin_scripts($hook)
50
  {
51
  if ($hook == 'settings_page_optimize-webfonts') {
52
- wp_enqueue_script(self::OMGF_ADMIN_JS_HANDLE, plugin_dir_url(OMGF_PLUGIN_FILE) . 'js/omgf-admin.js', array('jquery'), OMGF_STATIC_VERSION, true);
53
- wp_enqueue_style(self::OMGF_ADMIN_CSS_HANDLE, plugin_dir_url(OMGF_PLUGIN_FILE) . 'css/omgf-admin.css', array(), OMGF_STATIC_VERSION);
54
 
55
  $options = array(
56
  'auto_detect_enabled' => OMGF_AUTO_DETECT_ENABLED,
49
  public function enqueue_admin_scripts($hook)
50
  {
51
  if ($hook == 'settings_page_optimize-webfonts') {
52
+ wp_enqueue_script(self::OMGF_ADMIN_JS_HANDLE, plugin_dir_url(OMGF_PLUGIN_FILE) . 'assets/js/omgf-admin.js', array('jquery'), OMGF_STATIC_VERSION, true);
53
+ wp_enqueue_style(self::OMGF_ADMIN_CSS_HANDLE, plugin_dir_url(OMGF_PLUGIN_FILE) . 'assets/css/omgf-admin.css', array(), OMGF_STATIC_VERSION);
54
 
55
  $options = array(
56
  'auto_detect_enabled' => OMGF_AUTO_DETECT_ENABLED,
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: DaanvandenBergh
3
  Tags: google, fonts, preload, font-display, webfonts, subsets, remove, minimize, external, requests, leverage, browser, cache
4
  Requires at least: 4.6
5
  Tested up to: 5.4
6
- Stable tag: 3.3.1
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -105,6 +105,9 @@ N/A
105
 
106
  == Changelog ==
107
 
 
 
 
108
  = 3.3.1 =
109
  * Use WordPress' tabs system for navigation to comply with Plugin Conventions.
110
  * Fixed bug which caused preload font styles to be saved incorrectly.
3
  Tags: google, fonts, preload, font-display, webfonts, subsets, remove, minimize, external, requests, leverage, browser, cache
4
  Requires at least: 4.6
5
  Tested up to: 5.4
6
+ Stable tag: 3.3.2
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
105
 
106
  == Changelog ==
107
 
108
+ = 3.3.2 =
109
+ * Auto Detect is now compatible with Newspaper theme.
110
+
111
  = 3.3.1 =
112
  * Use WordPress' tabs system for navigation to comply with Plugin Conventions.
113
  * Fixed bug which caused preload font styles to be saved incorrectly.
templates/frontend-web-font-loader.phtml CHANGED
@@ -29,7 +29,7 @@ $families = array_unique(
29
  $omgfStaticVersion = '?ver=' . OMGF_STATIC_VERSION;
30
  $omgfSrcUrl = OMGF_FONTS_URL . '/' . OMGF_FILENAME . (OMGF_REMOVE_VERSION ? null : $omgfStaticVersion);
31
  $wflVersion = '?ver=' . OMGF_WEB_FONT_LOADER_VERSION;
32
- $wflSrcUrl = plugin_dir_url(OMGF_PLUGIN_FILE) . 'js/libraries/webfont.js' . (OMGF_REMOVE_VERSION ? null : $wflVersion);
33
 
34
  if ($fonts && $families): ?>
35
  <script type="text/javascript">
29
  $omgfStaticVersion = '?ver=' . OMGF_STATIC_VERSION;
30
  $omgfSrcUrl = OMGF_FONTS_URL . '/' . OMGF_FILENAME . (OMGF_REMOVE_VERSION ? null : $omgfStaticVersion);
31
  $wflVersion = '?ver=' . OMGF_WEB_FONT_LOADER_VERSION;
32
+ $wflSrcUrl = plugin_dir_url(OMGF_PLUGIN_FILE) . 'assets/js/libraries/webfont.js' . (OMGF_REMOVE_VERSION ? null : $wflVersion);
33
 
34
  if ($fonts && $families): ?>
35
  <script type="text/javascript">