Fast Velocity Minify - Version 2.7.5

Version Description

[2019.10.09] = * added support to "after" scripts added via wp_add_inline_script

Download this release

Release Info

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

Code changes from version 2.7.7 to 2.7.5

Files changed (2) hide show
  1. fvm.php +11 -10
  2. readme.txt +291 -8
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.7.7
9
  License: GPL2
10
 
11
  ------------------------------------------------------------------------
@@ -195,6 +195,13 @@ if(is_admin()) {
195
 
196
  } else {
197
  add_action('setup_theme', 'fastvelocity_process_frontend' );
 
 
 
 
 
 
 
198
  }
199
 
200
  function fastvelocity_process_frontend() {
@@ -222,11 +229,6 @@ function fastvelocity_process_frontend() {
222
  }
223
 
224
  }
225
- if(!$skip_emoji_removal) {
226
- add_action( 'init', 'fastvelocity_min_disable_wp_emojicons' );
227
- add_filter( 'tiny_mce_plugins', 'fastvelocity_disable_emojis_tinymce' );
228
- }
229
-
230
  if($fvm_clean_header_one) {
231
  # no resource hints, generator tag, shortlinks, manifest link, etc
232
  remove_action('wp_head', 'wp_resource_hints', 2);
@@ -237,7 +239,6 @@ function fastvelocity_process_frontend() {
237
  remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
238
  remove_action('wp_head','feed_links', 2);
239
  remove_action('wp_head','feed_links_extra', 3);
240
- add_filter('after_setup_theme', 'fastvelocity_remove_redundant_shortlink');
241
  }
242
 
243
  # enable html minification
@@ -258,7 +259,7 @@ function fastvelocity_process_frontend() {
258
  add_filter('script_loader_tag', 'fastvelocity_min_defer_js', 10, 3);
259
 
260
  # headers
261
- add_action( 'send_headers', 'fvm_extra_preload_headers' );
262
  add_action( 'wp_footer', 'fastvelocity_generate_preload_headers', PHP_INT_MAX);
263
  add_filter( 'script_loader_tag', 'fastvelocity_collect_js_preload_headers', PHP_INT_MAX, 3 );
264
 
@@ -270,7 +271,7 @@ add_action( 'plugins_loaded', 'fastvelocity_fix_editor' );
270
  function fastvelocity_fix_editor() {
271
  global $fvm_fix_editor;
272
  if($fvm_fix_editor == true && is_user_logged_in()) {
273
- remove_action('setup_theme', 'fastvelocity_process_frontend' );
274
  }
275
  }
276
 
@@ -303,7 +304,7 @@ function fastvelocity_admintoolbar() {
303
 
304
  # function to list all cache files
305
  function fastvelocity_min_files_callback() {
306
-
307
  # must be able to cleanup cache
308
  if (!current_user_can('manage_options')) {
309
  wp_die( __('You do not have sufficient permissions to access this page.'));
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.7.5
9
  License: GPL2
10
 
11
  ------------------------------------------------------------------------
195
 
196
  } else {
197
  add_action('setup_theme', 'fastvelocity_process_frontend' );
198
+
199
+ # emoji needs to be early
200
+ if(!$skip_emoji_removal) {
201
+ add_action( 'init', 'fastvelocity_min_disable_wp_emojicons' );
202
+ add_filter( 'tiny_mce_plugins', 'fastvelocity_disable_emojis_tinymce' );
203
+ }
204
+
205
  }
206
 
207
  function fastvelocity_process_frontend() {
229
  }
230
 
231
  }
 
 
 
 
 
232
  if($fvm_clean_header_one) {
233
  # no resource hints, generator tag, shortlinks, manifest link, etc
234
  remove_action('wp_head', 'wp_resource_hints', 2);
239
  remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
240
  remove_action('wp_head','feed_links', 2);
241
  remove_action('wp_head','feed_links_extra', 3);
 
242
  }
243
 
244
  # enable html minification
259
  add_filter('script_loader_tag', 'fastvelocity_min_defer_js', 10, 3);
260
 
261
  # headers
262
+ add_action( 'template_redirect', 'fvm_extra_preload_headers', -PHP_INT_MAX);
263
  add_action( 'wp_footer', 'fastvelocity_generate_preload_headers', PHP_INT_MAX);
264
  add_filter( 'script_loader_tag', 'fastvelocity_collect_js_preload_headers', PHP_INT_MAX, 3 );
265
 
271
  function fastvelocity_fix_editor() {
272
  global $fvm_fix_editor;
273
  if($fvm_fix_editor == true && is_user_logged_in()) {
274
+ remove_action('theme_setup', 'fastvelocity_process_frontend' );
275
  }
276
  }
277
 
304
 
305
  # function to list all cache files
306
  function fastvelocity_min_files_callback() {
307
+
308
  # must be able to cleanup cache
309
  if (!current_user_can('manage_options')) {
310
  wp_die( __('You do not have sufficient permissions to access this page.'));
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, Speed, Fast
4
  Requires at least: 4.7
5
  Requires PHP: 5.6
6
- Stable tag: 2.7.7
7
  Tested up to: 5.3
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -198,12 +198,6 @@ Please backup your site before updating. Version 3.0 will have a major code rewr
198
 
199
  == Changelog ==
200
 
201
- = 2.7.7 [2019.10.15] =
202
- * added a capability check on the status page ajax request, which could show the cache file path when debug mode is enabled to subscribers
203
-
204
- = 2.7.6 [2019.10.10] =
205
- * bug fix release
206
-
207
  = 2.7.5 [2019.10.09] =
208
  * added support to "after" scripts added via wp_add_inline_script
209
 
@@ -265,8 +259,297 @@ Please backup your site before updating. Version 3.0 will have a major code rewr
265
  * improved compatibility with page cache plugins and servers (purging FVM without purging the page cache should be fine now)
266
  * added a daily cronjob, to delete public invalid cache files that are older than 3 months (your page cache should expire before this)
267
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
268
  = 2.0.0 [2017.05.11] =
269
- * version 2.x branch release
 
 
 
 
 
 
 
270
 
271
  = 1.0 [2016.06.19] =
272
  * Initial Release
3
  Tags: PHP Minify, Lighthouse, GTmetrix, Pingdom, Pagespeed, CSS Merging, JS Merging, CSS Minification, JS Minification, Speed Optimization, HTML Minification, Performance, Optimization, Speed, Fast
4
  Requires at least: 4.7
5
  Requires PHP: 5.6
6
+ Stable tag: 2.7.5
7
  Tested up to: 5.3
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
198
 
199
  == Changelog ==
200
 
 
 
 
 
 
 
201
  = 2.7.5 [2019.10.09] =
202
  * added support to "after" scripts added via wp_add_inline_script
203
 
259
  * improved compatibility with page cache plugins and servers (purging FVM without purging the page cache should be fine now)
260
  * added a daily cronjob, to delete public invalid cache files that are older than 3 months (your page cache should expire before this)
261
 
262
+ = 2.5.9 [2019.02.19] =
263
+ * fixed some PHP notices, when wordpress fails to download a missing js/css file
264
+
265
+ = 2.5.8 [2019.02.06] =
266
+ * minor bug fix with the defer for pagespeed option
267
+
268
+ = 2.5.7 [2019.02.04] =
269
+ * reverted back the css merging method to version 2.5.2 due to some compatibility issues
270
+
271
+ = 2.5.6 [2019.01.18] =
272
+ * fixed some php notices
273
+ * disabled FVM on amp pages
274
+ * expected to be the last update on the 2.x branch, before 3.0 major release
275
+
276
+ = 2.5.5 [2019.01.12] =
277
+ * fixed the dynamic urls being forced as http://
278
+ * fixed the inlined styles being stripped when the inline all CSS option is enabled
279
+ * added option to disable merging of inlined css code (for when you have dynamic inline css code)
280
+ * other minor bug fixes
281
+
282
+ = 2.5.4 [2019.01.11] =
283
+ * css merging bug fixes
284
+
285
+ = 2.5.3 [2019.01.11] =
286
+ * fixed inlined css code being minified, even when minification is off
287
+ * compatibility and performance improvements for the CSS merging and inlining functionality
288
+
289
+ = 2.5.2 [2019.01.11] =
290
+ * removed CURL as a fallback method (CURL is already a fallback on the WP HTTP API) as per WP recommendation
291
+ * fixed a query monitor notice about mkdir
292
+ * removed some legacy code + some minor performance improvements on the code
293
+ * improvement for the defer for pagespeed option and ignore list
294
+ * improvement for the loadCSS functionality
295
+ * improvements for merging the google fonts option
296
+
297
+ = 2.5.1 [2018.12.17] =
298
+ * minor bug fix related to the font awesome option
299
+ * added cache purging support to Breeze (Cloudways)
300
+
301
+ = 2.5.0 [2018.12.13] =
302
+ * bug fixes with the google fonts merging option
303
+ * better default settings
304
+
305
+ = 2.4.9 [2018.12.13] =
306
+ * improved the google fonts merging to only allow existing google fonts (no more google fonts 404 errors due to the merging of the fonts)
307
+ * downgraded PHP Minify to version 1.3.60 due to someone reporting a server error with the new version
308
+
309
+ = 2.4.8 [2018.12.07] =
310
+ * changed the file permissions for the generated cache directory and files, to match the uploads directory
311
+ * added some extra checks for when PHP is running in safe mode
312
+
313
+ = 2.4.7 [2018.12.06] =
314
+ * added better default options after new install
315
+ * added option to preserve FVM settings on deactivation
316
+ * added an HTML comment to the frontend with the path and notification, when FVM cannot generate the cache files (ie: wrong file permissions)
317
+ * added a notification on wp-admin when FVM cannot generate the cache files due to wrong permissions
318
+ * added an option to force "chmod 0777" on FVM cache files, to avoid errors on servers that need more than "chmod 0755"
319
+ * improved the google fonts merging option when the enqueue is faulty (ie: incomplete google font urls )
320
+ * fixed the cache purge notifications not showing on wp-admin
321
+
322
+ = 2.4.6 [2018.12.05] =
323
+ * fixed a bug that could cause an error 500 if an enqueued CSS or JS file was not found
324
+ * added brotli_static support, if you have the php-ext-brotli extension installed - https://github.com/kjdev/php-ext-brotli
325
+
326
+ = 2.4.5 [2018.12.04] =
327
+ * fixed a bug, where it may show a warning during cache purge on wp-admin
328
+ * exclude footer FVM generated files from the HTTP header preload option (footer files are not in the critical path)
329
+
330
+ = 2.4.4 [2018.12.03] =
331
+ * added option to inline CSS in the footer, while still preserving the merged file in the header
332
+ * improvements for the google fonts merging option
333
+ * fixed double notification, when purging caches without a cache plugin
334
+
335
+ = 2.4.3 [2018.12.03] =
336
+ * added font-display, to ensure text remains visible during webfont load for inlined google fonts and font-awesome
337
+ * added automatic removal of "source mappings" from JS files during merging or minification
338
+ * added font awesome async and exclusion from PSI options, as well as merging and inlining when the url matches "font-awesome" (ie: cdnjs)
339
+ * added automatically inline of small CSS code (up to 20KB) for any FVM CSS files in the footer (requests reduction)
340
+ * added automatically inline of small CSS code (up to 20KB) for any FVM CSS files in the header, which are not of mediatype "all"
341
+ * improved the cache purge button (no more redirect from frontend to backend)
342
+ * updated PHP Minify and Path Converter from master
343
+ * bug fixes related to "Exclude JS files from PSI" option
344
+
345
+ = 2.4.2 [2018.11.29] =
346
+ * fixed a bug with the "Exclude JS files in the ignore list from PSI" option (it wasn't excluding properly)
347
+ * improved functionality with the "Exclude CSS files from PSI" option (now works with both inline and link stylesheets)
348
+ * added an option to automatically preload the CSS and JS files generated by FVM (beware that some server caches like Pantheon may push old css and js files even after purging caches on FVM)
349
+ * improved JavaScript minification
350
+
351
+ = 2.4.1 [2018.11.27] =
352
+ * better FVM default settings
353
+
354
+ = 2.4.0 [2018.11.26] =
355
+ * bug fixes related to the inline css option
356
+ * changed a few options and added better descriptions to the admin options
357
+
358
+ = 2.3.9 [2018.11.24] =
359
+ * there was an error on my end while pushing 2.3.8... this is a version bump
360
+
361
+ = 2.3.8 [2018.11.24] =
362
+ * removed the dynamic protocol in favour of auto detecting HTTP(s)
363
+ * fixed a bug where some CSS files were being removed with the latest CSS inline method
364
+ * fixed a bug where the wrong file path was being generated for fonts and some static assets (when the plugin or theme, uses relative paths and the Inline CSS option is enabled)
365
+
366
+ = 2.3.7 [2018.11.24] =
367
+ * bug fixes and performance improvements
368
+ * changed a few "options" location to other tabs
369
+ * changed the "Inline CSS" method to inline each file right separatly, instead of merging it and then inline it (also improves compatibility)
370
+ * added option to exclude JS and CSS files from PSI separatly (will load them Async, so make sure to read the instructions for each)
371
+ * added a dedicated Critical Path CSS for "is_front_page" (more conditionals on the roadmap)
372
+ * renamed some labels to be more explicit regardless of what they do
373
+
374
+ = 2.3.6 [2018.11.20] =
375
+ * added better header preloader and preconnect headers for css and js files
376
+ * added support to automatically purge the cache enabler plugin
377
+ * added option to reload the cache, while preserving the old static files
378
+ * added better default options after first install
379
+ * added and reorganized some options
380
+ * added a new developers tab
381
+ * removed the YUI compressor option (defaults to PHP Minify)
382
+ * readme and screenshots update
383
+ * tested up to WP 5.0 tag
384
+
385
+ = 2.3.5 [2018.08.27] =
386
+ * added thinkwithgoogle support for the defer for insights option
387
+ * added HyperCache support, thanks to @erich_k4wp
388
+ * added suport for wp_add_inline_script, thanks to @yuriipavlov
389
+ * fixed a bug where some inlined css was missing if not attached to a parent css file
390
+ * the ignore list now also supports CSS handle names (no JS yet)
391
+ * updated PHP Minify from master on github
392
+ * improved performance for gtmetrix tests
393
+
394
+ = 2.3.4 [2018.06.30] =
395
+ * bug fix
396
+
397
+ = 2.3.3 [2018.06.30] =
398
+ * added a check to prevent creating an empty js or css file
399
+ * added an option to force the CDN option when using the defer for insights option
400
+ * removed the alternative HTML minification method
401
+ * minor performance and bug fixes
402
+
403
+ = 2.3.2 [2018.06.03] =
404
+ * added some compatibility fixes when merging and minifying JS files
405
+ * added an option to enable an "FVM Purge" button on the admin bar
406
+ * moved all large transients (cached css or js code) to temporary disk files to reduce the database load
407
+
408
+ = 2.3.1 [2018.06.01] =
409
+ * bug fixes and performance tweaks for the "fix page editors" option
410
+
411
+ = 2.3.0 [2018.05.24] =
412
+ * added wp cli support for purge cache (usage: wp fvm purge)
413
+ * added wp cli support for getting the cache size (usage: wp fvm stats)
414
+
415
+ = 2.2.9 [2018.05.23] =
416
+ * fixed several bugs related to notices, css minification and file paths
417
+ * added more pcre.backtrack_limit and pcre.recursion_limit to avoid blank pages on some servers
418
+ * added new option to defer the ignore list for pagespeed
419
+
420
+ = 2.2.8 [2018.01.21] =
421
+ * rollback to 2.2.6 + bugfixes
422
+
423
+ = 2.2.7 [2018.02.19] =
424
+ * fixed a bug with the blacklist functionality
425
+ * replaced PHP Minify with JSMin as the default JS minification
426
+ * replaced PHP Minify with CSSTidy as the default CSS minification
427
+ * replaced PHP Minify with Minify HTML as the default HTML minification
428
+ * moved the intermediary cache from transients to disk files
429
+
430
+ = 2.2.6 [2018.01.06] =
431
+ * fixed a bug with html minification on some files that should not be minified
432
+ * fixed a bug with the defer for pagespeed insights
433
+ * updated the default blacklist (delete all entries and save again, to restore)
434
+
435
+ = 2.2.5 [2017.12.18] =
436
+ * fixed a fatal error reported on the support forum
437
+
438
+ = 2.2.4 [2017.12.17] =
439
+ * added custom cache directory and url support
440
+ * cleaned up some old unused code
441
+ * updated to the latest PHP Minify version
442
+ * added better descriptions and labels for some options
443
+ * added auto exclusion for js and css files when defer for pagespeed is enabled
444
+
445
+ = 2.2.3 [2017.12.16] =
446
+ * added robots.txt and ajax requests to the exclusion list
447
+ * added some cdn fixes
448
+ * added a new Pro tab
449
+ * added a global critical path css section
450
+ * added an option to dequeue all css files
451
+ * added an option to load CSS Async with LoadCSS (experimental)
452
+ * added an option to merge external resources together
453
+ * added the possibility to manage the default ignore list (reported files that cause conflicts when merged)
454
+ * added the possibility to manage the blacklist (files that cannot be merged with normal files)
455
+ * added better descriptions and labels for some options
456
+
457
+ = 2.2.2 [2017.11.12] =
458
+ * fixed the current cdn option box
459
+ * fixed some other minor bugs and notices
460
+ * added option to remove all enqueued google fonts (so you can use your own CSS @fontfaces manually)
461
+ * added font hinting for the "Inline Google Fonts CSS" option, so it looks better on Windows
462
+
463
+ = 2.2.1 [2017.08.21] =
464
+ * added unicode support to the alternative html minification option
465
+ * improved some options description
466
+
467
+ = 2.2.0 [2017.08.13] =
468
+ * fixed some debug notices
469
+ * fixed the alternative html minification option
470
+
471
+ = 2.1.9 [2017.08.11] =
472
+ * fixed a development bug
473
+
474
+ = 2.1.8 [2017.08.11] =
475
+ * fixed the html minification not working
476
+ * added support for the cdn enabler plugin (force http or https method)
477
+
478
+ = 2.1.7 [2017.07.17] =
479
+ * improved html minification speed and response time to the first byte
480
+ * fixed a random bug with the html minification library on large html pages (white pages)
481
+ * added support for the "Nginx Cache" plugin purge, by Till Krüss
482
+
483
+ = 2.1.6 [2017.07.17] =
484
+ * fixed a php notice in debug mode
485
+ * children styles (added with wp_add_inline_style) are now kept in order and merged together in place
486
+ * added faqs for possible "visual composer" issues
487
+
488
+ = 2.1.5 [2017.07.17] =
489
+ * css bug fixes and performance improvements
490
+ * added support for auto purging on WP Engine
491
+
492
+ = 2.1.4 [2017.07.14] =
493
+ * added compatibility with WP Engine.com and other providers that use a CNAME with their own subdomain
494
+
495
+ = 2.1.3 [2017.07.11] =
496
+ * updated PHP Minify for better compatibility
497
+ * added an alternative mode for html minification (because PHP Minify sometimes breaks things)
498
+ * css bug fixes and performance improvements
499
+
500
+ = 2.1.2 [2017.06.27] =
501
+ * fixed another error notice when debug mode is on
502
+
503
+ = 2.1.1 [2017.06.24] =
504
+ * fixed an error notice
505
+
506
+ = 2.1.0 [2017.06.21] =
507
+ * some performance improvements
508
+
509
+ = 2.0.9 [2017.06.01] =
510
+ * several bug and compatibility fixes
511
+
512
+ = 2.0.8 [2017.05.28] =
513
+ * fixed a notice alert on php for undefined function
514
+
515
+ = 2.0.7 [2017.05.28] =
516
+ * added support for auto purging of LiteSpeed Cache
517
+ * added support for auto purging on Godaddy Managed WordPress Hosting
518
+ * added the ie only blacklist, wich doesn't split merged files anymore, like the ignore list does
519
+ * added auto updates for the default ignore list and blacklist from our api once every 24 hours
520
+ * added cdn rewrite support for generated css and js files only
521
+ * removed url protocol rewrites and set default to dynamic "//" protocols
522
+ * updated the faqs
523
+
524
+ = 2.0.6 [2017.05.22] =
525
+ * added a "Troubleshooting" option to fix frontend editors for admin and editor level users
526
+ * updated the faqs
527
+
528
+ = 2.0.5 [2017.05.15] =
529
+ * fixed preserving the SVG namespace definition "http://www.w3.org/2000/svg" used on Bootstrap 4
530
+ * added some exclusions for Thrive and Visual Composer frontend preview and editors
531
+
532
+ = 2.0.4 [2017.05.15] =
533
+ * improved compatibility with Windows operating systems
534
+
535
+ = 2.0.3 [2017.05.15] =
536
+ * fixed an "undefined" notice
537
+
538
+ = 2.0.2 [2017.05.14] =
539
+ * improved compatibility on JS merging and minification
540
+
541
+ = 2.0.1 [2017.05.11] =
542
+ * fixed missing file that caused some errors on new installs
543
+
544
  = 2.0.0 [2017.05.11] =
545
+ * moved the css and js merging base code back to 1.4.3 because it was better for compatibility
546
+ * removed the font awesome optimization tweaks because people have multiple versions and requirements (but duplicate css and js files are always removed)
547
+ * added all usable improvements and features up to 1.5.2, except for the "Defer CSS" and "Critical Path" features (will consider for the future)
548
+ * added info to the FAQ's about our internal blacklist for known CSS or JS files that are always ignored by the plugin
549
+ * changed the way CSS and JS files are fetched and merged to make use of the new improvements that were supposed to be on 1.4.4+
550
+ * changed the advanced settings tab back to the settings page for quicker selection of options by the advanced users
551
+ * changed the cache purging option to also delete our plugin transients via the API, rather than just let them expire
552
+ * changed the "Inline all CSS" option into header and footer separately
553
 
554
  = 1.0 [2016.06.19] =
555
  * Initial Release