Version Description
[2020.03.15] = * added filter for the fvm_get_url function
Download this release
Release Info
Developer | Alignak |
Plugin | Fast Velocity Minify |
Version | 2.8.1 |
Comparing to | |
See all releases |
Code changes from version 2.8.0 to 2.8.1
- fvm.php +1 -1
- inc/functions.php +29 -11
- 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.
|
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.1
|
9 |
License: GPL2
|
10 |
|
11 |
------------------------------------------------------------------------
|
inc/functions.php
CHANGED
@@ -154,7 +154,8 @@ return $ret;
|
|
154 |
function fastvelocity_min_get_hurl($src, $wp_domain, $wp_home) {
|
155 |
|
156 |
# preserve empty source handles
|
157 |
-
$hurl = trim($src);
|
|
|
158 |
|
159 |
# some fixes
|
160 |
$hurl = str_ireplace(array('&', '&'), '&', $hurl);
|
@@ -197,6 +198,9 @@ if (stripos($hurl, '.css?v') !== false) { $hurl = stristr($hurl, '.css?v', true)
|
|
197 |
# make sure there is a protocol prefix as required
|
198 |
$hurl = fvm_compat_urls($hurl); # enforce protocol
|
199 |
|
|
|
|
|
|
|
200 |
return $hurl;
|
201 |
}
|
202 |
|
@@ -828,22 +832,36 @@ function fastvelocity_exclude_contents() {
|
|
828 |
return true;
|
829 |
}
|
830 |
|
831 |
-
#
|
832 |
-
$arr = array('customize_theme', 'preview_id', 'preview');
|
833 |
-
foreach ($arr as $a) { if(isset($_GET[$a])) { return true; } }
|
834 |
-
|
835 |
-
# Thrive plugins and other post_types
|
836 |
-
$arr = array('tve_form_type', 'tve_lead_shortcode', 'tqb_splash');
|
837 |
-
foreach ($arr as $a) { if(isset($_GET['post_type']) && $_GET['post_type'] == $a) { return true; } }
|
838 |
-
|
839 |
-
# elementor
|
840 |
-
if(isset($_GET['elementor-preview'])) { return true; }
|
841 |
if(is_array($_GET)) {
|
842 |
foreach ($_GET as $k=>$v) {
|
843 |
if(is_string($v) && is_string($k)) {
|
|
|
|
|
844 |
if(stripos($k, 'elementor') !== false || stripos($v, 'elementor') !== false) {
|
845 |
return true;
|
846 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
847 |
}
|
848 |
}
|
849 |
}
|
154 |
function fastvelocity_min_get_hurl($src, $wp_domain, $wp_home) {
|
155 |
|
156 |
# preserve empty source handles
|
157 |
+
$hurl = trim($src);
|
158 |
+
if(empty($hurl)) { return $hurl; }
|
159 |
|
160 |
# some fixes
|
161 |
$hurl = str_ireplace(array('&', '&'), '&', $hurl);
|
198 |
# make sure there is a protocol prefix as required
|
199 |
$hurl = fvm_compat_urls($hurl); # enforce protocol
|
200 |
|
201 |
+
# add filter for developers
|
202 |
+
$hurl = apply_filters('fvm_get_url', $hurl);
|
203 |
+
|
204 |
return $hurl;
|
205 |
}
|
206 |
|
832 |
return true;
|
833 |
}
|
834 |
|
835 |
+
# get params exclusions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
836 |
if(is_array($_GET)) {
|
837 |
foreach ($_GET as $k=>$v) {
|
838 |
if(is_string($v) && is_string($k)) {
|
839 |
+
|
840 |
+
# elementor
|
841 |
if(stripos($k, 'elementor') !== false || stripos($v, 'elementor') !== false) {
|
842 |
return true;
|
843 |
}
|
844 |
+
|
845 |
+
# customizer preview, visual composer
|
846 |
+
if(stripos($k, 'customize_theme') !== false || stripos($k, 'preview_id') !== false || stripos($k, 'preview') !== false) {
|
847 |
+
return true;
|
848 |
+
}
|
849 |
+
|
850 |
+
# thrive plugins post_types
|
851 |
+
if(stripos($k, 'post_type') !== false && (stripos($v, 'tve_') !== false || stripos($v, 'tqb_') !== false)) {
|
852 |
+
return true;
|
853 |
+
}
|
854 |
+
|
855 |
+
# thrive architect
|
856 |
+
if($k == 'tve' && $v == 'true') {
|
857 |
+
return true;
|
858 |
+
}
|
859 |
+
|
860 |
+
# Divi Builder
|
861 |
+
if($k == 'et_fb' || $k == 'PageSpeed') {
|
862 |
+
return true;
|
863 |
+
}
|
864 |
+
|
865 |
}
|
866 |
}
|
867 |
}
|
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.
|
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.0 [2020.03.10] =
|
202 |
* improved compatibility with Thrive Architect editor
|
203 |
* improved compatibility with Divi theme
|
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 |
|
199 |
== Changelog ==
|
200 |
|
201 |
+
= 2.8.1 [2020.03.15] =
|
202 |
+
* added filter for the fvm_get_url function
|
203 |
+
|
204 |
= 2.8.0 [2020.03.10] =
|
205 |
* improved compatibility with Thrive Architect editor
|
206 |
* improved compatibility with Divi theme
|