Version Description
| October 18th, 2021 = * Enhancement: API now cleans up excessive spacing and + symbols in requests before fetching fonts. This comes in handy when e.g. @import statements in CSS stylesheets are auto-formatted by IDEs. * Fix: API would crash when Google Fonts request turned up empty. * Fix: Added proper error handling for when downloading fonts failed. * Doc: Added link to Troubleshooting Guide to Help tab.
Download this release
Release Info
Developer | DaanvandenBergh |
Plugin | OMGF | GDPR/DSVGO Compliant, Faster Google Fonts. Easy. |
Version | 4.5.10 |
Comparing to | |
See all releases |
Code changes from version 4.5.9 to 4.5.10
- host-webfonts-local.php +1 -1
- includes/admin/settings/class-help.php +8 -7
- includes/api/class-download.php +11 -6
- includes/class-admin.php +2 -4
- includes/optimization-mode/class-manual.php +19 -4
- readme.txt +11 -403
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.5.
|
8 |
* Author: Daan from FFW.Press
|
9 |
* Author URI: https://ffw.press
|
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.5.10
|
8 |
* Author: Daan from FFW.Press
|
9 |
* Author URI: https://ffw.press
|
10 |
* License: GPL2v2 or later
|
includes/admin/settings/class-help.php
CHANGED
@@ -36,13 +36,13 @@ class OMGF_Admin_Settings_Help extends OMGF_Admin_Settings_Builder
|
|
36 |
public function do_content()
|
37 |
{
|
38 |
$utmTags = '?utm_source=omgf&utm_medium=plugin&utm_campaign=support_tab';
|
39 |
-
$tweetUrl = "https://twitter.com/intent/tweet?text=I+am+using+
|
40 |
?>
|
41 |
<div class="welcome-panel">
|
42 |
<div class="welcome-panel-content">
|
43 |
-
<h2><?= __('Thank you for using
|
44 |
<p class="about-description">
|
45 |
-
<?= __('Need help configuring
|
46 |
</p>
|
47 |
<div class="welcome-panel-column-container">
|
48 |
<div class="welcome-panel-column">
|
@@ -50,16 +50,17 @@ class OMGF_Admin_Settings_Help extends OMGF_Admin_Settings_Builder
|
|
50 |
<?php _e('Need Help?', $this->plugin_text_domain); ?>
|
51 |
</h3>
|
52 |
<ul>
|
53 |
-
<li><a class="welcome-icon dashicons-controls-
|
54 |
<li><a class="welcome-icon dashicons-text-page" target="_blank" href="<?= apply_filters('omgf_settings_sidebar_user_manual', 'https://ffw.press/docs/omgf-pro/user-manual/'); ?>"><?= __('User Manual', $this->plugin_text_domain); ?></a></li>
|
55 |
<li><a class="welcome-icon dashicons-editor-help" target="_blank" href="<?= apply_filters('omgf_settings_sidebar_faq_link', 'https://wordpress.org/plugins/host-webfonts-local/#description'); ?>"><?= __('FAQ', $this->plugin_text_domain); ?></a></li>
|
56 |
-
<li><a class="welcome-icon dashicons-
|
|
|
57 |
</ul>
|
58 |
</div>
|
59 |
<div class="welcome-panel-column">
|
60 |
-
<h3><?= __('Support
|
61 |
<ul>
|
62 |
-
<li><a class="welcome-icon dashicons-star-filled" target="_blank" href="https://wordpress.org/support/plugin/host-webfonts-local/reviews/?rate=5#new-post"><?= __('Write a 5-star Review or,', $this->plugin_text_domain); ?></a></li>
|
63 |
<li><a class="welcome-icon dashicons-twitter" target="_blank" href="<?= $tweetUrl; ?>"><?= __('Tweet about it!', $this->plugin_text_domain); ?></a></li>
|
64 |
</ul>
|
65 |
</div>
|
36 |
public function do_content()
|
37 |
{
|
38 |
$utmTags = '?utm_source=omgf&utm_medium=plugin&utm_campaign=support_tab';
|
39 |
+
$tweetUrl = sprintf("https://twitter.com/intent/tweet?text=I+am+using+%s+to+speed+up+Google+Fonts+for+@WordPress!+Try+it+for+yourself:&via=Dan0sz&hashtags=GoogleFonts,WordPress,Pagespeed,Insights&url=%s", str_replace(' ', '+', apply_filters('omgf_settings_page_title', 'OMGF')), apply_filters('omgf_help_tab_plugin_url', 'https://wordpress.org/plugins/host-webfonts-local/'));
|
40 |
?>
|
41 |
<div class="welcome-panel">
|
42 |
<div class="welcome-panel-content">
|
43 |
+
<h2><?= sprintf(__('Thank you for using %s!', $this->plugin_text_domain), apply_filters('omgf_settings_page_title', 'OMGF')); ?></h2>
|
44 |
<p class="about-description">
|
45 |
+
<?= sprintf(__('Need help configuring %s? Please refer to the links below to get you started.', $this->plugin_text_domain), apply_filters('omgf_settings_page_title', 'OMGF')); ?>
|
46 |
</p>
|
47 |
<div class="welcome-panel-column-container">
|
48 |
<div class="welcome-panel-column">
|
50 |
<?php _e('Need Help?', $this->plugin_text_domain); ?>
|
51 |
</h3>
|
52 |
<ul>
|
53 |
+
<li><a class="welcome-icon dashicons-controls-forward" target="_blank" href="<?= apply_filters('omgf_settings_sidebar_quick_start', 'https://ffw.press/docs/omgf-pro/quick-start/'); ?>"><?= __('Quick Start Guide', $this->plugin_text_domain); ?></a></li>
|
54 |
<li><a class="welcome-icon dashicons-text-page" target="_blank" href="<?= apply_filters('omgf_settings_sidebar_user_manual', 'https://ffw.press/docs/omgf-pro/user-manual/'); ?>"><?= __('User Manual', $this->plugin_text_domain); ?></a></li>
|
55 |
<li><a class="welcome-icon dashicons-editor-help" target="_blank" href="<?= apply_filters('omgf_settings_sidebar_faq_link', 'https://wordpress.org/plugins/host-webfonts-local/#description'); ?>"><?= __('FAQ', $this->plugin_text_domain); ?></a></li>
|
56 |
+
<li><a class="welcome-icon dashicons-sos" target="_blank" href="<?= apply_filters('omgf_settings_sidebar_troubleshooting_link', 'https://ffw.press/docs/omgf-pro/troubleshooting/'); ?>"><?= __('Troubleshooting Guide', $this->plugin_text_domain); ?></a></li>
|
57 |
+
<li><a class="welcome-icon dashicons-email" target="_blank" href="<?= apply_filters('omgf_settings_sidebar_get_support_link', 'https://wordpress.org/support/plugin/host-webfonts-local/#new-post'); ?>"><?= __('Get Support', $this->plugin_text_domain); ?></a></li>
|
58 |
</ul>
|
59 |
</div>
|
60 |
<div class="welcome-panel-column">
|
61 |
+
<h3><?= sprintf(__('Support %s & Spread the Word!', $this->plugin_text_domain), apply_filters('omgf_settings_page_title', 'OMGF')); ?></h3>
|
62 |
<ul>
|
63 |
+
<li><a class="welcome-icon dashicons-star-filled" target="_blank" href="<?= apply_filters('omgf_help_tab_review_link', 'https://wordpress.org/support/plugin/host-webfonts-local/reviews/?rate=5#new-post'); ?>"><?= __('Write a 5-star Review or,', $this->plugin_text_domain); ?></a></li>
|
64 |
<li><a class="welcome-icon dashicons-twitter" target="_blank" href="<?= $tweetUrl; ?>"><?= __('Tweet about it!', $this->plugin_text_domain); ?></a></li>
|
65 |
</ul>
|
66 |
</div>
|
includes/api/class-download.php
CHANGED
@@ -87,7 +87,7 @@ class OMGF_API_Download extends WP_REST_Controller
|
|
87 |
}
|
88 |
|
89 |
/**
|
90 |
-
* @param $request
|
91 |
*/
|
92 |
public function process($request)
|
93 |
{
|
@@ -115,7 +115,7 @@ class OMGF_API_Download extends WP_REST_Controller
|
|
115 |
$fonts = array_filter($fonts);
|
116 |
|
117 |
if (empty($fonts)) {
|
118 |
-
|
119 |
}
|
120 |
|
121 |
foreach ($fonts as $font_key => &$font) {
|
@@ -251,10 +251,15 @@ class OMGF_API_Download extends WP_REST_Controller
|
|
251 |
*/
|
252 |
private function grab_font_family($font_family, $query)
|
253 |
{
|
254 |
-
$url
|
255 |
-
|
256 |
list($family) = explode(':', $font_family);
|
257 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
|
259 |
/**
|
260 |
* Add fonts to the request's $_GET 'family' parameter. Then pass an array to 'omgf_alternate_fonts'
|
@@ -295,7 +300,7 @@ class OMGF_API_Download extends WP_REST_Controller
|
|
295 |
$font_family = str_replace('-', ' ', $family);
|
296 |
$error_body = wp_remote_retrieve_body($response);
|
297 |
$error_message = wp_remote_retrieve_response_message($response);
|
298 |
-
$message = sprintf(__('OMGF
|
299 |
|
300 |
OMGF_Admin_Notice::set_notice($message, 'omgf_api_error', false, 'error');
|
301 |
|
87 |
}
|
88 |
|
89 |
/**
|
90 |
+
* @param WP_REST_Request $request
|
91 |
*/
|
92 |
public function process($request)
|
93 |
{
|
115 |
$fonts = array_filter($fonts);
|
116 |
|
117 |
if (empty($fonts)) {
|
118 |
+
return;
|
119 |
}
|
120 |
|
121 |
foreach ($fonts as $font_key => &$font) {
|
251 |
*/
|
252 |
private function grab_font_family($font_family, $query)
|
253 |
{
|
254 |
+
$url = $this->get_working_service_url();
|
|
|
255 |
list($family) = explode(':', $font_family);
|
256 |
+
|
257 |
+
/**
|
258 |
+
* Replace multiple spaces or plus signs (or a combination of, with a single dash)
|
259 |
+
*
|
260 |
+
* @since v4.5.10
|
261 |
+
*/
|
262 |
+
$family = strtolower(preg_replace("/[\s\+]+/", '-', $family));
|
263 |
|
264 |
/**
|
265 |
* Add fonts to the request's $_GET 'family' parameter. Then pass an array to 'omgf_alternate_fonts'
|
300 |
$font_family = str_replace('-', ' ', $family);
|
301 |
$error_body = wp_remote_retrieve_body($response);
|
302 |
$error_message = wp_remote_retrieve_response_message($response);
|
303 |
+
$message = sprintf(__('OMGF couldn\'t find <strong>%s</strong>. The API returned the following error: %s.', $this->plugin_text_domain), ucwords($font_family), $error_message);
|
304 |
|
305 |
OMGF_Admin_Notice::set_notice($message, 'omgf_api_error', false, 'error');
|
306 |
|
includes/class-admin.php
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
<?php
|
|
|
|
|
2 |
/* * * * * * * * * * * * * * * * * * * * *
|
3 |
*
|
4 |
* ██████╗ ███╗ ███╗ ██████╗ ███████╗
|
@@ -14,10 +16,6 @@
|
|
14 |
* @url : https://daan.dev
|
15 |
* * * * * * * * * * * * * * * * * * * */
|
16 |
|
17 |
-
use function PHPSTORM_META\map;
|
18 |
-
|
19 |
-
defined('ABSPATH') || exit;
|
20 |
-
|
21 |
class OMGF_Admin
|
22 |
{
|
23 |
const OMGF_ADMIN_JS_HANDLE = 'omgf-admin-js';
|
1 |
<?php
|
2 |
+
defined('ABSPATH') || exit;
|
3 |
+
|
4 |
/* * * * * * * * * * * * * * * * * * * * *
|
5 |
*
|
6 |
* ██████╗ ███╗ ███╗ ██████╗ ███████╗
|
16 |
* @url : https://daan.dev
|
17 |
* * * * * * * * * * * * * * * * * * * */
|
18 |
|
|
|
|
|
|
|
|
|
19 |
class OMGF_Admin
|
20 |
{
|
21 |
const OMGF_ADMIN_JS_HANDLE = 'omgf-admin-js';
|
includes/optimization-mode/class-manual.php
CHANGED
@@ -74,7 +74,8 @@ class OMGF_OptimizationMode_Manual
|
|
74 |
|
75 |
$download = $this->do_rest_request($url);
|
76 |
|
77 |
-
|
|
|
78 |
$this->download_failed($download);
|
79 |
|
80 |
$error = true;
|
@@ -142,7 +143,9 @@ class OMGF_OptimizationMode_Manual
|
|
142 |
}
|
143 |
|
144 |
/**
|
|
|
145 |
*
|
|
|
146 |
*/
|
147 |
private function do_rest_request($url)
|
148 |
{
|
@@ -179,7 +182,7 @@ class OMGF_OptimizationMode_Manual
|
|
179 |
}
|
180 |
|
181 |
/**
|
182 |
-
* @param $response
|
183 |
*/
|
184 |
private function download_failed($response)
|
185 |
{
|
@@ -229,11 +232,17 @@ class OMGF_OptimizationMode_Manual
|
|
229 |
}
|
230 |
|
231 |
/**
|
232 |
-
* @param
|
|
|
233 |
* @return int|string
|
234 |
*/
|
235 |
private function get_error_code($response)
|
236 |
{
|
|
|
|
|
|
|
|
|
|
|
237 |
if (is_wp_error($response)) {
|
238 |
return $response->get_error_code();
|
239 |
}
|
@@ -242,11 +251,17 @@ class OMGF_OptimizationMode_Manual
|
|
242 |
}
|
243 |
|
244 |
/**
|
245 |
-
* @param
|
|
|
246 |
* @return int|string
|
247 |
*/
|
248 |
private function get_error_message($response)
|
249 |
{
|
|
|
|
|
|
|
|
|
|
|
250 |
if (is_wp_error($response)) {
|
251 |
return $response->get_error_message();
|
252 |
}
|
74 |
|
75 |
$download = $this->do_rest_request($url);
|
76 |
|
77 |
+
/** @var WP_REST_Response $download */
|
78 |
+
if ($download->is_error()) {
|
79 |
$this->download_failed($download);
|
80 |
|
81 |
$error = true;
|
143 |
}
|
144 |
|
145 |
/**
|
146 |
+
* @param string $url
|
147 |
*
|
148 |
+
* @return WP_REST_Response
|
149 |
*/
|
150 |
private function do_rest_request($url)
|
151 |
{
|
182 |
}
|
183 |
|
184 |
/**
|
185 |
+
* @param $response WP_REST_Response
|
186 |
*/
|
187 |
private function download_failed($response)
|
188 |
{
|
232 |
}
|
233 |
|
234 |
/**
|
235 |
+
* @param WP_REST_Response|WP_Error|array $response
|
236 |
+
*
|
237 |
* @return int|string
|
238 |
*/
|
239 |
private function get_error_code($response)
|
240 |
{
|
241 |
+
if ($response instanceof WP_REST_Response && $response->is_error()) {
|
242 |
+
// Convert to WP_Error if WP_REST_Response
|
243 |
+
$response = $response->as_error();
|
244 |
+
}
|
245 |
+
|
246 |
if (is_wp_error($response)) {
|
247 |
return $response->get_error_code();
|
248 |
}
|
251 |
}
|
252 |
|
253 |
/**
|
254 |
+
* @param WP_REST_Response|WP_Error|array $response
|
255 |
+
*
|
256 |
* @return int|string
|
257 |
*/
|
258 |
private function get_error_message($response)
|
259 |
{
|
260 |
+
if ($response instanceof WP_REST_Response && $response->is_error()) {
|
261 |
+
// Convert to WP_Error if WP_REST_Response
|
262 |
+
$response = $response->as_error();
|
263 |
+
}
|
264 |
+
|
265 |
if (is_wp_error($response)) {
|
266 |
return $response->get_error_message();
|
267 |
}
|
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.8
|
6 |
-
Stable tag: 4.5.
|
7 |
Requires PHP: 7.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -70,54 +70,7 @@ For a more comprehensive guide on configuring OMGF, check out the [user manual](
|
|
70 |
|
71 |
== Frequently Asked Questions ==
|
72 |
|
73 |
-
|
74 |
-
|
75 |
-
Of course :) But first calm down and read the [user manual](https://ffw.press/docs/omgf-pro/user-manual/). If you have any questions afterwards, visit the [Support Forum](https://wordpress.org/support/plugin/host-webfonts-local).
|
76 |
-
|
77 |
-
= I have another file I want to host locally. Could you make a plugin? =
|
78 |
-
|
79 |
-
I already have my hands full with the plugins I maintain, so no. If you're looking for a way to host analytics.js locally; please install [CAOS](https://wordpress.org/plugins/host-analyticsjs-local/). For anything else, please follow the steps in [this how-to](https://daan.dev/how-to/host-js-locally-crontab/).
|
80 |
-
|
81 |
-
= How come my font isn't available in OMGF? =
|
82 |
-
|
83 |
-
This could be for several reasons:
|
84 |
-
1. Have you checked if your font is available on Google Fonts?
|
85 |
-
2. Is your font listed as an open source font, or is it a premium font? For obvious reasons, OMGF only has access to open source fonts.
|
86 |
-
3. Your font's name was changed, if so, please send in a support ticket, so we can figure out the new name and I can add support for it to OMGF.
|
87 |
-
|
88 |
-
= Does this plugin remove resource hints, e.g. preconnect, preload or dns-prefetch? =
|
89 |
-
|
90 |
-
No, to automatically remove resource hints pointing to fonts.googleapis.com or fonts.gstatic.com, [upgrade to OMGF Pro](https://ffw.press/wordpress/omgf-pro/).
|
91 |
-
|
92 |
-
= Can I serve the fonts from my CDN? =
|
93 |
-
|
94 |
-
Yes, using the Fonts Source URL (Pro) feature, you can modify the source of the stylesheet and fonts to be served from your CDN. [Upgrade to OMGF Pro](https://ffw.press/wordpress/omgf-pro/).
|
95 |
-
|
96 |
-
= I have Google Fonts Processing set to Replace/Remove but the fonts from fonts.gstatic.com|fonts.googleapis.com are still loaded. What's going on? =
|
97 |
-
|
98 |
-
The free version of OMGF removes any fonts that are loaded in the conventional way: wp_enqueue_scripts(). If it doesn't work for you, you're theme or plugins using other methods to load Google Fonts, e.g. in the footer, WebFont Loader, etc. [Upgrade to OMGF Pro](https://ffw.press/wordpress/omgf-pro/) to automatically replace these fonts with a locally hosted version.
|
99 |
-
|
100 |
-
= Does this plugin edit template files? =
|
101 |
-
|
102 |
-
No, it does not. It creates a CSS Stylesheet which will be automatically added to your theme's header using WordPress built-in queueing system.
|
103 |
-
|
104 |
-
= The stylesheet isn't loaded? What's going on? =
|
105 |
-
|
106 |
-
The free version of OMGF enqueues the stylesheet into WordPress' head using wp_enqueue_scripts(). If the stylesheet isn't loaded, this probably means your theme isn't implementing wp_head() correctly. [Upgrade to OMGF Pro](https://ffw.press/wordpress/omgf-pro/) to automatically add the stylesheet into WordPress' head.
|
107 |
-
|
108 |
-
= Does this plugin support Multi Site? I'm getting CORS errors! =
|
109 |
-
|
110 |
-
Yes, it does. When using subdomains, however, you might run into CORS related issues. To get around this, you should configure each site separately. Do the following:
|
111 |
-
|
112 |
-
- Go to the site's own dashboard,
|
113 |
-
- Change OMGF's cache directory (*Save font files to...*) to something unique, e.g. `/uploads/site1/omgf`,
|
114 |
-
- Click 'Save Changes'.
|
115 |
-
|
116 |
-
Repeat this for every site you want to use with OMGF. A new stylesheet, using the corresponding site's Home-URL and cache directory for each font, will be generated. Bypassing any Cross-Origin Resource Sharing (CORS) issues you might run into.
|
117 |
-
|
118 |
-
= Is this plugin compatible with WPML? =
|
119 |
-
|
120 |
-
No, not yet. But I will definitely try to make it compatible in the future!
|
121 |
|
122 |
== Screenshots ==
|
123 |
|
@@ -128,6 +81,12 @@ No, not yet. But I will definitely try to make it compatible in the future!
|
|
128 |
|
129 |
== Changelog ==
|
130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
= 4.5.9 | October 5th, 2021 =
|
132 |
* Fix: content_url() should always be encoded, also if file already exists.
|
133 |
* Enhancement: If stylesheet is already generated, stop execution to decrease API request time.
|
@@ -326,128 +285,7 @@ No, not yet. But I will definitely try to make it compatible in the future!
|
|
326 |
* Removed 'Remove Version Parameter' option, because it has become obsolete. The new detection method uses the initial script's version, if set.
|
327 |
* Font Preloading is temporarily removed and will be re-introduced (in a different form, along with new features) in a later release.
|
328 |
|
329 |
-
|
330 |
-
* Performance improvements for Class autoloader.
|
331 |
-
|
332 |
-
= 3.8.2 =
|
333 |
-
* Fixed notice: invalid operand type.
|
334 |
-
|
335 |
-
= 3.8.1 | August 27th, 2020 =
|
336 |
-
* Bugfix: if Auto Remove was enabled, but no stylesheet was yet generated, this would break some themes' stylesheet.
|
337 |
-
|
338 |
-
= 3.8.0 | August 16th, 2020 =
|
339 |
-
* Tested with WP 5.5.
|
340 |
-
* Cleaned up the sidebar.
|
341 |
-
* Improved re-enqueueing of stylesheets, if a stylesheet depends on the removed Google Font stylesheet.
|
342 |
-
* Pressing Enter in the Search Bar triggers search now.
|
343 |
-
* Developers can now easily add functionalities to OMGF's brand new Extensions tab, using several new filters and actions.
|
344 |
-
* If OMGF is used along with other Fast FW Press plugins (e.g. CAOS, OMGF Pro, etc.) the same class loader is used, significantly increasing performance.
|
345 |
-
* Added dates to changelog :)
|
346 |
-
|
347 |
-
= 3.7.0 | June 10th, 2020 =
|
348 |
-
* OMGF settings screen is now easily extendable: added filters, actions, etc.
|
349 |
-
* Overall performance improvements and reduced code footprint.
|
350 |
-
|
351 |
-
= 3.6.2 | June 7th, 2020 =
|
352 |
-
* Added filter so Auto Remove can be disabled by other plugins (OMGF Pro, in this case.)
|
353 |
-
|
354 |
-
= 3.6.1 =
|
355 |
-
* Fixed bug in Auto Detect where duplicate fonts would override the earlier detected font styles. Newer styles are now appended to the list.
|
356 |
-
* Added multiple filters and action hooks to prepare OMGF for the release of OMGF Pro.
|
357 |
-
* Removed the code to detect incompatible themes/plugins, because an upgrade to OMGF Pro will solve all of your problems :)
|
358 |
-
* *OMGF Pro is able to detect, replace and remove all Google Fonts (incl. WebFont Loader) regardless of how they are added by the theme or plugin, incl. dns prefetch, preconnect and preload resource hint headers.*
|
359 |
-
|
360 |
-
= 3.6.0 | May 30th, 2020 =
|
361 |
-
* OMGF now supports add-ons to extend its Auto Detect and Auto Removal feature.
|
362 |
-
* From now on, a notice containing a link to the required add-on will be thrown for known themes and frameworks which follow unconventional methods to include Google Fonts.
|
363 |
-
* This list now contains Thrive Themes and Redux Framework, but other themes (I'm researching Avada) will be added in the near future.
|
364 |
-
* Generated stylesheets and downloaded fonts are now be saved to the 'uploads/omgf' folder by default.
|
365 |
-
|
366 |
-
= 3.5.0 | May 24th, 2020 =
|
367 |
-
* Added Force SSL option, to force the usage of SSL while generating the stylesheet.
|
368 |
-
* Added WP Rocket to list of Evil Plugins, because it empties the entire wp-content/cache folder instead of just its own files.
|
369 |
-
|
370 |
-
= 3.4.5 | May 21st, 2020 =
|
371 |
-
* Preload path should include absolute url, instead of relative, to prevent issues with CDN usage.
|
372 |
-
|
373 |
-
= 3.4.4 =
|
374 |
-
* OMGF is now loaded inline with other plugins, not last. And,
|
375 |
-
* only Auto Detect is now triggered (if enabled) after all other plugins are loaded.
|
376 |
-
* An 'Evil Cache Plugin' warning is now thrown, when OMGF is activated and one of the Evil Cache Plugins are installed, prompting the user to move the webfonts-folder **outside** of the `wp-content/cache` folder.
|
377 |
-
* 'Evil Cache Plugins' aren't necessarily evil. They just empty the entire cache folder (include OMGF's fonts) when a cache flush is triggered.
|
378 |
-
* Fixed bug where Pre Update functions weren't triggered anymore, e.g. move fonts after cache path change.
|
379 |
-
* Minor code optimizations/clean up.
|
380 |
-
|
381 |
-
= 3.4.3 =
|
382 |
-
* Better error handling for Auto Detect.
|
383 |
-
* Increased performance in admin area.
|
384 |
-
|
385 |
-
= 3.4.2 =
|
386 |
-
* OMGF now returns a readable error if Auto Detect detects a misformatted fonts URL.
|
387 |
-
|
388 |
-
= 3.4.1 =
|
389 |
-
* 'Optimize fonts for logged in users?' should be on by default, cause it causes to much confusion.
|
390 |
-
* Fixed bug where Auto Detect would fail if no font styles were specified in the Google Font URL.
|
391 |
-
|
392 |
-
= 3.4.0 | May 4th, 2020 =
|
393 |
-
* Added 'Downloaded' indicator in 'Generate Stylesheet' tab.
|
394 |
-
* Added 'Also optimize fonts for logged in users?' option. This means that all users with editor
|
395 |
-
capabilities will (from now on) only view the optimizations when this option is checked, or when
|
396 |
-
they view the frontend of the website in a private/incognito browser session.
|
397 |
-
|
398 |
-
= 3.3.6 =
|
399 |
-
* Modified preload feature to comply with Mozilla's regulations for the crossorigin attribute.
|
400 |
-
|
401 |
-
= 3.3.5 =
|
402 |
-
* Minor bug and usability fixes.
|
403 |
-
|
404 |
-
= 3.3.4 =
|
405 |
-
* Fixed bug in preload.
|
406 |
-
|
407 |
-
= 3.3.3 =
|
408 |
-
* Added error handling for API-calls.
|
409 |
-
|
410 |
-
= 3.3.2 =
|
411 |
-
* Auto Detect is now compatible with Newspaper theme.
|
412 |
-
|
413 |
-
= 3.3.1 =
|
414 |
-
* Use WordPress' tabs system for navigation to comply with Plugin Conventions.
|
415 |
-
* Fixed bug which caused preload font styles to be saved incorrectly.
|
416 |
-
* Replaced separate apply buttons with one apply button, which handles the entire queue for removal as well as preload at once.
|
417 |
-
* Known bug: 'Apply' button isn't clickable when sticky. Available workaround: scroll to the bottom of the list and click 'Apply'.
|
418 |
-
|
419 |
-
= 3.3.0 | March 25th, 2020 =
|
420 |
-
* Introduced a queueing system for font-styles search, preload and remove for easier management. The 'Apply' buttons now process all your changes at once.
|
421 |
-
* The 'Apply' buttons are sticky, so they're visible for long lists.
|
422 |
-
|
423 |
-
= 3.2.1 =
|
424 |
-
* Fixes in responsiveness of admin screen.
|
425 |
-
* Fixed links in Quick Start and Support block.
|
426 |
-
|
427 |
-
= 3.2.0 | March 24th, 2020 =
|
428 |
-
* Fonts are now automatically updated and font files and stylesheet are automatically moved after the 'Serve fonts from...' or 'Save fonts to...' options are changed.
|
429 |
-
* Added several reminder notices to improve UX and reduce the level of complexity.
|
430 |
-
* Notices/warnings/errors are now grouped.
|
431 |
-
|
432 |
-
= 3.1.3 =
|
433 |
-
* Added toggleable navigation menu. Made it a bit more UX friendly.
|
434 |
-
* Enhanced search and auto-detect: search results of one, are now appended to the result of the other. Also, duplicate search queries are now filtered, so they will not return duplicate subset results.
|
435 |
-
|
436 |
-
= 3.1.2 =
|
437 |
-
* Comma-separated search now works better (supports ',' as well as ', ')
|
438 |
-
* Search results are now added to the old subsets results. Allowing for more flexible search.
|
439 |
-
|
440 |
-
= 3.1.1 =
|
441 |
-
* Fixed bug in Web Font Loader.
|
442 |
-
* Fixed bug where sometimes stylesheet would still be enqueued, even though the file didn't exist.
|
443 |
-
|
444 |
-
= 3.1.0 | March 21st, 2020 =
|
445 |
-
* OMGF can now rewrite the URI from where fonts are served using the 'Serve webfonts from...' setting. This is particularly useful when using seurity through obscurity plugins (e.g. WP Hide.)
|
446 |
-
* Fixed bug where clicking 'save changes' would remove listed fonts and subsets.
|
447 |
-
* Gave some settings more accurate descriptions.
|
448 |
-
|
449 |
-
= 3.0.1 =
|
450 |
-
* [BUGFIX] Passing glue string after array is deprecated. Swap the parameters.
|
451 |
|
452 |
= 3.0.0 =
|
453 |
*OMGF - CORONA EDITION*
|
@@ -462,242 +300,12 @@ No, not yet. But I will definitely try to make it compatible in the future!
|
|
462 |
* Search now works bug free.
|
463 |
* WordPress' default admin fonts no longer show up as results.
|
464 |
|
465 |
-
|
466 |
-
Updated Welcome-panel with Fast FW Press-services.
|
467 |
-
Preload can now be used for certain fonts only (also combined with Web Font Loader).
|
468 |
-
|
469 |
-
= 2.4.1 =
|
470 |
-
Filenames are now rewritten to be more informative and for easier debugging.
|
471 |
-
|
472 |
-
= 2.4.0 =
|
473 |
-
Added option to use relative URLs in the generated stylesheet.
|
474 |
-
|
475 |
-
= 2.3.0 =
|
476 |
-
Added experimental enqueue order option.
|
477 |
-
|
478 |
-
= 2.2.9 =
|
479 |
-
Fixed bug that would throw excessive notices if PHP logging is enabled.
|
480 |
-
fonts.css was loaded too late, so some minification plugins couldn't capture it.
|
481 |
-
|
482 |
-
= 2.2.8 =
|
483 |
-
Throw clear error if any of the new tables don't exist. To prevent confusion.
|
484 |
-
|
485 |
-
= 2.2.7 =
|
486 |
-
Forget to up static version after changes to Admin JS files.
|
487 |
-
|
488 |
-
= 2.2.6 =
|
489 |
-
Throw errors less aggressive.
|
490 |
-
|
491 |
-
= 2.2.5 =
|
492 |
-
Improved overall error handling for Auto Detect and downloading using cURL.
|
493 |
-
|
494 |
-
= 2.2.4 =
|
495 |
-
Auto-detect is now loaded before 'Remove Google Fonts' and both are loaded absolute last.
|
496 |
-
|
497 |
-
= 2.2.3 =
|
498 |
-
Improved UX for error message when Auto-detect doesn't work properly.
|
499 |
-
|
500 |
-
= 2.2.2 =
|
501 |
-
Added long overdue migration script for options and tables. Code optimizations.
|
502 |
-
|
503 |
-
= 2.2.1 =
|
504 |
-
wp-block-editor style is now ignored when detecting stylesheets that depend on Google Fonts, when the remove function is enabled.
|
505 |
-
|
506 |
-
= 2.2.0 =
|
507 |
-
Added uninstall script.
|
508 |
-
|
509 |
-
= 2.1.6 =
|
510 |
-
Fixed bug where tables weren't created upon installation. Moved logic to plugin activation, instead of 'plugins_loaded'.
|
511 |
-
|
512 |
-
= 2.1.5 =
|
513 |
-
No new features or bugfixes. Just a re-arrangement of the support tab to be more in line with the new feature set.
|
514 |
-
|
515 |
-
= 2.1.4 =
|
516 |
-
Code clean-up in Generate-script. Improved error-handling.
|
517 |
-
|
518 |
-
= 2.1.3 =
|
519 |
-
Added error handling for when certain URLs return 'undefined' from Google Fonts API. Auto-detect now loads detected fonts immediately after settings page refresh. Code optimizations.
|
520 |
-
|
521 |
-
= 2.1.2 =
|
522 |
-
Added compatibility for (more efficient) chained requests to Google Fonts (separated by a pipe (|)) to the Auto-detect feature. Some themes (like Twenty Sixteen) use this feature.
|
523 |
-
|
524 |
-
= 2.1.1 =
|
525 |
-
Bugfix where Auto-detect would retrieve the fonts used by WordPress' Administrator area, instead of the frontend.
|
526 |
-
|
527 |
-
= 2.1.0 =
|
528 |
-
Complete overhaul of code. Major performance upgrades. Added Auto-detect feature.
|
529 |
-
|
530 |
-
= 2.0.8 =
|
531 |
-
Fixed 400-error when re-downloading fonts. Added compatibility for Enfold-theme.
|
532 |
-
|
533 |
-
= 2.0.6 =
|
534 |
-
Fixed bug with include paths.
|
535 |
-
|
536 |
-
= 2.0.5 =
|
537 |
-
OMGF now retries downloading the fonts using fopen, if the cURL attempt failed. Code improvements.
|
538 |
-
|
539 |
-
= 2.0.4 =
|
540 |
-
Further improvements for downloading of analytics.js.
|
541 |
-
|
542 |
-
= 2.0.3 =
|
543 |
-
Tested with WP 5.3 and replaced `fopen()` with cUrl to make OMGF compatible with servers that have `allow_url_fopen` disabled.
|
544 |
-
|
545 |
-
= 2.0.2 =
|
546 |
-
Added error handling to DownloadFonts-script.
|
547 |
-
|
548 |
-
= 2.0.1 =
|
549 |
-
Using Typekit's Web Font Loader only uses 1 SQL query in the frontend now, regardless of how many fonts you use.
|
550 |
|
551 |
= 2.0.0 =
|
552 |
Added Typekit's Web Font Loader to allow loading fonts asynchronously.
|
553 |
|
554 |
-
|
555 |
-
Fixed bug where a few strings couldn't be translated. Improved responsiveness of settings-screen. Minor re-factor for better structure.
|
556 |
-
|
557 |
-
= 1.9.10 =
|
558 |
-
[Urgent] Errors in some translation strings.
|
559 |
-
|
560 |
-
= 1.9.9 =
|
561 |
-
Fixed 'duplicate column'-error when WP_DEBUG was enabled. Fixed bug which broke preload. Preload is now automatically skipped if you have any CSS optimization plugins enabled.
|
562 |
-
|
563 |
-
= 1.9.8 =
|
564 |
-
Updated Multisite documentation.
|
565 |
-
|
566 |
-
= 1.9.7 =
|
567 |
-
Updated documentation.
|
568 |
-
|
569 |
-
= 1.9.6 =
|
570 |
-
Fixed bug where preload would cause issues.
|
571 |
-
|
572 |
-
= 1.9.5 =
|
573 |
-
'Remove Google Fonts'-options now re-enqueues styles that were dependent on removed Fonts.
|
574 |
-
|
575 |
-
= 1.9.4 =
|
576 |
-
Small improvement to 'Remove Google Fonts'-option.
|
577 |
-
|
578 |
-
= 1.9.2 =
|
579 |
-
Made all strings translatable.
|
580 |
-
|
581 |
-
= 1.9.1 =
|
582 |
-
Changed name to OMGF, because it's hilarious?
|
583 |
-
|
584 |
-
= 1.9.0 =
|
585 |
-
New feature! OMGF can now remove fonts from fonts.googleapis.com or fonts.gstatic.com automatically.
|
586 |
-
|
587 |
-
= 1.8.3 =
|
588 |
-
Extended support for local source attribute.
|
589 |
-
|
590 |
-
= 1.8.2 =
|
591 |
-
Correct support for Legacy IE browsers (EOT).
|
592 |
-
Added 'local'-attribute to stylesheet.
|
593 |
-
|
594 |
-
= 1.8.1 =
|
595 |
-
Load EOT-files first in stylesheet.
|
596 |
-
|
597 |
-
= 1.8.0 =
|
598 |
-
Minor code optimizations.
|
599 |
-
|
600 |
-
= 1.7.9 =
|
601 |
-
Cleared up instructions in Welcome Panel.
|
602 |
-
Added option to remove version parameter from stylesheet request.
|
603 |
-
|
604 |
-
= 1.7.8 =
|
605 |
-
Updated welcome panel.
|
606 |
-
|
607 |
-
= 1.7.7 =
|
608 |
-
Quick-fix for re-triggered SQL queries.
|
609 |
-
|
610 |
-
= 1.7.6 =
|
611 |
-
XSS hardening in stylesheet generation form.
|
612 |
-
|
613 |
-
= 1.7.5 =
|
614 |
-
Added CDN support.
|
615 |
-
|
616 |
-
= 1.7.4 =
|
617 |
-
Fluid progress bar now functions correctly and doesn't make any unnecessary Ajax-requests.
|
618 |
-
Replaced all success-messages with notifications inside the buttons, to increase UX.
|
619 |
-
|
620 |
-
= 1.7.3 =
|
621 |
-
Improved search by adding support for comma-separated lists. Fixed some 404s in welcome panel and minor JavaScript optimizations.
|
622 |
-
|
623 |
-
= 1.7.2 =
|
624 |
-
Minor usability updates.
|
625 |
-
|
626 |
-
= 1.7.0 =
|
627 |
-
Added support for subsets to increase compatibility with other writing.
|
628 |
-
|
629 |
-
= 1.6.1 =
|
630 |
-
Changed domains to new home: daan.dev
|
631 |
-
|
632 |
-
= 1.6.0 =
|
633 |
-
Added experimental option for preload resource hint.
|
634 |
-
|
635 |
-
= 1.5.7 =
|
636 |
-
Replaced download counter for progress-bar. Refactored logic for AJAX-requests for better
|
637 |
-
performance.
|
638 |
-
|
639 |
-
= 1.5.6 =
|
640 |
-
Optimized AJAX-requests for download-counter.
|
641 |
-
|
642 |
-
= 1.5.5 =
|
643 |
-
Added a clean-up button, which cleans the currently configured cache-dir.
|
644 |
-
|
645 |
-
= 1.5.3 =
|
646 |
-
Plugins admin-JS and -CSS is now updated by force after plugin update to prevent malfunction.
|
647 |
-
|
648 |
-
= 1.5.2 =
|
649 |
-
Added a download counter, clean queue-button and improved allround UX. Fixed a few minor bugs.
|
650 |
-
|
651 |
-
= 1.5.1 =
|
652 |
-
Fixed a bug where sometimes the fonts weren't downloaded yet when the stylesheet was generated.
|
653 |
-
|
654 |
-
= 1.5.0 =
|
655 |
-
OMGF now remembers which fonts you use, to make it easier to edit your stylesheet.
|
656 |
-
|
657 |
-
= 1.4.1 =
|
658 |
-
Added option to change font-display strategy.
|
659 |
-
|
660 |
-
= 1.4.0 =
|
661 |
-
Added option to change cache directory.
|
662 |
-
|
663 |
-
= 1.3.10 =
|
664 |
-
Fixed bug with detecting wp-content directory.
|
665 |
-
|
666 |
-
= 1.3.9 =
|
667 |
-
Fixed Multisite Bug.
|
668 |
-
|
669 |
-
= 1.3.8 =
|
670 |
-
Revert accidental commit
|
671 |
-
|
672 |
-
= 1.3.7 =
|
673 |
-
Tested with WP 5+
|
674 |
-
|
675 |
-
= 1.3.6 =
|
676 |
-
Changed order of loaded fonts to improve compatibility in Firefox. [Reported by @lofesa]
|
677 |
-
|
678 |
-
= 1.3.5 =
|
679 |
-
When plugin is deactivated, enqueued styles and scripts are removed. Fixed bug where fontnames containing multiple spaces did not return any results. Added console log when no results are returned.
|
680 |
-
|
681 |
-
= 1.3.2 =
|
682 |
-
Finally added 'Settings'-link to Plugins-page.
|
683 |
-
|
684 |
-
= 1.3.1 =
|
685 |
-
Further security measures to remove Path Traversal vulnerabilities.
|
686 |
-
|
687 |
-
= 1.2.9 =
|
688 |
-
Added security measures to prevent XSS.
|
689 |
-
|
690 |
-
= 1.2.8 =
|
691 |
-
Fixed bug where 'remove' would sometimes remove two rows.
|
692 |
-
|
693 |
-
= 1.2.5 =
|
694 |
-
Complete overhaul of the plugin. Fonts are now searched using the Google Fonts Helper API and
|
695 |
-
|
696 |
-
= 1.1.0 =
|
697 |
-
Fixed bug where the plugin would sometimes permanently change your uploads-directory to /local-fonts.
|
698 |
-
|
699 |
-
= 1.0.1 =
|
700 |
-
Changed to Github.
|
701 |
|
702 |
= 1.0 =
|
703 |
First release! No changes so far!
|
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.8
|
6 |
+
Stable tag: 4.5.10
|
7 |
Requires PHP: 7.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
70 |
|
71 |
== Frequently Asked Questions ==
|
72 |
|
73 |
+
For the FAQ, [click here](https://ffw.press/docs/omgf-pro/faq/).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
|
75 |
== Screenshots ==
|
76 |
|
81 |
|
82 |
== Changelog ==
|
83 |
|
84 |
+
= 4.5.10 | October 18th, 2021 =
|
85 |
+
* Enhancement: API now cleans up excessive spacing and + symbols in requests before fetching fonts. This comes in handy when e.g. @import statements in CSS stylesheets are auto-formatted by IDEs.
|
86 |
+
* Fix: API would crash when Google Fonts request turned up empty.
|
87 |
+
* Fix: Added proper error handling for when downloading fonts failed.
|
88 |
+
* Doc: Added link to Troubleshooting Guide to Help tab.
|
89 |
+
|
90 |
= 4.5.9 | October 5th, 2021 =
|
91 |
* Fix: content_url() should always be encoded, also if file already exists.
|
92 |
* Enhancement: If stylesheet is already generated, stop execution to decrease API request time.
|
285 |
* Removed 'Remove Version Parameter' option, because it has become obsolete. The new detection method uses the initial script's version, if set.
|
286 |
* Font Preloading is temporarily removed and will be re-introduced (in a different form, along with new features) in a later release.
|
287 |
|
288 |
+
[ Changelog shortened ... ]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
|
290 |
= 3.0.0 =
|
291 |
*OMGF - CORONA EDITION*
|
300 |
* Search now works bug free.
|
301 |
* WordPress' default admin fonts no longer show up as results.
|
302 |
|
303 |
+
[ Changelog shortened ... ]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
304 |
|
305 |
= 2.0.0 =
|
306 |
Added Typekit's Web Font Loader to allow loading fonts asynchronously.
|
307 |
|
308 |
+
[ Changelog shortened... ]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
|
310 |
= 1.0 =
|
311 |
First release! No changes so far!
|