Version Description
- Use transients instead of options.
- Fixed some minor notices and warnings.
Download this release
Release Info
Developer | DaanvandenBergh |
Plugin | OMGF | GDPR/DSVGO Compliant, Faster Google Fonts. Easy. |
Version | 4.1.1 |
Comparing to | |
See all releases |
Code changes from version 4.1.0 to 4.1.1
- host-webfonts-local.php +1 -1
- includes/class-admin.php +1 -1
- includes/class-ajax.php +4 -4
- readme.txt +5 -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 automatically saving Google Fonts to your server and removing the external Google Fonts.
|
7 |
-
* Version: 4.1.
|
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 and leverage browser cache by automatically saving Google Fonts to your server and removing the external Google Fonts.
|
7 |
+
* Version: 4.1.1
|
8 |
* Author: Daan (from Fast FW Press)
|
9 |
* Author URI: https://ffwp.dev
|
10 |
* License: GPL2v2 or later
|
includes/class-admin.php
CHANGED
@@ -117,7 +117,7 @@ class OMGF_Admin
|
|
117 |
*
|
118 |
*/
|
119 |
private function show_optimize_notice () {
|
120 |
-
if (
|
121 |
return;
|
122 |
}
|
123 |
|
117 |
*
|
118 |
*/
|
119 |
private function show_optimize_notice () {
|
120 |
+
if (get_transient(OMGF_Admin_Settings::OMGF_OPTIMIZATION_COMPLETE)) {
|
121 |
return;
|
122 |
}
|
123 |
|
includes/class-ajax.php
CHANGED
@@ -40,7 +40,7 @@ class OMGF_AJAX
|
|
40 |
$this->delete( $entry );
|
41 |
}
|
42 |
|
43 |
-
|
44 |
|
45 |
OMGF_Admin_Notice::set_notice( __( 'Cache directory successfully emptied.', $this->plugin_text_domain ) );
|
46 |
} catch ( \Exception $e ) {
|
@@ -91,7 +91,7 @@ class OMGF_AJAX
|
|
91 |
|
92 |
$urls = [];
|
93 |
$document = new DOMDocument();
|
94 |
-
|
95 |
|
96 |
foreach ( $document->getElementsByTagName( 'link' ) as $link ) {
|
97 |
/** @var $link DOMElement */
|
@@ -126,7 +126,7 @@ class OMGF_AJAX
|
|
126 |
);
|
127 |
|
128 |
if ( is_wp_error( $download ) ) {
|
129 |
-
|
130 |
|
131 |
OMGF_Admin_Notice::set_notice(
|
132 |
__( 'Something went wrong while downloading Google Fonts', $this->plugin_text_domain ) . ': ' . $download->get_error_message(),
|
@@ -138,7 +138,7 @@ class OMGF_AJAX
|
|
138 |
}
|
139 |
}
|
140 |
|
141 |
-
|
142 |
|
143 |
OMGF_Admin_Notice::set_notice(
|
144 |
__( 'OMGF has finished optimizing your Google Fonts. Enjoy! :-)', $this->plugin_text_domain ),
|
40 |
$this->delete( $entry );
|
41 |
}
|
42 |
|
43 |
+
set_transient( OMGF_Admin_Settings::OMGF_OPTIMIZATION_COMPLETE, false );
|
44 |
|
45 |
OMGF_Admin_Notice::set_notice( __( 'Cache directory successfully emptied.', $this->plugin_text_domain ) );
|
46 |
} catch ( \Exception $e ) {
|
91 |
|
92 |
$urls = [];
|
93 |
$document = new DOMDocument();
|
94 |
+
@$document->loadHtml( wp_remote_retrieve_body( $front_html ) );
|
95 |
|
96 |
foreach ( $document->getElementsByTagName( 'link' ) as $link ) {
|
97 |
/** @var $link DOMElement */
|
126 |
);
|
127 |
|
128 |
if ( is_wp_error( $download ) ) {
|
129 |
+
set_transient( OMGF_Admin_Settings::FFWP_WORDPRESS_PLUGINS_OMGF_PRO, false );
|
130 |
|
131 |
OMGF_Admin_Notice::set_notice(
|
132 |
__( 'Something went wrong while downloading Google Fonts', $this->plugin_text_domain ) . ': ' . $download->get_error_message(),
|
138 |
}
|
139 |
}
|
140 |
|
141 |
+
set_transient( OMGF_Admin_Settings::OMGF_OPTIMIZATION_COMPLETE, true );
|
142 |
|
143 |
OMGF_Admin_Notice::set_notice(
|
144 |
__( 'OMGF has finished optimizing your Google Fonts. Enjoy! :-)', $this->plugin_text_domain ),
|
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.1.
|
7 |
Requires PHP: 7.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -112,6 +112,10 @@ N/A
|
|
112 |
|
113 |
== Changelog ==
|
114 |
|
|
|
|
|
|
|
|
|
115 |
= 4.1.0 =
|
116 |
* Added some on-boarding to ease the use of the new interface.
|
117 |
* OMGF will now show a notice in the admin area, if the optimization never ran, to increase UX.
|
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.1.1
|
7 |
Requires PHP: 7.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
112 |
|
113 |
== Changelog ==
|
114 |
|
115 |
+
= 4.1.1 =
|
116 |
+
* Use transients instead of options.
|
117 |
+
* Fixed some minor notices and warnings.
|
118 |
+
|
119 |
= 4.1.0 =
|
120 |
* Added some on-boarding to ease the use of the new interface.
|
121 |
* OMGF will now show a notice in the admin area, if the optimization never ran, to increase UX.
|