Version Description
Auto-detect is now loaded before 'Remove Google Fonts' and both are loaded absolute last.
Download this release
Release Info
Developer | DaanvandenBergh |
Plugin | OMGF | GDPR/DSVGO Compliant, Faster Google Fonts. Easy. |
Version | 2.2.4 |
Comparing to | |
See all releases |
Code changes from version 2.2.3 to 2.2.4
- host-webfonts-local.php +1 -1
- includes/ajax/class-detect.php +1 -1
- includes/frontend/class-functions.php +4 -4
- readme.txt +4 -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 and leverage browser cache by easily saving Google Fonts to your server and removing the external Google Fonts.
|
7 |
-
* Version: 2.2.
|
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: 2.2.4
|
8 |
* Author: Daan van den Bergh
|
9 |
* Author URI: https://daan.dev
|
10 |
* License: GPL2v2 or later
|
includes/ajax/class-detect.php
CHANGED
@@ -61,7 +61,7 @@ class OMGF_AJAX_Detect
|
|
61 |
*/
|
62 |
if (strpos($font_properties[$i]['family'], '|') !== false) {
|
63 |
$parts_parts = explode('|', $font_properties[$i]['family']);
|
64 |
-
$font_property_subset = $font_properties[$i]['subset'];
|
65 |
|
66 |
foreach ($parts_parts as $part) {
|
67 |
$font_properties[$i]['family'] = $part;
|
61 |
*/
|
62 |
if (strpos($font_properties[$i]['family'], '|') !== false) {
|
63 |
$parts_parts = explode('|', $font_properties[$i]['family']);
|
64 |
+
$font_property_subset = isset($font_properties[$i]['subset']) ? $font_properties[$i]['subset'] : 'latin';
|
65 |
|
66 |
foreach ($parts_parts as $part) {
|
67 |
$font_properties[$i]['family'] = $part;
|
includes/frontend/class-functions.php
CHANGED
@@ -26,11 +26,11 @@ class OMGF_Frontend_Functions
|
|
26 |
public function __construct()
|
27 |
{
|
28 |
// @formatter:off
|
29 |
-
add_action('
|
30 |
-
add_action('wp_print_styles', array($this, '
|
31 |
|
32 |
if (OMGF_AUTO_DETECT_ENABLED) {
|
33 |
-
add_action('
|
34 |
}
|
35 |
|
36 |
if (!OMGF_WEB_FONT_LOADER) {
|
@@ -66,7 +66,7 @@ class OMGF_Frontend_Functions
|
|
66 |
{
|
67 |
if (OMGF_REMOVE_GFONTS == 'on' && !is_admin()) {
|
68 |
// @formatter:off
|
69 |
-
add_action('wp_print_styles', array($this, 'remove_google_fonts'), PHP_INT_MAX);
|
70 |
// Theme: Enfold
|
71 |
add_filter('avf_output_google_webfonts_script', function() { return false; });
|
72 |
// @formatter:on
|
26 |
public function __construct()
|
27 |
{
|
28 |
// @formatter:off
|
29 |
+
add_action('wp_print_styles', array($this, 'is_remove_google_fonts_enabled'), PHP_INT_MAX - 1000);
|
30 |
+
add_action('wp_print_styles', array($this, 'enqueue_stylesheet'), PHP_INT_MAX);
|
31 |
|
32 |
if (OMGF_AUTO_DETECT_ENABLED) {
|
33 |
+
add_action('wp_print_styles', array($this, 'auto_detect_fonts'), PHP_INT_MAX - 10000);
|
34 |
}
|
35 |
|
36 |
if (!OMGF_WEB_FONT_LOADER) {
|
66 |
{
|
67 |
if (OMGF_REMOVE_GFONTS == 'on' && !is_admin()) {
|
68 |
// @formatter:off
|
69 |
+
add_action('wp_print_styles', array($this, 'remove_google_fonts'), PHP_INT_MAX - 500);
|
70 |
// Theme: Enfold
|
71 |
add_filter('avf_output_google_webfonts_script', function() { return false; });
|
72 |
// @formatter:on
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://daan.dev/donate/
|
|
4 |
Tags: google, fonts, host, save, local, locally, webfonts, update, minimize, external, requests, leverage, browser, cache
|
5 |
Requires at least: 4.6
|
6 |
Tested up to: 5.3
|
7 |
-
Stable tag: 2.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -115,6 +115,9 @@ N/A
|
|
115 |
|
116 |
== Changelog ==
|
117 |
|
|
|
|
|
|
|
118 |
= 2.2.3 =
|
119 |
Improved UX for error message when Auto-detect doesn't work properly.
|
120 |
|
4 |
Tags: google, fonts, host, save, local, locally, webfonts, update, minimize, external, requests, leverage, browser, cache
|
5 |
Requires at least: 4.6
|
6 |
Tested up to: 5.3
|
7 |
+
Stable tag: 2.2.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
115 |
|
116 |
== Changelog ==
|
117 |
|
118 |
+
= 2.2.4 =
|
119 |
+
Auto-detect is now loaded before 'Remove Google Fonts' and both are loaded absolute last.
|
120 |
+
|
121 |
= 2.2.3 =
|
122 |
Improved UX for error message when Auto-detect doesn't work properly.
|
123 |
|