Fast Velocity Minify - Version 2.8.9

Version Description

[2020.06.23] = * new filter for wp hide compatibility

Download this release

Release Info

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

Code changes from version 2.8.8 to 2.8.9

Files changed (4) hide show
  1. fvm.php +1 -1
  2. inc/functions-cache.php +10 -6
  3. inc/functions.php +12 -0
  4. 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.8.8
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.8.9
9
  License: GPL2
10
 
11
  ------------------------------------------------------------------------
inc/functions-cache.php CHANGED
@@ -250,13 +250,17 @@ function fastvelocity_get_cachestats() {
250
  function fastvelocity_rrmdir($path) {
251
  clearstatcache();
252
  if(is_dir($path)) {
253
- $i = new DirectoryIterator($path);
254
- foreach($i as $f){
255
- if($f->isFile()){ unlink($f->getRealPath());
256
- } else if(!$f->isDot() && $f->isDir()){
257
- fastvelocity_rrmdir($f->getRealPath());
258
- if(is_dir($f->getRealPath())) { @rmdir($f->getRealPath()); }
 
 
259
  }
 
 
260
  }
261
 
262
  # self
250
  function fastvelocity_rrmdir($path) {
251
  clearstatcache();
252
  if(is_dir($path)) {
253
+ try {
254
+ $i = new DirectoryIterator($path);
255
+ foreach($i as $f){
256
+ if($f->isFile()){ @unlink($f->getRealPath());
257
+ } else if(!$f->isDot() && $f->isDir()){
258
+ fastvelocity_rrmdir($f->getRealPath());
259
+ if(is_dir($f->getRealPath())) { @rmdir($f->getRealPath()); }
260
+ }
261
  }
262
+ } catch (Exception $e) {
263
+ return get_class($e) . ": " . $e->getMessage();
264
  }
265
 
266
  # self
inc/functions.php CHANGED
@@ -452,6 +452,9 @@ $printurl = str_ireplace(array(site_url(), home_url(), 'http:', 'https:'), '', $
452
  $code = fastvelocity_min_get_css($hurl, file_get_contents($f).$inline, $disable_minification);
453
  }
454
 
 
 
 
455
  # check for php code, skip if found
456
  if(strtolower(substr($code, 0, 5)) != "<?php" && stripos($code, "<?php") === false) {
457
  # log, save and return
@@ -476,6 +479,9 @@ $printurl = str_ireplace(array(site_url(), home_url(), 'http:', 'https:'), '', $
476
  $code = fastvelocity_min_get_css($hurl, file_get_contents($f).$inline, $disable_minification);
477
  }
478
 
 
 
 
479
  # check for php code, skip if found
480
  if(strtolower(substr($code, 0, 5)) != "<?php" && stripos($code, "<?php") === false) {
481
  # log, save and return
@@ -502,6 +508,9 @@ $printurl = str_ireplace(array(site_url(), home_url(), 'http:', 'https:'), '', $
502
  $code = fastvelocity_min_get_css($hurl, $code.$inline, $disable_minification);
503
  }
504
 
 
 
 
505
  # log, save and return
506
  $log = $printurl;
507
  if($fvm_debug == true) { $log.= " --- Debug: $printhandle was fetched from $hurl ---"; }
@@ -522,6 +531,9 @@ $printurl = str_ireplace(array(site_url(), home_url(), 'http:', 'https:'), '', $
522
  $code = fastvelocity_min_get_css($hurl, $code.$inline, $disable_minification);
523
  }
524
 
 
 
 
525
  # log, save and return
526
  $log = $printurl;
527
  if($fvm_debug == true) { $log.= " --- Debug: $printhandle was fetched from $hurl ---"; }
452
  $code = fastvelocity_min_get_css($hurl, file_get_contents($f).$inline, $disable_minification);
453
  }
454
 
455
+ # wp hide filter request
456
+ $code = apply_filters( 'fvm_after_download_and_minify_code', $code, $type);
457
+
458
  # check for php code, skip if found
459
  if(strtolower(substr($code, 0, 5)) != "<?php" && stripos($code, "<?php") === false) {
460
  # log, save and return
479
  $code = fastvelocity_min_get_css($hurl, file_get_contents($f).$inline, $disable_minification);
480
  }
481
 
482
+ # wp hide filter request
483
+ $code = apply_filters( 'fvm_after_download_and_minify_code', $code, $type);
484
+
485
  # check for php code, skip if found
486
  if(strtolower(substr($code, 0, 5)) != "<?php" && stripos($code, "<?php") === false) {
487
  # log, save and return
508
  $code = fastvelocity_min_get_css($hurl, $code.$inline, $disable_minification);
509
  }
510
 
511
+ # wp hide filter request
512
+ $code = apply_filters( 'fvm_after_download_and_minify_code', $code, $type);
513
+
514
  # log, save and return
515
  $log = $printurl;
516
  if($fvm_debug == true) { $log.= " --- Debug: $printhandle was fetched from $hurl ---"; }
531
  $code = fastvelocity_min_get_css($hurl, $code.$inline, $disable_minification);
532
  }
533
 
534
+ # wp hide filter request
535
+ $code = apply_filters( 'fvm_after_download_and_minify_code', $code, $type);
536
+
537
  # log, save and return
538
  $log = $printurl;
539
  if($fvm_debug == true) { $log.= " --- Debug: $printhandle was fetched from $hurl ---"; }
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, FVM
4
  Requires at least: 4.7
5
  Requires PHP: 5.6
6
- Stable tag: 2.8.8
7
  Tested up to: 5.4
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.8.8 [2020.05.01] =
202
  * bug fixes for woocommerce, which could result in 403 errors when adding to cart under certain cases
203
 
3
  Tags: PHP Minify, Lighthouse, GTmetrix, Pingdom, Pagespeed, CSS Merging, JS Merging, CSS Minification, JS Minification, Speed Optimization, HTML Minification, Performance, Optimization, FVM
4
  Requires at least: 4.7
5
  Requires PHP: 5.6
6
+ Stable tag: 2.8.9
7
  Tested up to: 5.4
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
198
 
199
  == Changelog ==
200
 
201
+ = 2.8.9 [2020.06.23] =
202
+ * new filter for wp hide compatibility
203
+
204
  = 2.8.8 [2020.05.01] =
205
  * bug fixes for woocommerce, which could result in 403 errors when adding to cart under certain cases
206