Fast Velocity Minify - Version 2.3.1

Version Description

[2018.06.01] = * bug fixes and performance tweaks for the "fix page editors" option

Download this release

Release Info

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

Code changes from version 2.3.0 to 2.3.1

Files changed (3) hide show
  1. fvm.php +41 -41
  2. inc/functions-cli.php +2 -8
  3. readme.txt +5 -2
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.3.0
9
  License: GPL2
10
 
11
  ------------------------------------------------------------------------
@@ -157,48 +157,62 @@ if(is_admin()) {
157
  # skip on certain post_types or if there are specific keys on the url or if editor or admin
158
  if(!fastvelocity_exclude_contents()) {
159
 
160
- # actions for frontend only
161
- if(!$disable_js_merge) {
162
- add_action( 'wp_print_scripts', 'fastvelocity_min_merge_header_scripts', PHP_INT_MAX );
163
- add_action( 'wp_print_footer_scripts', 'fastvelocity_min_merge_footer_scripts', 9.999999 );
164
- }
165
- if(!$disable_css_merge) {
166
- add_action('wp_head', 'fvm_buffer_placeholder_top', 0);
167
- add_action('wp_print_styles', 'fastvelocity_min_merge_header_css', PHP_INT_MAX );
168
- add_action('wp_print_footer_scripts', 'fastvelocity_min_merge_footer_css', 9.999999 );
169
- }
170
- if(!$skip_emoji_removal) {
171
- add_action( 'init', 'fastvelocity_min_disable_wp_emojicons' );
172
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
 
174
  }
175
  }
176
 
177
 
178
-
179
  # exclude processing for editors and administrators (fix editors)
180
  add_action( 'plugins_loaded', 'fastvelocity_fix_editor' );
181
  function fastvelocity_fix_editor() {
182
  global $fvm_fix_editor, $disable_js_merge, $disable_css_merge, $skip_emoji_removal;
183
- if($fvm_fix_editor == true && is_user_logged_in()) {
184
- if(!$disable_js_merge) {
185
- remove_action( 'wp_print_scripts', 'fastvelocity_min_merge_header_scripts', PHP_INT_MAX );
186
- remove_action( 'wp_print_footer_scripts', 'fastvelocity_min_merge_footer_scripts', 9.999999 );
187
- }
188
- if(!$disable_css_merge) {
189
  remove_action('wp_head', 'fvm_buffer_placeholder_top', 0);
190
  remove_action('wp_print_styles', 'fastvelocity_min_merge_header_css', PHP_INT_MAX );
191
  remove_action('wp_print_footer_scripts', 'fastvelocity_min_merge_footer_css', 9.999999 );
192
- }
193
- if(!$skip_emoji_removal) {
194
- remove_action( 'init', 'fastvelocity_min_disable_wp_emojicons' );
195
- }
196
- }
 
 
197
  }
198
 
199
 
200
  # delete the cache when we deactivate the plugin
201
- function fastvelocity_min_plugin_deactivate() { fvm_purge_all(); }
 
 
202
 
203
 
204
  # create admin menu
@@ -1739,8 +1753,6 @@ if($force_inline_css == true && $loadcss != false && $fvm_remove_css != true) {
1739
  }
1740
  }
1741
 
1742
- if (!is_admin()) { add_action('wp_head', 'fvm_add_loadcss', PHP_INT_MAX); }
1743
-
1744
 
1745
 
1746
 
@@ -1822,16 +1834,4 @@ return $tag;
1822
  }
1823
 
1824
 
1825
- # remove query from static assets and process defering (if enabled)
1826
- if (!is_admin()) {
1827
- add_filter('style_loader_src', 'fastvelocity_remove_cssjs_ver', 10, 2);
1828
- add_filter('script_loader_tag', 'fastvelocity_min_defer_js', 10, 3);
1829
- add_filter('script_loader_tag', 'fastvelocity_min_defer_js_optimize', 10, 3);
1830
- }
1831
-
1832
-
1833
- # enable html minification
1834
- if(!$skip_html_minification && !is_admin()) {
1835
- add_action('template_redirect', 'fastvelocity_min_html_compression_start', PHP_INT_MAX);
1836
- }
1837
 
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.3.1
9
  License: GPL2
10
 
11
  ------------------------------------------------------------------------
157
  # skip on certain post_types or if there are specific keys on the url or if editor or admin
158
  if(!fastvelocity_exclude_contents()) {
159
 
160
+ # actions for frontend only
161
+ if(!$disable_js_merge) {
162
+ add_action( 'wp_print_scripts', 'fastvelocity_min_merge_header_scripts', PHP_INT_MAX );
163
+ add_action( 'wp_print_footer_scripts', 'fastvelocity_min_merge_footer_scripts', 9.999999 );
164
+ }
165
+ if(!$disable_css_merge) {
166
+ add_action('wp_head', 'fvm_buffer_placeholder_top', 0);
167
+ add_action('wp_print_styles', 'fastvelocity_min_merge_header_css', PHP_INT_MAX );
168
+ add_action('wp_print_footer_scripts', 'fastvelocity_min_merge_footer_css', 9.999999 );
169
+ }
170
+ if(!$skip_emoji_removal) {
171
+ add_action( 'init', 'fastvelocity_min_disable_wp_emojicons' );
172
+ }
173
+
174
+ # enable html minification
175
+ if(!$skip_html_minification && !is_admin()) {
176
+ add_action('template_redirect', 'fastvelocity_min_html_compression_start', PHP_INT_MAX);
177
+ }
178
+
179
+ # when css async is on
180
+ add_action('wp_head', 'fvm_add_loadcss', PHP_INT_MAX);
181
+
182
+
183
+ # remove query from static assets and process defering (if enabled)
184
+ add_filter('style_loader_src', 'fastvelocity_remove_cssjs_ver', 10, 2);
185
+ add_filter('script_loader_tag', 'fastvelocity_min_defer_js', 10, 3);
186
+ add_filter('script_loader_tag', 'fastvelocity_min_defer_js_optimize', 10, 3);
187
 
188
  }
189
  }
190
 
191
 
 
192
  # exclude processing for editors and administrators (fix editors)
193
  add_action( 'plugins_loaded', 'fastvelocity_fix_editor' );
194
  function fastvelocity_fix_editor() {
195
  global $fvm_fix_editor, $disable_js_merge, $disable_css_merge, $skip_emoji_removal;
196
+ if($fvm_fix_editor == true && is_user_logged_in()) {
197
+ remove_action('wp_print_scripts', 'fastvelocity_min_merge_header_scripts', PHP_INT_MAX );
198
+ remove_action('wp_print_footer_scripts', 'fastvelocity_min_merge_footer_scripts', 9.999999 );
 
 
 
199
  remove_action('wp_head', 'fvm_buffer_placeholder_top', 0);
200
  remove_action('wp_print_styles', 'fastvelocity_min_merge_header_css', PHP_INT_MAX );
201
  remove_action('wp_print_footer_scripts', 'fastvelocity_min_merge_footer_css', 9.999999 );
202
+ remove_action('init', 'fastvelocity_min_disable_wp_emojicons');
203
+ remove_action('template_redirect', 'fastvelocity_min_html_compression_start', PHP_INT_MAX);
204
+ remove_action('wp_head', 'fvm_add_loadcss', PHP_INT_MAX);
205
+ remove_filter('style_loader_src', 'fastvelocity_remove_cssjs_ver', 10, 2);
206
+ remove_filter('script_loader_tag', 'fastvelocity_min_defer_js', 10, 3);
207
+ remove_filter('script_loader_tag', 'fastvelocity_min_defer_js_optimize', 10, 3);
208
+ }
209
  }
210
 
211
 
212
  # delete the cache when we deactivate the plugin
213
+ function fastvelocity_min_plugin_deactivate() {
214
+ fvm_purge_all();
215
+ }
216
 
217
 
218
  # create admin menu
1753
  }
1754
  }
1755
 
 
 
1756
 
1757
 
1758
 
1834
  }
1835
 
1836
 
 
 
 
 
 
 
 
 
 
 
 
 
1837
 
inc/functions-cli.php CHANGED
@@ -1,5 +1,6 @@
1
  <?php
2
 
 
3
  if ( defined( 'WP_CLI' ) && WP_CLI ) {
4
 
5
 
@@ -29,12 +30,5 @@ WP_CLI::add_command( 'fvm', 'fastvelocity_WPCLI' );
29
 
30
 
31
 
32
-
33
-
34
-
35
  ###################################################
36
-
37
- }
38
-
39
-
40
-
1
  <?php
2
 
3
+ # only for wp-cli
4
  if ( defined( 'WP_CLI' ) && WP_CLI ) {
5
 
6
 
30
 
31
 
32
 
 
 
 
33
  ###################################################
34
+ }
 
 
 
 
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: Alignak
3
  Tags: PHP Minify, YUI Compressor, GTmetrix, Pingdom, Pagespeed, CSS Merging, JS Merging, CSS Minification, JS Minification, Speed Optimization, HTML Minification, Performance
4
  Requires at least: 4.5
5
- Stable tag: 2.3.0
6
  Tested up to: 4.9.6
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -81,7 +81,7 @@ I can offer you aditional `custom made` optimization on top of this plugin. If y
81
  == Frequently Asked Questions ==
82
 
83
  = Why is Sucuri saying that there is a "potential" backdoor, or malware on the Server Info page ? =
84
- It’s a false positive, and “potential” doesn’t mean it is. The serverinfo.php page, is what you see when you click on the Server Info tab. That page exists for you to be able to diagnose what your server is running, so it’s basically an information page that fetches technical information from the server and shows it there. Furthermore, the plugins are manually reviewed by the WordPress Team, before going live, precisely to avoid that kind of malware situation. Kindly refer to this topic, for a more indepth explanation: https://wordpress.org/support/topic/malware-alert-3/
85
 
86
  ...
87
 
@@ -271,6 +271,9 @@ Note: Kindly re-save all options and purge all caches (the plugin cache as well
271
 
272
  == Changelog ==
273
 
 
 
 
274
  = 2.3.0 [2018.05.24] =
275
  * added wp cli support for purge cache (usage: wp fvm purge)
276
  * added wp cli support for getting the cache size (usage: wp fvm stats)
2
  Contributors: Alignak
3
  Tags: PHP Minify, YUI Compressor, GTmetrix, Pingdom, Pagespeed, CSS Merging, JS Merging, CSS Minification, JS Minification, Speed Optimization, HTML Minification, Performance
4
  Requires at least: 4.5
5
+ Stable tag: 2.3.1
6
  Tested up to: 4.9.6
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
81
  == Frequently Asked Questions ==
82
 
83
  = Why is Sucuri saying that there is a "potential" backdoor, or malware on the Server Info page ? =
84
+ It’s a false positive, but for a more indepth explanation: https://wordpress.org/support/topic/malware-alert-3/ In addition, note that I have reached out to Sucuri, which confirmed that they are aware of the false positive and are updating their signatures to remove that notice.
85
 
86
  ...
87
 
271
 
272
  == Changelog ==
273
 
274
+ = 2.3.1 [2018.06.01] =
275
+ * bug fixes and performance tweaks for the "fix page editors" option
276
+
277
  = 2.3.0 [2018.05.24] =
278
  * added wp cli support for purge cache (usage: wp fvm purge)
279
  * added wp cli support for getting the cache size (usage: wp fvm stats)