Local Google Fonts - Version 0.15

Version Description

Download this release

Release Info

Developer everpress
Plugin Icon 128x128 Local Google Fonts
Version 0.15
Comparing to
See all releases

Code changes from version 0.14 to 0.15

README.md CHANGED
@@ -1,14 +1,15 @@
1
  # Local Google Fonts
2
 
3
- Contributors: everpress, xaverb
4
- Tags: googlefonts, google, fonts, gdpr, lgf, font, speed
5
  Requires at least: 4.6
6
  Tested up to: 6.0
7
- Stable tag: 0.14
8
  Requires PHP: 5.6+
9
  License: GPLv2 or later
10
  Author: EverPress
11
- Author URI: https://everpress.co
 
12
 
13
  ## Description
14
 
@@ -83,6 +84,10 @@ You may have loaded a subset which doesn't included required characters. Check a
83
 
84
  ## Changelog
85
 
 
 
 
 
86
  ### 0.14
87
 
88
  - added info if https://google-webfonts-helper.herokuapp.com/ is down
1
  # Local Google Fonts
2
 
3
+ Contributors: everpress, xaverb
4
+ Tags: googlefonts, google, fonts, gdpr, lgf, font, speed
5
  Requires at least: 4.6
6
  Tested up to: 6.0
7
+ Stable tag: 0.15
8
  Requires PHP: 5.6+
9
  License: GPLv2 or later
10
  Author: EverPress
11
+ Author URI: https://everpress.co
12
+ Donate link: https://evp.to/donate
13
 
14
  ## Description
15
 
84
 
85
  ## Changelog
86
 
87
+ ### 0.15
88
+
89
+ - using custom mirror to prevent down times
90
+
91
  ### 0.14
92
 
93
  - added info if https://google-webfonts-helper.herokuapp.com/ is down
includes/class-local-google-fonts-admin.php CHANGED
@@ -316,7 +316,7 @@ class LGF_Admin {
316
  $buffer = get_option( 'local_google_fonts_buffer', array() );
317
 
318
  foreach ( $families as $family => $variants ) {
319
- $url = 'https://google-webfonts-helper.herokuapp.com/api/fonts/';
320
  $alias = $this->font_family_alias( $family );
321
  $subsets = isset( $buffer[ $handle ]['subsets'][ $family ] ) ? implode( ',', array_filter( $buffer[ $handle ]['subsets'][ $family ] ) ) : $args['subset'];
322
  $the_url = add_query_arg(
@@ -341,7 +341,7 @@ class LGF_Admin {
341
  $info = json_decode( $body );
342
  set_transient( $transient_key, $info, HOUR_IN_SECONDS );
343
  } elseif ( 503 === $code ) {
344
- return new \WP_Error( 'service_not_available', sprintf( esc_html__( '%s seems to be down right now. Please try again later.', 'local-google-fonts' ), 'https://google-webfonts-helper.herokuapp.com/' ) );
345
  } else {
346
  continue;
347
  }
316
  $buffer = get_option( 'local_google_fonts_buffer', array() );
317
 
318
  foreach ( $families as $family => $variants ) {
319
+ $url = 'https://local-google-fonts.herokuapp.com/api/fonts/';
320
  $alias = $this->font_family_alias( $family );
321
  $subsets = isset( $buffer[ $handle ]['subsets'][ $family ] ) ? implode( ',', array_filter( $buffer[ $handle ]['subsets'][ $family ] ) ) : $args['subset'];
322
  $the_url = add_query_arg(
341
  $info = json_decode( $body );
342
  set_transient( $transient_key, $info, HOUR_IN_SECONDS );
343
  } elseif ( 503 === $code ) {
344
+ return new \WP_Error( 'service_not_available', sprintf( esc_html__( '%s seems to be down right now. Please try again later.', 'local-google-fonts' ), $url ) );
345
  } else {
346
  continue;
347
  }
local-google-fonts.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Local Google Fonts
4
  Description: Host your used Google fonts on your server and make your site GDPR compliant.
5
- Version: 0.14
6
  Author: EverPress
7
  Author URI: https://everpress.co
8
  License: GPLv2 or later
2
  /*
3
  Plugin Name: Local Google Fonts
4
  Description: Host your used Google fonts on your server and make your site GDPR compliant.
5
+ Version: 0.15
6
  Author: EverPress
7
  Author URI: https://everpress.co
8
  License: GPLv2 or later