Version Description
[2020.12.29] = * Added option to preserve settings on uninstall * Added option to inline all CSS (merging is still the recommended method) * Added option to force HTTPS on the generated cache file urls * Added an ignore list to the JS section (also imported from FVM 2 settings) * Improved compatibility with FVM 2 (you still need to specify what JS paths you want to merge) * Preserve the old FVM 2 settings on the database (will be removed on version 3.1)
Download this release
Release Info
Developer | Alignak |
Plugin | Fast Velocity Minify |
Version | 3.0.2 |
Comparing to | |
See all releases |
Code changes from version 3.0.1 to 3.0.2
- fvm.php +3 -3
- inc/admin.php +11 -3
- inc/common.php +18 -33
- inc/frontend.php +30 -8
- inc/updates.php +180 -61
- layout/admin-layout-settings.php +54 -21
- layout/admin-layout.php +1 -1
- readme.txt +9 -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 |
------------------------------------------------------------------------
|
@@ -39,8 +39,8 @@ $fvm_var_basename = plugin_basename($fvm_var_file); # pluginname
|
|
39 |
$fvm_var_dir_path = plugin_dir_path($fvm_var_file); # /home/path/plugins/pluginname/
|
40 |
$fvm_var_url_path = plugins_url(dirname($fvm_var_basename)) . '/'; # https://example.com/wp-content/plugins/pluginname/
|
41 |
$fvm_var_plugin_version = get_file_data($fvm_var_file, array('Version' => 'Version'), false)['Version'];
|
42 |
-
$fvm_var_inc_dir = $fvm_var_dir_path .
|
43 |
-
$fvm_var_inc_lib = $fvm_var_dir_path .
|
44 |
|
45 |
# global functions for backend, frontend, ajax, etc
|
46 |
require_once($fvm_var_inc_dir . 'common.php');
|
6 |
Author: Raul Peixoto
|
7 |
Author URI: http://fastvelocity.com
|
8 |
Text Domain: fast-velocity-minify
|
9 |
+
Version: 3.0.2
|
10 |
License: GPL2
|
11 |
|
12 |
------------------------------------------------------------------------
|
39 |
$fvm_var_dir_path = plugin_dir_path($fvm_var_file); # /home/path/plugins/pluginname/
|
40 |
$fvm_var_url_path = plugins_url(dirname($fvm_var_basename)) . '/'; # https://example.com/wp-content/plugins/pluginname/
|
41 |
$fvm_var_plugin_version = get_file_data($fvm_var_file, array('Version' => 'Version'), false)['Version'];
|
42 |
+
$fvm_var_inc_dir = $fvm_var_dir_path . 'inc' . DIRECTORY_SEPARATOR; # /home/path/plugins/pluginname/inc/
|
43 |
+
$fvm_var_inc_lib = $fvm_var_dir_path . 'libs' . DIRECTORY_SEPARATOR; # /home/path/plugins/pluginname/libs/
|
44 |
|
45 |
# global functions for backend, frontend, ajax, etc
|
46 |
require_once($fvm_var_inc_dir . 'common.php');
|
inc/admin.php
CHANGED
@@ -455,9 +455,17 @@ register_uninstall_hook($fvm_var_file, 'fvm_plugin_uninstall');
|
|
455 |
function fvm_plugin_uninstall() {
|
456 |
global $wpdb, $fvm_settings, $fvm_cache_paths;
|
457 |
|
458 |
-
#
|
459 |
-
$
|
460 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
461 |
$wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}fvm_cache");
|
462 |
$wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}fvm_logs");
|
463 |
|
455 |
function fvm_plugin_uninstall() {
|
456 |
global $wpdb, $fvm_settings, $fvm_cache_paths;
|
457 |
|
458 |
+
# fetch settings on wp-cli
|
459 |
+
if(is_null($fvm_settings)) { $fvm_settings = fvm_get_settings(); }
|
460 |
+
if(is_null($fvm_cache_paths)) { $fvm_cache_paths = fvm_cachepath(); }
|
461 |
+
|
462 |
+
# remove settings, unless disabled
|
463 |
+
if(!isset($fvm_settings['global']['preserve_settings']) || ( isset($fvm_settings['global']['preserve_settings']) && $fvm_settings['global']['preserve_settings'] != true)) {
|
464 |
+
$wpdb->query("DELETE FROM {$wpdb->prefix}options WHERE option_name = 'fvm_settings'");
|
465 |
+
$wpdb->query("DELETE FROM {$wpdb->prefix}options WHERE option_name = 'fvm_last_cache_update'");
|
466 |
+
}
|
467 |
+
|
468 |
+
# remove cache
|
469 |
$wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}fvm_cache");
|
470 |
$wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}fvm_logs");
|
471 |
|
inc/common.php
CHANGED
@@ -107,12 +107,22 @@ function fvm_cachepath() {
|
|
107 |
if(!defined('WP_CONTENT_DIR')) { return false; }
|
108 |
if(!defined('WP_CONTENT_URL')) { return false; }
|
109 |
|
|
|
|
|
|
|
|
|
|
|
110 |
global $fvm_settings;
|
|
|
|
|
|
|
|
|
|
|
111 |
|
112 |
# define cache directory
|
113 |
-
$cache_dir
|
114 |
$cache_base_dir = $cache_dir . DIRECTORY_SEPARATOR .'fvm';
|
115 |
-
$cache_base_dirurl =
|
116 |
|
117 |
# use alternative directory?
|
118 |
if(isset($fvm_settings['cache']['path']) && !empty($fvm_settings['cache']['path']) && isset($fvm_settings['cache']['url']) && !empty($fvm_settings['cache']['url']) && is_dir($fvm_settings['cache']['path'])) {
|
@@ -503,38 +513,10 @@ function fvm_can_minify() {
|
|
503 |
|
504 |
# create a directory, recursively
|
505 |
function fvm_create_dir($d) {
|
506 |
-
|
507 |
-
# must have
|
508 |
-
if(!defined('WP_CONTENT_DIR')) { return false; }
|
509 |
-
|
510 |
-
# use alternative directory?
|
511 |
-
if(isset($fvm_settings['cache']['path']) && !empty($fvm_settings['cache']['path']) && isset($fvm_settings['cache']['url']) && !empty($fvm_settings['cache']['url']) && is_dir($fvm_settings['cache']['path'])) {
|
512 |
-
$cache_dir = rtrim($fvm_settings['cache']['path'], '/');
|
513 |
-
$cache_base_dir = $cache_dir . DIRECTORY_SEPARATOR .'fvm';
|
514 |
-
$cache_base_dirurl = rtrim($fvm_settings['cache']['url'], '/') . '/fvm';
|
515 |
-
}
|
516 |
-
|
517 |
-
|
518 |
-
# get permissions from parent directory, or default to 777
|
519 |
-
$ch = 0777;
|
520 |
-
$parent = dirname($d);
|
521 |
-
if(is_dir($parent) && function_exists('stat') && fvm_function_available('stat')) {
|
522 |
-
if ($stat = @stat($parent)) { $ch = $stat['mode'] & 0007777; }
|
523 |
-
}
|
524 |
-
|
525 |
# create recursively
|
526 |
-
if(!is_dir($d)) {
|
527 |
-
|
528 |
-
if ( $ch != ($ch & ~umask()) ) {
|
529 |
-
$p = explode(DIRECTORY_SEPARATOR, substr($d, strlen(dirname($d)) + 1 ));
|
530 |
-
for ($i = 1, $c = count($p ); $i <= $c; $i++) {
|
531 |
-
@chmod(dirname($d) . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, array_slice($p, 0, $i)), $ch);
|
532 |
-
}
|
533 |
-
}
|
534 |
-
} else {
|
535 |
-
# fallback
|
536 |
-
wp_mkdir_p($d);
|
537 |
-
}
|
538 |
}
|
539 |
|
540 |
return true;
|
@@ -693,6 +675,9 @@ function fvm_get_default_settings($fvm_settings) {
|
|
693 |
# initialize
|
694 |
$fvm_settings = array();
|
695 |
|
|
|
|
|
|
|
696 |
# html
|
697 |
$fvm_settings['html']['enable'] = 1;
|
698 |
$fvm_settings['html']['nocomments'] = 1;
|
107 |
if(!defined('WP_CONTENT_DIR')) { return false; }
|
108 |
if(!defined('WP_CONTENT_URL')) { return false; }
|
109 |
|
110 |
+
# to var
|
111 |
+
$wp_content_dir = WP_CONTENT_DIR;
|
112 |
+
$wp_content_url = WP_CONTENT_URL;
|
113 |
+
|
114 |
+
# globals
|
115 |
global $fvm_settings;
|
116 |
+
|
117 |
+
# force https option
|
118 |
+
if(isset($fvm_settings['global']['force-ssl']) && $fvm_settings['global']['force-ssl'] == true) {
|
119 |
+
$wp_content_url = str_ireplace('http:', 'https:', $wp_content_url);
|
120 |
+
}
|
121 |
|
122 |
# define cache directory
|
123 |
+
$cache_dir = $wp_content_dir . DIRECTORY_SEPARATOR . 'cache';
|
124 |
$cache_base_dir = $cache_dir . DIRECTORY_SEPARATOR .'fvm';
|
125 |
+
$cache_base_dirurl = $wp_content_url . '/cache/fvm';
|
126 |
|
127 |
# use alternative directory?
|
128 |
if(isset($fvm_settings['cache']['path']) && !empty($fvm_settings['cache']['path']) && isset($fvm_settings['cache']['url']) && !empty($fvm_settings['cache']['url']) && is_dir($fvm_settings['cache']['path'])) {
|
513 |
|
514 |
# create a directory, recursively
|
515 |
function fvm_create_dir($d) {
|
516 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
517 |
# create recursively
|
518 |
+
if(!is_dir($d) && function_exists('wp_mkdir_p')) {
|
519 |
+
wp_mkdir_p($d);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
520 |
}
|
521 |
|
522 |
return true;
|
675 |
# initialize
|
676 |
$fvm_settings = array();
|
677 |
|
678 |
+
# global
|
679 |
+
$fvm_settings['global']['preserve_settings'] = 1;
|
680 |
+
|
681 |
# html
|
682 |
$fvm_settings['html']['enable'] = 1;
|
683 |
$fvm_settings['html']['nocomments'] = 1;
|
inc/frontend.php
CHANGED
@@ -207,13 +207,25 @@ function fvm_process_page($html) {
|
|
207 |
}
|
208 |
}
|
209 |
|
210 |
-
|
|
|
211 |
if($css !== false) {
|
212 |
-
|
213 |
-
|
214 |
-
$
|
215 |
-
|
216 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
}
|
218 |
|
219 |
}
|
@@ -527,14 +539,24 @@ function fvm_process_page($html) {
|
|
527 |
}
|
528 |
# jquery migrate 3
|
529 |
if(stripos($tag->src, '/jquery-migrate.') !== false || stripos($tag->src, '/jquery-migrate-') !== false) { $href = 'https://cdnjs.cloudflare.com/ajax/libs/jquery-migrate/3.3.1/jquery-migrate.min.js'; }
|
530 |
-
}
|
531 |
-
|
532 |
|
533 |
# get minification settings for files
|
534 |
if(isset($fvm_settings['js']['min_disable']) && $fvm_settings['js']['min_disable'] == true) {
|
535 |
$enable_js_minification = false;
|
536 |
}
|
537 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
538 |
|
539 |
# Delay third party scripts and tracking codes
|
540 |
# uses PHP stripos against the script src, if it's async or deferred
|
207 |
}
|
208 |
}
|
209 |
|
210 |
+
|
211 |
+
# success
|
212 |
if($css !== false) {
|
213 |
+
|
214 |
+
# inline all css
|
215 |
+
if(isset($fvm_settings['css']['inline-all']) && $fvm_settings['css']['inline-all'] == true) {
|
216 |
+
$mt = ''; if(isset($tag->media)) { $mt = ' media="'.$tag->media.'"'; }
|
217 |
+
$tag->outertext = '<style type="text/css"'.$mt.'>'.$css.'</style>';
|
218 |
+
unset($allcss[$k]);
|
219 |
+
continue;
|
220 |
+
} else {
|
221 |
+
# collect for merging
|
222 |
+
$fvm_styles[$media][] = $css;
|
223 |
+
$fvm_styles_log[$media][] = $tkey;
|
224 |
+
$tag->outertext = '';
|
225 |
+
unset($allcss[$k]);
|
226 |
+
continue;
|
227 |
+
}
|
228 |
+
|
229 |
}
|
230 |
|
231 |
}
|
539 |
}
|
540 |
# jquery migrate 3
|
541 |
if(stripos($tag->src, '/jquery-migrate.') !== false || stripos($tag->src, '/jquery-migrate-') !== false) { $href = 'https://cdnjs.cloudflare.com/ajax/libs/jquery-migrate/3.3.1/jquery-migrate.min.js'; }
|
542 |
+
}
|
|
|
543 |
|
544 |
# get minification settings for files
|
545 |
if(isset($fvm_settings['js']['min_disable']) && $fvm_settings['js']['min_disable'] == true) {
|
546 |
$enable_js_minification = false;
|
547 |
}
|
548 |
|
549 |
+
# ignore list, leave these alone
|
550 |
+
if(isset($fvm_settings['js']['ignore']) && !empty($fvm_settings['js']['ignore'])) {
|
551 |
+
$arr = fvm_string_toarray($fvm_settings['js']['ignore']);
|
552 |
+
if(is_array($arr) && count($arr) > 0) {
|
553 |
+
foreach ($arr as $e) {
|
554 |
+
if(stripos($tag->src, $e) !== false) {
|
555 |
+
continue 2;
|
556 |
+
}
|
557 |
+
}
|
558 |
+
}
|
559 |
+
}
|
560 |
|
561 |
# Delay third party scripts and tracking codes
|
562 |
# uses PHP stripos against the script src, if it's async or deferred
|
inc/updates.php
CHANGED
@@ -6,77 +6,196 @@ if (!defined('ABSPATH')){ exit(); }
|
|
6 |
# update routines for new fields and replacements
|
7 |
function fvm_get_updated_field_routines($fvm_settings) {
|
8 |
|
|
|
|
|
|
|
9 |
# must have
|
10 |
if(!is_array($fvm_settings)) { return $fvm_settings; }
|
11 |
|
12 |
# Version 3.0 routines start
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
}
|
78 |
# Version 3.0 routines end
|
79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
# return settings array
|
81 |
return $fvm_settings;
|
82 |
}
|
6 |
# update routines for new fields and replacements
|
7 |
function fvm_get_updated_field_routines($fvm_settings) {
|
8 |
|
9 |
+
# current version
|
10 |
+
global $fvm_var_plugin_version;
|
11 |
+
|
12 |
# must have
|
13 |
if(!is_array($fvm_settings)) { return $fvm_settings; }
|
14 |
|
15 |
# Version 3.0 routines start
|
16 |
+
|
17 |
+
# delete old FVM files
|
18 |
+
global $fvm_var_dir_path, $fvm_var_inc_lib, $fvm_var_inc_dir;
|
19 |
+
if(file_exists($fvm_var_inc_dir.'functions-cache.php')) { @unlink($fvm_var_inc_dir.'functions-cache.php'); }
|
20 |
+
if(file_exists($fvm_var_inc_dir.'functions-cli.php')) { @unlink($fvm_var_inc_dir.'functions-cli.php'); }
|
21 |
+
if(file_exists($fvm_var_inc_dir.'functions-serverinfo.php')) { @unlink($fvm_var_inc_dir.'functions-serverinfo.php'); }
|
22 |
+
if(file_exists($fvm_var_inc_dir.'functions-upgrade.php')) { @unlink($fvm_var_inc_dir.'functions-upgrade.php'); }
|
23 |
+
if(file_exists($fvm_var_inc_dir.'functions.php')) { @unlink($fvm_var_inc_dir.'functions.php'); }
|
24 |
+
if(file_exists($fvm_var_dir_path.'fvm.css')) { @unlink($fvm_var_dir_path.'fvm.css'); }
|
25 |
+
if(file_exists($fvm_var_dir_path.'fvm.js')) { @unlink($fvm_var_dir_path.'fvm.js'); }
|
26 |
+
if(file_exists($fvm_var_inc_lib.'mrclay' . DIRECTORY_SEPARATOR . 'HTML.php')) {
|
27 |
+
@unlink($fvm_var_inc_lib.'mrclay' . DIRECTORY_SEPARATOR . 'HTML.php');
|
28 |
+
@unlink($fvm_var_inc_lib.'mrclay' . DIRECTORY_SEPARATOR . 'index.html');
|
29 |
+
@rmdir($fvm_var_inc_lib.'mrclay');
|
30 |
+
}
|
31 |
+
|
32 |
+
|
33 |
+
# settings migration
|
34 |
+
if (get_option("fastvelocity_upgraded") === false) {
|
35 |
+
if (get_option("fastvelocity_plugin_version") !== false) {
|
36 |
|
37 |
+
# cache path
|
38 |
+
if (get_option("fastvelocity_min_change_cache_path") !== false && !isset($fvm_settings['cache']['path'])) {
|
39 |
+
$fvm_settings['cache']['path'] = get_option("fastvelocity_min_change_cache_path");
|
40 |
+
}
|
41 |
+
|
42 |
+
# cache base_url
|
43 |
+
if (get_option("fastvelocity_min_change_cache_base_url") !== false && !isset($fvm_settings['cache']['url'])) {
|
44 |
+
$fvm_settings['cache']['url'] = get_option("fastvelocity_min_change_cache_base_url");
|
45 |
|
46 |
+
}
|
47 |
+
|
48 |
+
# disable html minification
|
49 |
+
if (get_option("fastvelocity_min_skip_html_minification") !== false && !isset($fvm_settings['html']['min_disable'])) {
|
50 |
+
$fvm_settings['html']['min_disable'] = 1;
|
51 |
+
}
|
52 |
+
|
53 |
+
# do not remove html comments
|
54 |
+
if (get_option("fastvelocity_min_strip_htmlcomments") !== false && !isset($fvm_settings['html']['nocomments'])) {
|
55 |
+
$fvm_settings['html']['nocomments'] = 1;
|
56 |
+
}
|
57 |
+
|
58 |
+
|
59 |
+
|
60 |
+
# cdn url
|
61 |
+
if (get_option("fastvelocity_min_fvm_cdn_url") !== false && !isset($fvm_settings['cdn']['domain'])) {
|
62 |
+
$fvm_settings['cdn']['enable'] = 1;
|
63 |
+
$fvm_settings['cdn']['cssok'] = 1;
|
64 |
+
$fvm_settings['cdn']['jsok'] = 1;
|
65 |
+
$fvm_settings['cdn']['domain'] = get_option("fastvelocity_min_fvm_cdn_url");
|
66 |
+
}
|
67 |
+
|
68 |
+
# force https
|
69 |
+
if (get_option("fastvelocity_min_default_protocol") == 'https' && !isset($fvm_settings['global']['force-ssl'])) {
|
70 |
+
$fvm_settings['global']['force-ssl'] = 1;
|
71 |
+
}
|
72 |
+
|
73 |
+
# preserve settings on uninstall
|
74 |
+
if (get_option("fastvelocity_preserve_settings_on_uninstall") !== false && !isset($fvm_settings['global']['preserve_settings'])) {
|
75 |
+
$fvm_settings['global']['preserve_settings'] = 1;
|
76 |
+
}
|
77 |
+
|
78 |
+
# inline all css
|
79 |
+
if (get_option("fastvelocity_min_force_inline_css") !== false && !isset($fvm_settings['css']['inline-all'])) {
|
80 |
+
$fvm_settings['css']['inline-all'] = 1;
|
81 |
+
}
|
82 |
+
|
83 |
+
# remove google fonts
|
84 |
+
if (get_option("fastvelocity_min_remove_googlefonts") !== false && !isset($fvm_settings['css']['remove'])) {
|
85 |
+
|
86 |
+
# add fonts.gstatic.com
|
87 |
+
$arr = array('fonts.gstatic.com');
|
88 |
+
$fvm_settings['css']['remove'] = implode(PHP_EOL, fvm_array_order($arr));
|
89 |
+
|
90 |
+
}
|
91 |
+
|
92 |
+
# Skip deferring the jQuery library, add them to the header render blocking
|
93 |
+
if (get_option("fastvelocity_min_exclude_defer_jquery") !== false && !isset($fvm_settings['js']['merge_header'])) {
|
94 |
+
|
95 |
+
# add jquery + jquery migrate
|
96 |
+
$arr = array('/jquery-migrate-', '/jquery-migrate.js', '/jquery-migrate.min.js', '/jquery.js', '/jquery.min.js');
|
97 |
+
$fvm_settings['js']['merge_header'] = implode(PHP_EOL, fvm_array_order($arr));
|
98 |
+
|
99 |
+
}
|
100 |
+
|
101 |
+
# add recommended default scripts, if legacy mode is enabled
|
102 |
+
if (!isset($fvm_settings['js']['merge_defer']) || isset($fvm_settings['js']['merge_defer']) && empty($fvm_settings['js']['merge_defer'])) {
|
103 |
+
$arr = array('/ajax.aspnetcdn.com/ajax/', '/ajax.googleapis.com/ajax/libs/', '/cdnjs.cloudflare.com/ajax/libs/', '/stackpath.bootstrapcdn.com/bootstrap/', '/wp-admin/', '/wp-content/', '/wp-includes/');
|
104 |
+
$fvm_settings['js']['merge_defer'] = implode(PHP_EOL, fvm_array_order($arr));
|
105 |
+
}
|
106 |
|
107 |
+
|
108 |
+
# js ignore list
|
109 |
+
if (get_option("fastvelocity_min_ignorelist") !== false || get_option("fastvelocity_min_blacklist") !== false || get_option("fastvelocity_min_ignore") !== false && !isset($fvm_settings['js']['ignore']) && !isset($fvm_settings['css']['ignore'])) {
|
110 |
+
|
111 |
+
# default
|
112 |
+
$arr1 = array();
|
113 |
+
$arr2 = array();
|
114 |
+
$arr3 = array();
|
115 |
+
$arr4 = array();
|
116 |
+
$arr5 = array();
|
117 |
+
$arr6 = array();
|
118 |
+
$arr7 = array();
|
119 |
+
$arr8 = array();
|
120 |
+
|
121 |
+
# legacy, merge
|
122 |
+
$arr1 = fvm_array_order(fvm_string_toarray(get_option("fastvelocity_min_ignore")));
|
123 |
+
$arr2 = fvm_array_order(fvm_string_toarray(get_option("fastvelocity_min_ignorelist")));
|
124 |
+
$arr3 = fvm_array_order(fvm_string_toarray(get_option("fastvelocity_min_blacklist")));
|
125 |
+
$arr4 = array_merge($arr1, $arr2);
|
126 |
+
$arr5 = array_merge($arr4, $arr3);
|
127 |
+
$arr6 = fvm_array_order($arr5);
|
128 |
+
|
129 |
+
# css / js list
|
130 |
+
foreach($arr1 as $c) { if(substr($c, -3) != '.js') { $arr7[] = trim($c); } }
|
131 |
+
foreach($arr6 as $c) { if(substr($c, -4) != '.css') { $arr8[] = trim($c); } }
|
132 |
+
|
133 |
+
# save settings for css and js
|
134 |
+
$fvm_settings['css']['ignore'] = implode(PHP_EOL, $arr7);
|
135 |
+
$fvm_settings['js']['ignore'] = implode(PHP_EOL, $arr8);
|
136 |
+
|
137 |
+
}
|
138 |
+
|
139 |
+
# clear old cron
|
140 |
+
wp_clear_scheduled_hook( 'fastvelocity_purge_old_cron_event' );
|
141 |
+
|
142 |
+
# mark as done
|
143 |
+
update_option('fastvelocity_upgraded', true);
|
144 |
+
|
145 |
+
}
|
146 |
}
|
147 |
# Version 3.0 routines end
|
148 |
|
149 |
+
# Version 3.1 routines start
|
150 |
+
if (get_option("fastvelocity_plugin_version") !== false) {
|
151 |
+
if (version_compare($fvm_var_plugin_version, '3.1.0', '>=' )) {
|
152 |
+
|
153 |
+
# cleanup
|
154 |
+
delete_option('fastvelocity_upgraded');
|
155 |
+
delete_option('fastvelocity_min_change_cache_path');
|
156 |
+
delete_option('fastvelocity_min_change_cache_base_url');
|
157 |
+
delete_option('fastvelocity_min_fvm_cdn_url');
|
158 |
+
delete_option('fastvelocity_plugin_version');
|
159 |
+
delete_option('fvm-last-cache-update');
|
160 |
+
delete_option('fastvelocity_min_ignore');
|
161 |
+
delete_option('fastvelocity_min_blacklist');
|
162 |
+
delete_option('fastvelocity_min_ignorelist');
|
163 |
+
delete_option('fastvelocity_min_excludecsslist');
|
164 |
+
delete_option('fastvelocity_min_excludejslist');
|
165 |
+
delete_option('fastvelocity_min_enable_purgemenu');
|
166 |
+
delete_option('fastvelocity_min_default_protocol');
|
167 |
+
delete_option('fastvelocity_min_disable_js_merge');
|
168 |
+
delete_option('fastvelocity_min_disable_css_merge');
|
169 |
+
delete_option('fastvelocity_min_disable_js_minification');
|
170 |
+
delete_option('fastvelocity_min_disable_css_minification');
|
171 |
+
delete_option('fastvelocity_min_remove_print_mediatypes');
|
172 |
+
delete_option('fastvelocity_min_skip_html_minification');
|
173 |
+
delete_option('fastvelocity_min_strip_htmlcomments');
|
174 |
+
delete_option('fastvelocity_min_skip_cssorder');
|
175 |
+
delete_option('fastvelocity_min_skip_google_fonts');
|
176 |
+
delete_option('fastvelocity_min_skip_emoji_removal');
|
177 |
+
delete_option('fastvelocity_fvm_clean_header_one');
|
178 |
+
delete_option('fastvelocity_min_enable_defer_js');
|
179 |
+
delete_option('fastvelocity_min_exclude_defer_jquery');
|
180 |
+
delete_option('fastvelocity_min_force_inline_css');
|
181 |
+
delete_option('fastvelocity_min_force_inline_css_footer');
|
182 |
+
delete_option('fastvelocity_min_remove_googlefonts');
|
183 |
+
delete_option('fastvelocity_min_defer_for_pagespeed');
|
184 |
+
delete_option('fastvelocity_min_defer_for_pagespeed_optimize');
|
185 |
+
delete_option('fastvelocity_min_exclude_defer_login');
|
186 |
+
delete_option('fastvelocity_min_skip_defer_lists');
|
187 |
+
delete_option('fastvelocity_min_fvm_fix_editor');
|
188 |
+
delete_option('fastvelocity_min_loadcss');
|
189 |
+
delete_option('fastvelocity_min_fvm_removecss');
|
190 |
+
delete_option('fastvelocity_enabled_css_preload');
|
191 |
+
delete_option('fastvelocity_enabled_js_preload');
|
192 |
+
delete_option('fastvelocity_fontawesome_method');
|
193 |
+
delete_option('fastvelocity_gfonts_method');
|
194 |
+
|
195 |
+
}
|
196 |
+
}
|
197 |
+
# Version 3.1 routines end
|
198 |
+
|
199 |
# return settings array
|
200 |
return $fvm_settings;
|
201 |
}
|
layout/admin-layout-settings.php
CHANGED
@@ -8,6 +8,40 @@
|
|
8 |
wp_nonce_field('fvm_settings_nonce', 'fvm_settings_nonce');
|
9 |
?>
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
<h2 class="title"><?php _e( 'HTML Settings', 'fast-velocity-minify' ); ?></h2>
|
12 |
<h3 class="fvm-bold-green"><?php _e( 'Optimize your HTML and remove some clutter from the HTML page.', 'fast-velocity-minify' ); ?></h3>
|
13 |
|
@@ -78,6 +112,11 @@
|
|
78 |
<?php _e( 'Disable CSS Minification', 'fast-velocity-minify' ); ?> <span class="note-info">[ <?php _e( 'Will allow merging but without CSS minification for testing purposes', 'fast-velocity-minify' ); ?> ]</span></label>
|
79 |
<br />
|
80 |
|
|
|
|
|
|
|
|
|
|
|
81 |
<label for="fvm_settings_css_noprint">
|
82 |
<input name="fvm_settings[css][noprint]" type="checkbox" id="fvm_settings_css_noprint" value="1" <?php echo fvm_get_settings_checkbox(fvm_get_settings_value($fvm_settings, 'css', 'noprint')); ?>>
|
83 |
<?php _e( 'Remove "Print" CSS files', 'fast-velocity-minify' ); ?> <span class="note-info">[ <?php _e( 'Will remove CSS files of mediatype "print" from the frontend', 'fast-velocity-minify' ); ?> ]</span></label>
|
@@ -85,7 +124,7 @@
|
|
85 |
|
86 |
<label for="fvm_settings_css_fonts">
|
87 |
<input name="fvm_settings[css][fonts]" type="checkbox" id="fvm_settings_css_fonts" value="1" <?php echo fvm_get_settings_checkbox(fvm_get_settings_value($fvm_settings, 'css', 'fonts')); ?>>
|
88 |
-
<?php _e( 'Merge Fonts and Icons
|
89 |
<br />
|
90 |
|
91 |
<label for="fvm_settings_css_async">
|
@@ -97,7 +136,7 @@
|
|
97 |
</tr>
|
98 |
|
99 |
<tr>
|
100 |
-
<th scope="row"><?php _e( 'CSS
|
101 |
<td><fieldset>
|
102 |
<label for="fvm_settings_css_ignore"><span class="fvm-bold-green fvm-rowintro"><?php _e( "Ignore the following CSS URL's", 'fast-velocity-minify' ); ?></span></label>
|
103 |
<p><textarea name="fvm_settings[css][ignore]" rows="7" cols="50" id="fvm_settings_css_ignore" class="large-text code" placeholder="ex: /plugins/something/assets/problem.css"><?php echo fvm_get_settings_value($fvm_settings, 'css', 'ignore'); ?></textarea></p>
|
@@ -107,7 +146,7 @@
|
|
107 |
</tr>
|
108 |
|
109 |
<tr>
|
110 |
-
<th scope="row"><?php _e( 'Remove CSS
|
111 |
<td><fieldset>
|
112 |
<label for="fvm_settings_css_remove"><span class="fvm-bold-green fvm-rowintro"><?php _e( 'Remove the following CSS files', 'fast-velocity-minify' ); ?></span></label>
|
113 |
<p><textarea name="fvm_settings[css][remove]" rows="7" cols="50" id="fvm_settings_css_remove" class="large-text code" placeholder="ex: fonts.googleapis.com"><?php echo fvm_get_settings_value($fvm_settings, 'css', 'remove'); ?></textarea></p>
|
@@ -154,13 +193,21 @@
|
|
154 |
</tr>
|
155 |
|
156 |
|
157 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
|
159 |
<tr>
|
160 |
<th scope="row"><?php _e( 'Merge render blocking JS files in the header', 'fast-velocity-minify' ); ?></th>
|
161 |
<td><fieldset>
|
162 |
<label for="fvm_settings_merge_header"><span class="fvm-bold-green fvm-rowintro"><?php _e( 'This will merge and render block all JS files that match the paths below', 'fast-velocity-minify' ); ?></span></label>
|
163 |
-
<p><textarea name="fvm_settings[js][merge_header]" rows="7" cols="50" id="fvm_settings_js_merge_header" class="large-text code" placeholder="--- suggested ---
|
164 |
|
165 |
/jquery-migrate.js
|
166 |
/jquery.js
|
@@ -188,7 +235,7 @@
|
|
188 |
<th scope="row"><?php _e( 'Inline JavaScript Dependencies', 'fast-velocity-minify' ); ?></th>
|
189 |
<td><fieldset>
|
190 |
<label for="fvm_settings_defer_dependencies"><span class="fvm-bold-green fvm-rowintro"><?php _e( 'Delay Inline JavaScript until after the deferred scripts merged above finish loading', 'fast-velocity-minify' ); ?></span></label>
|
191 |
-
<p><textarea name="fvm_settings[js][defer_dependencies]" rows="7" cols="50" id="fvm_settings_js_defer_dependencies" class="large-text code" placeholder="--- a small
|
192 |
<p class="description">[ <?php _e( 'Inline JavaScript matching these rules, will wait until after the window.load event', 'fast-velocity-minify' ); ?> ]</p>
|
193 |
<p class="description">[ <?php _e( 'Will match using <code>PHP stripos</code> against the script <code>innerHTML</code>', 'fast-velocity-minify' ); ?> ]</p>
|
194 |
</fieldset></td>
|
@@ -277,24 +324,10 @@ www.googletagmanager.com/gtm.js"><?php echo fvm_get_settings_value($fvm_settings
|
|
277 |
|
278 |
|
279 |
<div style="height: 60px;"></div>
|
280 |
-
<h2 class="title"><?php _e( 'Cache
|
281 |
<h3 class="fvm-bold-green"><?php _e( 'FVM does not have page caching, so these settings are for the generated CSS and JS files only', 'fast-velocity-minify' ); ?></h3>
|
282 |
<table class="form-table fvm-settings">
|
283 |
<tbody>
|
284 |
-
|
285 |
-
<tr>
|
286 |
-
<th scope="row"><?php _e( 'Cache Preferences', 'fast-velocity-minify' ); ?></th>
|
287 |
-
<td>
|
288 |
-
<p class="fvm-bold-green fvm-rowintro"><?php _e( 'Select your options below', 'fast-velocity-minify' ); ?></p>
|
289 |
-
|
290 |
-
<fieldset>
|
291 |
-
<label for="fvm_settings_cache_min_instant_purge">
|
292 |
-
<input name="fvm_settings[cache][min_instant_purge]" type="checkbox" id="fvm_settings_cache_min_instant_purge" value="1" <?php echo fvm_get_settings_checkbox(fvm_get_settings_value($fvm_settings, 'cache', 'min_instant_purge')); ?>>
|
293 |
-
<?php _e( 'Purge Minified CSS/JS files instantly', 'fast-velocity-minify' ); ?> <span class="note-info">[ <?php _e( 'Cache files can take up to 24 hours to be deleted by default, for compatibility reasons with certain hosts.', 'fast-velocity-minify' ); ?> ]</span></label>
|
294 |
-
<br />
|
295 |
-
|
296 |
-
</fieldset></td>
|
297 |
-
</tr>
|
298 |
<tr>
|
299 |
<th scope="row"><span class="fvm-label-special"><?php _e( 'Public Files Cache Path', 'fast-velocity-minify' ); ?></span></th>
|
300 |
<td><fieldset>
|
8 |
wp_nonce_field('fvm_settings_nonce', 'fvm_settings_nonce');
|
9 |
?>
|
10 |
|
11 |
+
<h2 class="title"><?php _e( 'Global Settings', 'fast-velocity-minify' ); ?></h2>
|
12 |
+
<h3 class="fvm-bold-green"><?php _e( 'Settings that affect the plugin and are not specific to speed optimization.', 'fast-velocity-minify' ); ?></h3>
|
13 |
+
|
14 |
+
<table class="form-table fvm-settings">
|
15 |
+
<tbody>
|
16 |
+
|
17 |
+
<tr>
|
18 |
+
<th scope="row"><?php _e( 'Global Options', 'fast-velocity-minify' ); ?></th>
|
19 |
+
<td>
|
20 |
+
<p class="fvm-bold-green fvm-rowintro"><?php _e( 'Select your options below', 'fast-velocity-minify' ); ?></p>
|
21 |
+
|
22 |
+
<fieldset>
|
23 |
+
<label for="fvm_settings_cache_min_instant_purge">
|
24 |
+
<input name="fvm_settings[cache][min_instant_purge]" type="checkbox" id="fvm_settings_cache_min_instant_purge" value="1" <?php echo fvm_get_settings_checkbox(fvm_get_settings_value($fvm_settings, 'cache', 'min_instant_purge')); ?>>
|
25 |
+
<?php _e( 'Purge Minified CSS/JS files instantly', 'fast-velocity-minify' ); ?> <span class="note-info">[ <?php _e( 'Cache files can take up to 24 hours to be deleted by default, for compatibility reasons with certain hosts.', 'fast-velocity-minify' ); ?> ]</span></label>
|
26 |
+
<br />
|
27 |
+
|
28 |
+
<label for="fvm_settings_global_preserve_settings">
|
29 |
+
<input name="fvm_settings[global][preserve_settings]" type="checkbox" id="fvm_settings_global_preserve_settings" value="1" <?php echo fvm_get_settings_checkbox(fvm_get_settings_value($fvm_settings, 'global', 'preserve_settings')); ?>>
|
30 |
+
<?php _e( 'Preserve settings on uninstall', 'fast-velocity-minify' ); ?> <span class="note-info">[ <?php _e( 'If selected, all FVM settings will be preserved when you uninstall or delete the plugin.', 'fast-velocity-minify' ); ?> ]</span></label>
|
31 |
+
<br />
|
32 |
+
|
33 |
+
<label for="fvm_settings_global_force-ssl">
|
34 |
+
<input name="fvm_settings[global][force-ssl]" type="checkbox" id="fvm_settings_global_force-ssl" value="1" <?php echo fvm_get_settings_checkbox(fvm_get_settings_value($fvm_settings, 'global', 'force-ssl')); ?>>
|
35 |
+
<?php _e( 'Force HTTPS urls on merged files', 'fast-velocity-minify' ); ?> <span class="note-info">[ <?php _e( 'Recommended if you have SSL but still allow http access to the site.', 'fast-velocity-minify' ); ?> ]</span></label>
|
36 |
+
<br />
|
37 |
+
|
38 |
+
</fieldset></td>
|
39 |
+
</tr>
|
40 |
+
|
41 |
+
</tbody>
|
42 |
+
</table>
|
43 |
+
|
44 |
+
|
45 |
<h2 class="title"><?php _e( 'HTML Settings', 'fast-velocity-minify' ); ?></h2>
|
46 |
<h3 class="fvm-bold-green"><?php _e( 'Optimize your HTML and remove some clutter from the HTML page.', 'fast-velocity-minify' ); ?></h3>
|
47 |
|
112 |
<?php _e( 'Disable CSS Minification', 'fast-velocity-minify' ); ?> <span class="note-info">[ <?php _e( 'Will allow merging but without CSS minification for testing purposes', 'fast-velocity-minify' ); ?> ]</span></label>
|
113 |
<br />
|
114 |
|
115 |
+
<label for="fvm_settings_css_inline-all">
|
116 |
+
<input name="fvm_settings[css][inline-all]" type="checkbox" id="fvm_settings_css_inline-all" value="1" <?php echo fvm_get_settings_checkbox(fvm_get_settings_value($fvm_settings, 'css', 'inline-all')); ?>>
|
117 |
+
<?php _e( 'Disable Merging and Inline all CSS', 'fast-velocity-minify' ); ?> <span class="note-info">[ <?php _e( 'It will inline all CSS files, instead of merging CSS into an external file (not recommended)', 'fast-velocity-minify' ); ?> ]</span></label>
|
118 |
+
<br />
|
119 |
+
|
120 |
<label for="fvm_settings_css_noprint">
|
121 |
<input name="fvm_settings[css][noprint]" type="checkbox" id="fvm_settings_css_noprint" value="1" <?php echo fvm_get_settings_checkbox(fvm_get_settings_value($fvm_settings, 'css', 'noprint')); ?>>
|
122 |
<?php _e( 'Remove "Print" CSS files', 'fast-velocity-minify' ); ?> <span class="note-info">[ <?php _e( 'Will remove CSS files of mediatype "print" from the frontend', 'fast-velocity-minify' ); ?> ]</span></label>
|
124 |
|
125 |
<label for="fvm_settings_css_fonts">
|
126 |
<input name="fvm_settings[css][fonts]" type="checkbox" id="fvm_settings_css_fonts" value="1" <?php echo fvm_get_settings_checkbox(fvm_get_settings_value($fvm_settings, 'css', 'fonts')); ?>>
|
127 |
+
<?php _e( 'Merge Fonts and Icons separately', 'fast-velocity-minify' ); ?><span class="note-info">[ <?php _e( 'Will merge fonts and icons into a separate CSS file', 'fast-velocity-minify' ); ?> ]</span></label>
|
128 |
<br />
|
129 |
|
130 |
<label for="fvm_settings_css_async">
|
136 |
</tr>
|
137 |
|
138 |
<tr>
|
139 |
+
<th scope="row"><?php _e( 'Ignore CSS files', 'fast-velocity-minify' ); ?></th>
|
140 |
<td><fieldset>
|
141 |
<label for="fvm_settings_css_ignore"><span class="fvm-bold-green fvm-rowintro"><?php _e( "Ignore the following CSS URL's", 'fast-velocity-minify' ); ?></span></label>
|
142 |
<p><textarea name="fvm_settings[css][ignore]" rows="7" cols="50" id="fvm_settings_css_ignore" class="large-text code" placeholder="ex: /plugins/something/assets/problem.css"><?php echo fvm_get_settings_value($fvm_settings, 'css', 'ignore'); ?></textarea></p>
|
146 |
</tr>
|
147 |
|
148 |
<tr>
|
149 |
+
<th scope="row"><?php _e( 'Remove CSS Files', 'fast-velocity-minify' ); ?></th>
|
150 |
<td><fieldset>
|
151 |
<label for="fvm_settings_css_remove"><span class="fvm-bold-green fvm-rowintro"><?php _e( 'Remove the following CSS files', 'fast-velocity-minify' ); ?></span></label>
|
152 |
<p><textarea name="fvm_settings[css][remove]" rows="7" cols="50" id="fvm_settings_css_remove" class="large-text code" placeholder="ex: fonts.googleapis.com"><?php echo fvm_get_settings_value($fvm_settings, 'css', 'remove'); ?></textarea></p>
|
193 |
</tr>
|
194 |
|
195 |
|
196 |
+
<tr>
|
197 |
+
<th scope="row"><?php _e( 'Ignore Script Files', 'fast-velocity-minify' ); ?></th>
|
198 |
+
<td><fieldset>
|
199 |
+
<label for="fvm_settings_js_ignore"><span class="fvm-bold-green fvm-rowintro"><?php _e( 'Will prevent merging and minification for these files, regardless of any other broader rules in this page.', 'fast-velocity-minify' ); ?></span></label>
|
200 |
+
<p><textarea name="fvm_settings[js][ignore]" rows="7" cols="50" id="fvm_settings_js_ignore" class="large-text code" placeholder="<?php _e( '--- a small snippet that should match an inline script and make it wait for the deferred scripts above ---', 'fast-velocity-minify' ); ?>"><?php echo fvm_get_settings_value($fvm_settings, 'js', 'ignore'); ?></textarea></p>
|
201 |
+
<p class="description">[ <?php _e( 'Will match using <code>PHP stripos</code> against the script <code>src</code> attribute', 'fast-velocity-minify' ); ?> ]</p>
|
202 |
+
<p class="description">[ <?php _e( 'It is highly recommended to try to leave this empty and later be more specific on what to merge', 'fast-velocity-minify' ); ?> ]</p>
|
203 |
+
</fieldset></td>
|
204 |
+
</tr>
|
205 |
|
206 |
<tr>
|
207 |
<th scope="row"><?php _e( 'Merge render blocking JS files in the header', 'fast-velocity-minify' ); ?></th>
|
208 |
<td><fieldset>
|
209 |
<label for="fvm_settings_merge_header"><span class="fvm-bold-green fvm-rowintro"><?php _e( 'This will merge and render block all JS files that match the paths below', 'fast-velocity-minify' ); ?></span></label>
|
210 |
+
<p><textarea name="fvm_settings[js][merge_header]" rows="7" cols="50" id="fvm_settings_js_merge_header" class="large-text code" placeholder="<?php _e( '--- suggested ---', 'fast-velocity-minify' ); ?>
|
211 |
|
212 |
/jquery-migrate.js
|
213 |
/jquery.js
|
235 |
<th scope="row"><?php _e( 'Inline JavaScript Dependencies', 'fast-velocity-minify' ); ?></th>
|
236 |
<td><fieldset>
|
237 |
<label for="fvm_settings_defer_dependencies"><span class="fvm-bold-green fvm-rowintro"><?php _e( 'Delay Inline JavaScript until after the deferred scripts merged above finish loading', 'fast-velocity-minify' ); ?></span></label>
|
238 |
+
<p><textarea name="fvm_settings[js][defer_dependencies]" rows="7" cols="50" id="fvm_settings_js_defer_dependencies" class="large-text code" placeholder="<?php _e( '--- a small snippet that should match an inline script and make it wait for the deferred scripts above ---', 'fast-velocity-minify' ); ?>"><?php echo fvm_get_settings_value($fvm_settings, 'js', 'defer_dependencies'); ?></textarea></p>
|
239 |
<p class="description">[ <?php _e( 'Inline JavaScript matching these rules, will wait until after the window.load event', 'fast-velocity-minify' ); ?> ]</p>
|
240 |
<p class="description">[ <?php _e( 'Will match using <code>PHP stripos</code> against the script <code>innerHTML</code>', 'fast-velocity-minify' ); ?> ]</p>
|
241 |
</fieldset></td>
|
324 |
|
325 |
|
326 |
<div style="height: 60px;"></div>
|
327 |
+
<h2 class="title"><?php _e( 'Cache Location', 'fast-velocity-minify' ); ?></h2>
|
328 |
<h3 class="fvm-bold-green"><?php _e( 'FVM does not have page caching, so these settings are for the generated CSS and JS files only', 'fast-velocity-minify' ); ?></h3>
|
329 |
<table class="form-table fvm-settings">
|
330 |
<tbody>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
331 |
<tr>
|
332 |
<th scope="row"><span class="fvm-label-special"><?php _e( 'Public Files Cache Path', 'fast-velocity-minify' ); ?></span></th>
|
333 |
<td><fieldset>
|
layout/admin-layout.php
CHANGED
@@ -8,7 +8,7 @@ $at = isset($_GET['tab']) ? $_GET['tab'] : 'settings';
|
|
8 |
?>
|
9 |
|
10 |
<h2 class="nav-tab-wrapper wp-clearfix">
|
11 |
-
<a href="?page=fvm" class="nav-tab <?php echo $at == 'settings' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Settings', 'fast-velocity-minify' ); ?></a>
|
12 |
<a href="?page=fvm&tab=status" class="nav-tab <?php echo $at == 'status' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Status', 'fast-velocity-minify' ); ?></a>
|
13 |
<?php /*<a href="?page=fvm&tab=upgrade" class="nav-tab <?php echo $at == 'upgrade' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Upgrade', 'fast-velocity-minify' ); ?></a>*/ ?>
|
14 |
<a href="?page=fvm&tab=help" class="nav-tab <?php echo $at == 'help' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Help', 'fast-velocity-minify' ); ?></a>
|
8 |
?>
|
9 |
|
10 |
<h2 class="nav-tab-wrapper wp-clearfix">
|
11 |
+
<a href="?page=fvm" class="nav-tab <?php echo $at == 'settings' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Settings', 'fast-velocity-minify' ); ?></a>
|
12 |
<a href="?page=fvm&tab=status" class="nav-tab <?php echo $at == 'status' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Status', 'fast-velocity-minify' ); ?></a>
|
13 |
<?php /*<a href="?page=fvm&tab=upgrade" class="nav-tab <?php echo $at == 'upgrade' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Upgrade', 'fast-velocity-minify' ); ?></a>*/ ?>
|
14 |
<a href="?page=fvm&tab=help" class="nav-tab <?php echo $at == 'help' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Help', 'fast-velocity-minify' ); ?></a>
|
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
|
@@ -52,6 +52,14 @@ Version 3.0 is a major code rewrite to improve JS and CSS merging, but it requir
|
|
52 |
|
53 |
== Changelog ==
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
= 3.0.1 [2020.12.27] =
|
56 |
* Added initial translation support under the "fast-velocity-minify" text domain.
|
57 |
|
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.2
|
7 |
Tested up to: 5.6
|
8 |
Text Domain: fast-velocity-minify
|
9 |
License: GPLv3 or later
|
52 |
|
53 |
== Changelog ==
|
54 |
|
55 |
+
= 3.0.2 [2020.12.29] =
|
56 |
+
* Added option to preserve settings on uninstall
|
57 |
+
* Added option to inline all CSS (merging is still the recommended method)
|
58 |
+
* Added option to force HTTPS on the generated cache file urls
|
59 |
+
* Added an ignore list to the JS section (also imported from FVM 2 settings)
|
60 |
+
* Improved compatibility with FVM 2 (you still need to specify what JS paths you want to merge)
|
61 |
+
* Preserve the old FVM 2 settings on the database (will be removed on version 3.1)
|
62 |
+
|
63 |
= 3.0.1 [2020.12.27] =
|
64 |
* Added initial translation support under the "fast-velocity-minify" text domain.
|
65 |
|