Version Description
Throw errors less aggressive.
Download this release
Release Info
Developer | DaanvandenBergh |
Plugin | OMGF | GDPR/DSVGO Compliant, Faster Google Fonts. Easy. |
Version | 2.2.6 |
Comparing to | |
See all releases |
Code changes from version 2.2.5 to 2.2.6
- host-webfonts-local.php +1 -1
- includes/ajax/class-download.php +4 -0
- includes/class-ajax.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.6
|
8 |
* Author: Daan van den Bergh
|
9 |
* Author URI: https://daan.dev
|
10 |
* License: GPL2v2 or later
|
includes/ajax/class-download.php
CHANGED
@@ -223,6 +223,10 @@ class OMGF_AJAX_Download extends OMGF_AJAX
|
|
223 |
*/
|
224 |
private function download_file_curl($localFile, $remoteFile)
|
225 |
{
|
|
|
|
|
|
|
|
|
226 |
$file = fopen($localFile, 'w+');
|
227 |
$curl = curl_init();
|
228 |
|
223 |
*/
|
224 |
private function download_file_curl($localFile, $remoteFile)
|
225 |
{
|
226 |
+
if (!function_exists('curl_exec')) {
|
227 |
+
$this->throw_error(500, 'cURL is disabled on your server and required for OMGF to function properly. Contact your hosting provider for assistance to enable cURL on your server.');
|
228 |
+
}
|
229 |
+
|
230 |
$file = fopen($localFile, 'w+');
|
231 |
$curl = curl_init();
|
232 |
|
includes/class-ajax.php
CHANGED
@@ -25,10 +25,6 @@ class OMGF_AJAX
|
|
25 |
*/
|
26 |
public function __construct()
|
27 |
{
|
28 |
-
if (!function_exists('curl_exec')) {
|
29 |
-
$this->throw_error(500, 'cURL is disabled on your server and required for OMGF to function properly. Contact your hosting provider for assistance to enable cURL on your server.');
|
30 |
-
}
|
31 |
-
|
32 |
$this->db = new OMGF_DB();
|
33 |
|
34 |
// @formatter:off
|
@@ -98,6 +94,10 @@ class OMGF_AJAX
|
|
98 |
*/
|
99 |
public function search_font_subsets()
|
100 |
{
|
|
|
|
|
|
|
|
|
101 |
try {
|
102 |
$searchQueries = explode(',', sanitize_text_field($_POST['search_query']));
|
103 |
|
25 |
*/
|
26 |
public function __construct()
|
27 |
{
|
|
|
|
|
|
|
|
|
28 |
$this->db = new OMGF_DB();
|
29 |
|
30 |
// @formatter:off
|
94 |
*/
|
95 |
public function search_font_subsets()
|
96 |
{
|
97 |
+
if (!function_exists('curl_exec')) {
|
98 |
+
$this->throw_error(500, 'cURL is disabled on your server and required for OMGF to function properly. Contact your hosting provider for assistance to enable cURL on your server.');
|
99 |
+
}
|
100 |
+
|
101 |
try {
|
102 |
$searchQueries = explode(',', sanitize_text_field($_POST['search_query']));
|
103 |
|
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.5 =
|
119 |
Improved overall error handling for Auto Detect and downloading using cURL.
|
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.6
|
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.6 =
|
119 |
+
Throw errors less aggressive.
|
120 |
+
|
121 |
= 2.2.5 =
|
122 |
Improved overall error handling for Auto Detect and downloading using cURL.
|
123 |
|