Fast Velocity Minify - Version 2.5.0

Version Description

[2018.12.13] = * bug fixes with the google fonts merging option * better default settings

Download this release

Release Info

Developer Alignak
Plugin Icon 128x128 Fast Velocity Minify
Version 2.5.0
Comparing to
See all releases

Code changes from version 2.4.9 to 2.5.0

Files changed (3) hide show
  1. fvm.php +1 -1
  2. inc/functions.php +11 -14
  3. readme.txt +6 -2
fvm.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://fastvelocity.com
5
  Description: Improve your speed score on GTmetrix, Pingdom Tools and Google PageSpeed Insights by merging and minifying CSS and JavaScript files into groups, compressing HTML and other speed optimizations.
6
  Author: Raul Peixoto
7
  Author URI: http://fastvelocity.com
8
- Version: 2.4.9
9
  License: GPL2
10
 
11
  ------------------------------------------------------------------------
5
  Description: Improve your speed score on GTmetrix, Pingdom Tools and Google PageSpeed Insights by merging and minifying CSS and JavaScript files into groups, compressing HTML and other speed optimizations.
6
  Author: Raul Peixoto
7
  Author URI: http://fastvelocity.com
8
+ Version: 2.5.0
9
  License: GPL2
10
 
11
  ------------------------------------------------------------------------
inc/functions.php CHANGED
@@ -132,7 +132,7 @@ function fastvelocity_plugin_activate() {
132
  fvm_cache_increment();
133
 
134
  # default options to enable
135
- $options_enable_default = array('fastvelocity_min_remove_print_mediatypes', 'fastvelocity_fvm_clean_header_one', 'fastvelocity_gfonts_method', 'fastvelocity_min_force_inline_css_footer');
136
  foreach($options_enable_default as $option) {
137
  update_option($option, 1, 'yes');
138
  }
@@ -661,7 +661,7 @@ function fastvelocity_min_concatenate_google_fonts_allowed($font) {
661
 
662
  #normalize
663
  $gfontswhitelist = array_map('strtolower', $gfontswhitelist);
664
- $font = strtolower($font);
665
 
666
  # check
667
  if(in_array($font, $gfontswhitelist)) {
@@ -693,16 +693,11 @@ function fastvelocity_min_concatenate_google_fonts($array) {
693
  $multiple = explode('|', $font);
694
  if (count($multiple) > 0) {
695
  foreach ($multiple as $f) {
696
- $f = trim($f);
697
- if(fastvelocity_min_concatenate_google_fonts_allowed($font) == true) {
698
- $families[] = trim($f);
699
- }
700
  }
701
  }
702
  } else {
703
- if(fastvelocity_min_concatenate_google_fonts_allowed($font) == true) {
704
- $families[] = $font;
705
- }
706
  }
707
  }
708
  }
@@ -769,14 +764,16 @@ function fastvelocity_min_concatenate_google_fonts($array) {
769
 
770
  }
771
 
772
- # build font names with font weights
773
  $build = array();
774
  foreach($fonts as $farr) {
775
- $f = $farr['name'];
776
- if(count($farr['type']) > 0) {
777
- $f.= ':'. implode(',', $farr['type']);
 
 
 
778
  }
779
- $build[] = $f;
780
  }
781
 
782
  # merge, append subsets
132
  fvm_cache_increment();
133
 
134
  # default options to enable
135
+ $options_enable_default = array('fastvelocity_min_remove_print_mediatypes', 'fastvelocity_fvm_clean_header_one', 'fastvelocity_min_skip_google_fonts', 'fastvelocity_gfonts_method', 'fastvelocity_min_force_inline_css_footer');
136
  foreach($options_enable_default as $option) {
137
  update_option($option, 1, 'yes');
138
  }
661
 
662
  #normalize
663
  $gfontswhitelist = array_map('strtolower', $gfontswhitelist);
664
+ $font = str_ireplace('+', ' ', strtolower($font));
665
 
666
  # check
667
  if(in_array($font, $gfontswhitelist)) {
693
  $multiple = explode('|', $font);
694
  if (count($multiple) > 0) {
695
  foreach ($multiple as $f) {
696
+ $families[] = trim($f);
 
 
 
697
  }
698
  }
699
  } else {
700
+ $families[] = $font;
 
 
701
  }
702
  }
703
  }
764
 
765
  }
766
 
767
+ # build font names with font weights, if allowed
768
  $build = array();
769
  foreach($fonts as $farr) {
770
+ if(fastvelocity_min_concatenate_google_fonts_allowed($farr['name']) == true) {
771
+ $f = $farr['name'];
772
+ if(count($farr['type']) > 0) {
773
+ $f.= ':'. implode(',', $farr['type']);
774
+ }
775
+ $build[] = $f;
776
  }
 
777
  }
778
 
779
  # merge, append subsets
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: Alignak
3
  Tags: PHP Minify, Lighthouse, GTmetrix, Pingdom, Pagespeed, CSS Merging, JS Merging, CSS Minification, JS Minification, Speed Optimization, HTML Minification, Performance, Optimization, Speed, Fast
4
  Requires at least: 4.5
5
- Stable tag: 2.4.9
6
  Tested up to: 5.0
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -202,7 +202,11 @@ If you would like to donate any amount to the plugin author (thank you in advanc
202
 
203
  == Changelog ==
204
 
205
- = 2.4.9 [2018.12.14] =
 
 
 
 
206
  * improved the google fonts merging to only allow existing google fonts (no more google fonts 404 errors due to the merging of the fonts)
207
  * downgraded PHP Minify to version 1.3.60 due to someone reporting a server error with the new version
208
 
2
  Contributors: Alignak
3
  Tags: PHP Minify, Lighthouse, GTmetrix, Pingdom, Pagespeed, CSS Merging, JS Merging, CSS Minification, JS Minification, Speed Optimization, HTML Minification, Performance, Optimization, Speed, Fast
4
  Requires at least: 4.5
5
+ Stable tag: 2.5.0
6
  Tested up to: 5.0
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
202
 
203
  == Changelog ==
204
 
205
+ = 2.5.0 [2018.12.13] =
206
+ * bug fixes with the google fonts merging option
207
+ * better default settings
208
+
209
+ = 2.4.9 [2018.12.13] =
210
  * improved the google fonts merging to only allow existing google fonts (no more google fonts 404 errors due to the merging of the fonts)
211
  * downgraded PHP Minify to version 1.3.60 due to someone reporting a server error with the new version
212