Version Description
[2021.01.04] = * Added page caching purging support for Hummingbird and WP-Optimize from FVM
Download this release
Release Info
Developer | Alignak |
Plugin | Fast Velocity Minify |
Version | 3.0.9 |
Comparing to | |
See all releases |
Code changes from version 3.0.8 to 3.0.9
- fvm.php +1 -1
- inc/common.php +13 -3
- libs/raisermin/minify.php +0 -1
- readme.txt +4 -1
fvm.php
CHANGED
@@ -6,7 +6,7 @@ Description: Improve your speed score on GTmetrix, Pingdom Tools and Google Page
|
|
6 |
Author: Raul Peixoto
|
7 |
Author URI: http://fastvelocity.com
|
8 |
Text Domain: fast-velocity-minify
|
9 |
-
Version: 3.0.
|
10 |
License: GPL2
|
11 |
|
12 |
------------------------------------------------------------------------
|
6 |
Author: Raul Peixoto
|
7 |
Author URI: http://fastvelocity.com
|
8 |
Text Domain: fast-velocity-minify
|
9 |
+
Version: 3.0.9
|
10 |
License: GPL2
|
11 |
|
12 |
------------------------------------------------------------------------
|
inc/common.php
CHANGED
@@ -322,13 +322,23 @@ function fvm_purge_others(){
|
|
322 |
return __( 'All caches on <strong>Breeze</strong> have been purged.', 'fast-velocity-minify' );
|
323 |
}
|
324 |
|
325 |
-
|
326 |
# swift
|
327 |
if (class_exists("Swift_Performance_Cache")) {
|
328 |
Swift_Performance_Cache::clear_all_cache();
|
329 |
return __( 'All caches on <strong>Swift Performance</strong> have been purged.', 'fast-velocity-minify' );
|
330 |
}
|
331 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
332 |
|
333 |
# hosting companies
|
334 |
|
@@ -1095,7 +1105,7 @@ function fvm_maybe_minify_css_file($css, $url, $min) {
|
|
1095 |
|
1096 |
# adjust paths
|
1097 |
$bgimgs = array();
|
1098 |
-
preg_match_all ('/url\s*\((\s*[\'"]?(http)(s|:).+[\'"]?\s*)\)/Uui', $css, $bgimgs);
|
1099 |
if(isset($bgimgs[1]) && is_array($bgimgs[1])) {
|
1100 |
foreach($bgimgs[1] as $img) {
|
1101 |
if(substr($img, 0, strlen($use_url)) == $use_url) {
|
322 |
return __( 'All caches on <strong>Breeze</strong> have been purged.', 'fast-velocity-minify' );
|
323 |
}
|
324 |
|
|
|
325 |
# swift
|
326 |
if (class_exists("Swift_Performance_Cache")) {
|
327 |
Swift_Performance_Cache::clear_all_cache();
|
328 |
return __( 'All caches on <strong>Swift Performance</strong> have been purged.', 'fast-velocity-minify' );
|
329 |
}
|
330 |
+
|
331 |
+
# Hummingbird
|
332 |
+
if(has_action('wphb_clear_page_cache')) {
|
333 |
+
do_action('wphb_clear_page_cache');
|
334 |
+
return __( 'All caches on <strong>Hummingbird</strong> have been purged.', 'fast-velocity-minify' );
|
335 |
+
}
|
336 |
+
|
337 |
+
# WP-Optimize
|
338 |
+
if(has_action('wpo_cache_flush')) {
|
339 |
+
do_action('wpo_cache_flush');
|
340 |
+
return __( 'All caches on <strong>WP-Optimize</strong> have been purged.', 'fast-velocity-minify' );
|
341 |
+
}
|
342 |
|
343 |
# hosting companies
|
344 |
|
1105 |
|
1106 |
# adjust paths
|
1107 |
$bgimgs = array();
|
1108 |
+
preg_match_all ('/url\s*\((\s*[\'"]?(http|\/\/)(s|:).+[\'"]?\s*)\)/Uui', $css, $bgimgs);
|
1109 |
if(isset($bgimgs[1]) && is_array($bgimgs[1])) {
|
1110 |
foreach($bgimgs[1] as $img) {
|
1111 |
if(substr($img, 0, strlen($use_url)) == $use_url) {
|
libs/raisermin/minify.php
CHANGED
@@ -40,7 +40,6 @@ function fvm_raisermin_js($code){
|
|
40 |
$code = preg_replace('/\n+/', "\n", $code);
|
41 |
|
42 |
# process horizontal space
|
43 |
-
$code = preg_replace('/(\h?)(\|\||\&\&|[\{\}\[\]\?:\.;=])(\h?)/ui', '$2', $code);
|
44 |
$code = preg_replace('/([\[\]\(\)\{\}\;\<\>])(\h+)([\[\]\(\)\{\}\;\<\>])/ui', '$1 $3', $code);
|
45 |
$code = preg_replace('/([\)])(\h?)(\.)/ui', '$1$3', $code);
|
46 |
$code = preg_replace('/([\)\?])(\h?)(\.)/ui', '$1$3', $code);
|
40 |
$code = preg_replace('/\n+/', "\n", $code);
|
41 |
|
42 |
# process horizontal space
|
|
|
43 |
$code = preg_replace('/([\[\]\(\)\{\}\;\<\>])(\h+)([\[\]\(\)\{\}\;\<\>])/ui', '$1 $3', $code);
|
44 |
$code = preg_replace('/([\)])(\h?)(\.)/ui', '$1$3', $code);
|
45 |
$code = preg_replace('/([\)\?])(\h?)(\.)/ui', '$1$3', $code);
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: Alignak
|
|
3 |
Tags: PHP Minify, Lighthouse, GTmetrix, Pingdom, Pagespeed, Merging, Minification, Optimization, Speed, Performance, FVM
|
4 |
Requires at least: 4.7
|
5 |
Requires PHP: 5.6
|
6 |
-
Stable tag: 3.0.
|
7 |
Tested up to: 5.6
|
8 |
Text Domain: fast-velocity-minify
|
9 |
License: GPLv3 or later
|
@@ -55,6 +55,9 @@ Version 3.0 is a major code rewrite to improve JS and CSS merging, but it requir
|
|
55 |
|
56 |
== Changelog ==
|
57 |
|
|
|
|
|
|
|
58 |
= 3.0.8 [2021.01.02] =
|
59 |
* Improved compatibility and better detection of dynamic CSS and JS files (files generated with PHP instead of being static)
|
60 |
|
3 |
Tags: PHP Minify, Lighthouse, GTmetrix, Pingdom, Pagespeed, Merging, Minification, Optimization, Speed, Performance, FVM
|
4 |
Requires at least: 4.7
|
5 |
Requires PHP: 5.6
|
6 |
+
Stable tag: 3.0.9
|
7 |
Tested up to: 5.6
|
8 |
Text Domain: fast-velocity-minify
|
9 |
License: GPLv3 or later
|
55 |
|
56 |
== Changelog ==
|
57 |
|
58 |
+
= 3.0.9 [2021.01.04] =
|
59 |
+
* Added page caching purging support for Hummingbird and WP-Optimize from FVM
|
60 |
+
|
61 |
= 3.0.8 [2021.01.02] =
|
62 |
* Improved compatibility and better detection of dynamic CSS and JS files (files generated with PHP instead of being static)
|
63 |
|