Fast Velocity Minify - Version 2.6.8

Version Description

[2019.07.06] = * header preload fixes (thanks to @vandreev)

Download this release

Release Info

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

Code changes from version 2.6.7 to 2.6.8

Files changed (2) hide show
  1. fvm.php +6 -6
  2. 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.6.7
9
  License: GPL2
10
 
11
  ------------------------------------------------------------------------
@@ -2845,7 +2845,7 @@ function fastvelocity_add_google_fonts_merged() {
2845
  # collect all fvm JS files and save them to an headers file
2846
  add_filter('script_loader_tag', 'fastvelocity_collect_js_preload_headers', PHP_INT_MAX, 3 );
2847
  function fastvelocity_collect_js_preload_headers($html, $handle, $src){
2848
- global $collect_preload_js, $fvm_enabled_css_preload, $fvm_enabled_js_preload;
2849
 
2850
  # return if disabled
2851
  if ($fvm_enabled_js_preload != true) {
@@ -2853,7 +2853,7 @@ function fastvelocity_collect_js_preload_headers($html, $handle, $src){
2853
  }
2854
 
2855
  # collect
2856
- if (stripos($src, '/fvm/out/') !== false) {
2857
  $collect_preload_js[] = $src;
2858
  }
2859
  return $html;
@@ -2862,7 +2862,7 @@ function fastvelocity_collect_js_preload_headers($html, $handle, $src){
2862
  # generate preload headers file
2863
  add_action('wp_footer', 'fastvelocity_generate_preload_headers', PHP_INT_MAX);
2864
  function fastvelocity_generate_preload_headers(){
2865
- global $collect_preload_css, $collect_preload_js, $fvm_enabled_css_preload, $fvm_enabled_js_preload;
2866
 
2867
  # return if disabled
2868
  if ($fvm_enabled_css_preload != true && $fvm_enabled_js_preload != true) {
@@ -2889,7 +2889,7 @@ function fastvelocity_generate_preload_headers(){
2889
  foreach($collect_preload_css as $u) {
2890
 
2891
  # filter out footer footer files, because they are not in the critical path
2892
- if(stripos($u, '/fvm/out/footer-') !== false) { continue; }
2893
 
2894
  # add headers
2895
  $headers[] = "Link: <$u>; rel=preload; as=style";
@@ -2901,7 +2901,7 @@ function fastvelocity_generate_preload_headers(){
2901
  foreach($collect_preload_js as $u) {
2902
 
2903
  # filter out footer footer files, because they are not in the critical path
2904
- if(stripos($u, '/fvm/out/footer-') !== false) { continue; }
2905
 
2906
  # add headers
2907
  $headers[] = "Link: <$u>; rel=preload; as=script";
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.6.8
9
  License: GPL2
10
 
11
  ------------------------------------------------------------------------
2845
  # collect all fvm JS files and save them to an headers file
2846
  add_filter('script_loader_tag', 'fastvelocity_collect_js_preload_headers', PHP_INT_MAX, 3 );
2847
  function fastvelocity_collect_js_preload_headers($html, $handle, $src){
2848
+ global $cachedirurl, $collect_preload_js, $fvm_enabled_css_preload, $fvm_enabled_js_preload;
2849
 
2850
  # return if disabled
2851
  if ($fvm_enabled_js_preload != true) {
2853
  }
2854
 
2855
  # collect
2856
+ if (stripos($src, $cachedirurl) !== false) {
2857
  $collect_preload_js[] = $src;
2858
  }
2859
  return $html;
2862
  # generate preload headers file
2863
  add_action('wp_footer', 'fastvelocity_generate_preload_headers', PHP_INT_MAX);
2864
  function fastvelocity_generate_preload_headers(){
2865
+ global $cachedirurl, $collect_preload_css, $collect_preload_js, $fvm_enabled_css_preload, $fvm_enabled_js_preload;
2866
 
2867
  # return if disabled
2868
  if ($fvm_enabled_css_preload != true && $fvm_enabled_js_preload != true) {
2889
  foreach($collect_preload_css as $u) {
2890
 
2891
  # filter out footer footer files, because they are not in the critical path
2892
+ if(stripos($u, $cachedirurl . '/footer-') !== false) { continue; }
2893
 
2894
  # add headers
2895
  $headers[] = "Link: <$u>; rel=preload; as=style";
2901
  foreach($collect_preload_js as $u) {
2902
 
2903
  # filter out footer footer files, because they are not in the critical path
2904
+ if(stripos($u, $cachedirurl . '/footer-') !== false) { continue; }
2905
 
2906
  # add headers
2907
  $headers[] = "Link: <$u>; rel=preload; as=script";
readme.txt CHANGED
@@ -3,7 +3,7 @@ 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
  Requires PHP: 5.5
6
- Stable tag: 2.6.7
7
  Tested up to: 5.2.2
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -198,6 +198,9 @@ Please backup your site before updating. Version 3.0 will have a major code rewr
198
 
199
  == Changelog ==
200
 
 
 
 
201
  = 2.6.7 [2019.07.04] =
202
  * added cache purging support for the swift cache plugin
203
  * changed cache directory to the uploads directory for compatibility reasons
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
  Requires PHP: 5.5
6
+ Stable tag: 2.6.8
7
  Tested up to: 5.2.2
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
198
 
199
  == Changelog ==
200
 
201
+ = 2.6.8 [2019.07.06] =
202
+ * header preload fixes (thanks to @vandreev)
203
+
204
  = 2.6.7 [2019.07.04] =
205
  * added cache purging support for the swift cache plugin
206
  * changed cache directory to the uploads directory for compatibility reasons