Fast Velocity Minify - Version 2.8.2

Version Description

[2020.04.13] = * Skip changing clip-path: url(#some-svg); to absolute urls during css minification * Added a better cronjob duplicate cleanup task, when uninstalling the plugin

Download this release

Release Info

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

Code changes from version 2.8.1 to 2.8.2

Files changed (3) hide show
  1. fvm.php +1 -1
  2. inc/functions.php +23 -1
  3. readme.txt +5 -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.1
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.2
9
  License: GPL2
10
 
11
  ------------------------------------------------------------------------
inc/functions.php CHANGED
@@ -84,6 +84,28 @@ function fastvelocity_plugin_deactivate() {
84
  # old cache purge event cron
85
  wp_clear_scheduled_hook( 'fastvelocity_purge_old_cron_event' );
86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  }
88
 
89
  # run during uninstall
@@ -364,7 +386,7 @@ $css = fastvelocity_min_remove_utf8_bom($css);
364
  if(!empty($url)) {
365
  $matches = array(); preg_match_all("/url\(\s*['\"]?(?!data:)(?!http)(?![\/'\"])(.+?)['\"]?\s*\)/ui", $css, $matches);
366
  foreach($matches[1] as $a) { $b = trim($a); if($b != $a) { $css = str_replace($a, $b, $css); } }
367
- $css = preg_replace("/url\(\s*['\"]?(?!data:)(?!http)(?![\/'\"])(.+?)['\"]?\s*\)/ui", "url(".dirname($url)."/$1)", $css);
368
  }
369
 
370
  # no utf8 garbage
84
  # old cache purge event cron
85
  wp_clear_scheduled_hook( 'fastvelocity_purge_old_cron_event' );
86
 
87
+ # delete leftovers from older versions
88
+ if(function_exists('_get_cron_array') && function_exists('_set_cron_array')) {
89
+ $cron = _get_cron_array();
90
+ if (is_array($cron)) {
91
+
92
+ # count
93
+ $a = count($cron);
94
+
95
+ # keep only the ones that don't match the cron name
96
+ $updated = array_filter($cron, function($v){return !array_key_exists("fastvelocity_purge_old_cron_event",$v);});
97
+
98
+ # count
99
+ $b = count($updated);
100
+
101
+ # update
102
+ if ($a != $b && is_array($updated) && count($updated) > 0) {
103
+ _set_cron_array($updated);
104
+ }
105
+
106
+ }
107
+ }
108
+
109
  }
110
 
111
  # run during uninstall
386
  if(!empty($url)) {
387
  $matches = array(); preg_match_all("/url\(\s*['\"]?(?!data:)(?!http)(?![\/'\"])(.+?)['\"]?\s*\)/ui", $css, $matches);
388
  foreach($matches[1] as $a) { $b = trim($a); if($b != $a) { $css = str_replace($a, $b, $css); } }
389
+ $css = preg_replace("/url\(\s*['\"]?(?!data:)(?!http)(?![\/'\"#])(.+?)['\"]?\s*\)/ui", "url(".dirname($url)."/$1)", $css);
390
  }
391
 
392
  # no utf8 garbage
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.1
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,10 @@ Please backup your site before updating. Version 3.0 will have a major code rewr
198
 
199
  == Changelog ==
200
 
 
 
 
 
201
  = 2.8.1 [2020.03.15] =
202
  * added filter for the fvm_get_url function
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.2
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.2 [2020.04.13] =
202
+ * Skip changing clip-path: url(#some-svg); to absolute urls during css minification
203
+ * Added a better cronjob duplicate cleanup task, when uninstalling the plugin
204
+
205
  = 2.8.1 [2020.03.15] =
206
  * added filter for the fvm_get_url function
207