Fast Velocity Minify - Version 2.5.8

Version Description

[2019.02.06] = * minor bug fix with the defer for pagespeed option

Download this release

Release Info

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

Code changes from version 2.5.7 to 2.5.8

Files changed (3) hide show
  1. fvm.php +7 -7
  2. inc/functions.php +7 -0
  3. readme.txt +4 -1
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.5.7
9
  License: GPL2
10
 
11
  ------------------------------------------------------------------------
@@ -1346,7 +1346,7 @@ for($i=0,$l=count($header);$i<$l;$i++) {
1346
 
1347
  # brotli static support
1348
  if(function_exists('brotli_compress')) {
1349
- file_put_contents($file.'.br', brotli_compress(file_get_contents($file), 9));
1350
  fastvelocity_fix_permission_bits($file.'.br');
1351
  }
1352
  }
@@ -1530,7 +1530,7 @@ for($i=0,$l=count($footer);$i<$l;$i++) {
1530
 
1531
  # brotli static support
1532
  if(function_exists('brotli_compress')) {
1533
- file_put_contents($file.'.br', brotli_compress(file_get_contents($file), 9));
1534
  fastvelocity_fix_permission_bits($file.'.br');
1535
  }
1536
  }
@@ -1624,10 +1624,10 @@ if (stripos($tag, 'defer') === false && stripos($tag, 'async') === false) {
1624
 
1625
 
1626
  # defer tag for PSI only
1627
- $jsdeferpsionly = '<script type="text/javascript">if(navigator.userAgent.match(/'.implode('|', $fvmualist).'/i)){document.write('.json_encode($jsdeferpsi).');}else{document.write('.json_encode($tag).');}</script>';
1628
 
1629
  # hide tag from PSI
1630
- $jsdeferhidepsi = '<script type="text/javascript">if(!navigator.userAgent.match(/'.implode('|', $fvmualist).'/i)){document.write('.json_encode($tag).');}</script>';
1631
 
1632
  # must return by this order...
1633
 
@@ -1994,7 +1994,7 @@ for($i=0,$l=count($header);$i<$l;$i++) {
1994
 
1995
  # brotli static support
1996
  if(function_exists('brotli_compress')) {
1997
- file_put_contents($file.'.br', brotli_compress(file_get_contents($file), 9));
1998
  fastvelocity_fix_permission_bits($file.'.br');
1999
  }
2000
  }
@@ -2365,7 +2365,7 @@ for($i=0,$l=count($footer);$i<$l;$i++) {
2365
 
2366
  # brotli static support
2367
  if(function_exists('brotli_compress')) {
2368
- file_put_contents($file.'.br', brotli_compress(file_get_contents($file), 9));
2369
  fastvelocity_fix_permission_bits($file.'.br');
2370
  }
2371
  }
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.8
9
  License: GPL2
10
 
11
  ------------------------------------------------------------------------
1346
 
1347
  # brotli static support
1348
  if(function_exists('brotli_compress')) {
1349
+ file_put_contents($file.'.br', brotli_compress(file_get_contents($file), 11));
1350
  fastvelocity_fix_permission_bits($file.'.br');
1351
  }
1352
  }
1530
 
1531
  # brotli static support
1532
  if(function_exists('brotli_compress')) {
1533
+ file_put_contents($file.'.br', brotli_compress(file_get_contents($file), 11));
1534
  fastvelocity_fix_permission_bits($file.'.br');
1535
  }
1536
  }
1624
 
1625
 
1626
  # defer tag for PSI only
1627
+ $jsdeferpsionly = '<script type="text/javascript">if(navigator.userAgent.match(/'.implode('|', $fvmualist).'/i)){document.write('.fastvelocity_escape_url_js($jsdeferpsi).');}else{document.write('.fastvelocity_escape_url_js($tag).');}</script>';
1628
 
1629
  # hide tag from PSI
1630
+ $jsdeferhidepsi = '<script type="text/javascript">if(!navigator.userAgent.match(/'.implode('|', $fvmualist).'/i)){document.write('.fastvelocity_escape_url_js($tag).');}</script>';
1631
 
1632
  # must return by this order...
1633
 
1994
 
1995
  # brotli static support
1996
  if(function_exists('brotli_compress')) {
1997
+ file_put_contents($file.'.br', brotli_compress(file_get_contents($file), 11));
1998
  fastvelocity_fix_permission_bits($file.'.br');
1999
  }
2000
  }
2365
 
2366
  # brotli static support
2367
  if(function_exists('brotli_compress')) {
2368
+ file_put_contents($file.'.br', brotli_compress(file_get_contents($file), 11));
2369
  fastvelocity_fix_permission_bits($file.'.br');
2370
  }
2371
  }
inc/functions.php CHANGED
@@ -947,6 +947,13 @@ function fvm_safename($str, $noname=NULL) {
947
  }
948
 
949
 
 
 
 
 
 
 
 
950
  # exclude processing from some pages / posts / contents
951
  function fastvelocity_exclude_contents() {
952
 
947
  }
948
 
949
 
950
+ # escape html tags for document.write
951
+ function fastvelocity_escape_url_js($str) {
952
+ return str_ireplace('\\"', '\"', json_encode(str_ireplace('"', '\"', $str)));
953
+ }
954
+
955
+
956
+
957
  # exclude processing from some pages / posts / contents
958
  function fastvelocity_exclude_contents() {
959
 
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.5.7
6
  Tested up to: 5.0.3
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -209,6 +209,9 @@ Please backup your site before updating. Version 3.0 will have a major code rewr
209
 
210
  == Changelog ==
211
 
 
 
 
212
  = 2.5.7 [2019.02.04] =
213
  * reverted back the css merging method to version 2.5.2 due to some compatibility issues
214
 
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.8
6
  Tested up to: 5.0.3
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
209
 
210
  == Changelog ==
211
 
212
+ = 2.5.8 [2019.02.06] =
213
+ * minor bug fix with the defer for pagespeed option
214
+
215
  = 2.5.7 [2019.02.04] =
216
  * reverted back the css merging method to version 2.5.2 due to some compatibility issues
217