Speed Booster Pack - Version 1.9

Version Description

  • Fix: breaking the SEO by Yoast plugin interface (perhaps as well as to others too). Thanks @JahLive for the bug report.
  • Added an except for the admin toolbar css since the Load CSS asynchronously option removes its dashicons and stylesheets.
Download this release

Release Info

Developer tiguan
Plugin Icon 128x128 Speed Booster Pack
Version 1.9
Comparing to
See all releases

Code changes from version 1.8 to 1.9

inc/core.php CHANGED
@@ -20,6 +20,10 @@ if( !class_exists( 'Speed_Booster_Pack_Core' ) ) {
20
 
21
  $this->sbp_css_optimizer(); // CSS Optimizer functions
22
 
 
 
 
 
23
  // Use Google Libraries
24
  if ( !is_admin() and isset( $sbp_options['use_google_libs'] ) ) {
25
  $this->sbp_use_google_libraries();
@@ -64,6 +68,7 @@ if( !class_exists( 'Speed_Booster_Pack_Core' ) ) {
64
  add_filter( 'jpeg_quality', array( $this, 'filter_image_quality' ) );
65
  add_filter( 'wp_editor_set_quality', array( $this, 'filter_image_quality' ) );
66
 
 
67
  } // END public public function __construct
68
 
69
 
@@ -83,6 +88,17 @@ function sbp_init() {
83
  }
84
 
85
 
 
 
 
 
 
 
 
 
 
 
 
86
  /*--------------------------------------------------------------------------------------------------------
87
  Get image quality value if it's set. Otherwise it's set to 90
88
  ---------------------------------------------------------------------------------------------------------*/
20
 
21
  $this->sbp_css_optimizer(); // CSS Optimizer functions
22
 
23
+ if ( isset( $sbp_options['sbp_css_async'] ) ) {
24
+ add_action( 'wp_head', array( $this, 'sbp_except_admin_bar_css' ) );
25
+ }
26
+
27
  // Use Google Libraries
28
  if ( !is_admin() and isset( $sbp_options['use_google_libs'] ) ) {
29
  $this->sbp_use_google_libraries();
68
  add_filter( 'jpeg_quality', array( $this, 'filter_image_quality' ) );
69
  add_filter( 'wp_editor_set_quality', array( $this, 'filter_image_quality' ) );
70
 
71
+
72
  } // END public public function __construct
73
 
74
 
88
  }
89
 
90
 
91
+ /*--------------------------------------------------------------------------------------------------------
92
+ Add except for the admin toolbar css since the Async CSS removes the dashicons from the toolbar.
93
+ ---------------------------------------------------------------------------------------------------------*/
94
+
95
+ function sbp_except_admin_bar_css() {
96
+ wp_enqueue_style( 'open-sans' );
97
+ wp_enqueue_style( 'dashicons' );
98
+ wp_enqueue_style( 'admin-bar' );
99
+ }
100
+
101
+
102
  /*--------------------------------------------------------------------------------------------------------
103
  Get image quality value if it's set. Otherwise it's set to 90
104
  ---------------------------------------------------------------------------------------------------------*/
inc/template/options.php CHANGED
@@ -133,6 +133,21 @@
133
 
134
  <h3><?php _e( 'Change the default image compression level', 'sb-pack' ); ?></h3>
135
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  <script type='text/javascript'>
137
  var jpegCompression = '<?php echo $this->image_compression; ?>';
138
  </script>
@@ -249,19 +264,20 @@ var jpegCompression = '<?php echo $this->image_compression; ?>';
249
  </div> <!-- end wrap div -->
250
 
251
  <script>
252
- if (typeof(jQuery)!='undefined'){
253
- jQuery(document).ready(function (){
254
- validate();
255
- jQuery('input').change(function (){
256
- validate();
257
- })
258
- });
259
- function validate(){
260
- if (jQuery('input[id=sbp_css_async]').is(':checked')){
261
- jQuery('#sbp-css-content').show();
262
- }else{
263
- jQuery('#sbp-css-content').hide();
264
- }
265
- }
266
- }
 
267
  </script>
133
 
134
  <h3><?php _e( 'Change the default image compression level', 'sb-pack' ); ?></h3>
135
 
136
+ <script type='text/javascript'>
137
+ jQuery(document).ready(function () {
138
+ jQuery(".sbp-slider").slider({
139
+ value: jpegCompression,
140
+ min: 0,
141
+ max: 100,
142
+ step: 1,
143
+ slide: function (event, ui) {
144
+ jQuery(".sbp-amount").val(ui.value);
145
+ jQuery("#sbp_integer").val(ui.value);
146
+ }
147
+ });
148
+ jQuery(".sbp-amount").val(jQuery(".sbp-slider").slider("value"));
149
+ });
150
+ </script>
151
  <script type='text/javascript'>
152
  var jpegCompression = '<?php echo $this->image_compression; ?>';
153
  </script>
264
  </div> <!-- end wrap div -->
265
 
266
  <script>
267
+ if (typeof (jQuery) != 'undefined') {
268
+ jQuery(document).ready(function () {
269
+ validate();
270
+ jQuery('input').change(function () {
271
+ validate();
272
+ })
273
+ });
274
+
275
+ function validate() {
276
+ if (jQuery('input[id=sbp_css_async]').is(':checked')) {
277
+ jQuery('#sbp-css-content').show();
278
+ } else {
279
+ jQuery('#sbp-css-content').hide();
280
+ }
281
+ }
282
+ }
283
  </script>
js/sbp-slider.js DELETED
@@ -1,13 +0,0 @@
1
- jQuery( document ).ready( function () {
2
- jQuery( ".sbp-slider" ).slider({
3
- value: jpegCompression,
4
- min: 0,
5
- max: 100,
6
- step: 1,
7
- slide: function( event, ui ) {
8
- jQuery( ".sbp-amount" ).val( ui.value );
9
- jQuery( "#sbp_integer" ).val( ui.value );
10
- }
11
- });
12
- jQuery( ".sbp-amount" ).val( jQuery( ".sbp-slider" ).slider( "value" ) );
13
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: speed, optimization, performance, scripts to the footer, google libraries, font awesome cdn, defer parsing of javascript, remove query strings, lazy load images, gtmetrix, google pageSpeed, yslow, eliminate external render-blocking javascript and css, compression, async, render-blocking css
5
  Requires at least: 3.6
6
  Tested up to: 3.9.1
7
- Stable tag: 1.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -75,6 +75,11 @@ Page Load Stats is a brief statistic displayed in the plugin options page. It di
75
 
76
  == Changelog ==
77
 
 
 
 
 
 
78
  = 1.8 =
79
  * Added option to load CSS asynchronously to render your page more quickly and get a higher score on the major speed testing services
80
  * Added option to inline and minify all CSS styles and move them to the header or to the footer, to eliminate external render-blocking CSS and optimize CSS delivery.
4
  Tags: speed, optimization, performance, scripts to the footer, google libraries, font awesome cdn, defer parsing of javascript, remove query strings, lazy load images, gtmetrix, google pageSpeed, yslow, eliminate external render-blocking javascript and css, compression, async, render-blocking css
5
  Requires at least: 3.6
6
  Tested up to: 3.9.1
7
+ Stable tag: 1.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
75
 
76
  == Changelog ==
77
 
78
+ = 1.9 =
79
+ * Fix: breaking the SEO by Yoast plugin interface (perhaps as well as to others too). Thanks [@JahLive](http://profiles.wordpress.org/jahlive) for the [bug report](http://wordpress.org/support/topic/yoast-wordpress-seo-broken-after-update).
80
+ * Added an except for the admin toolbar css since the Load CSS asynchronously option removes its dashicons and stylesheets.
81
+
82
+
83
  = 1.8 =
84
  * Added option to load CSS asynchronously to render your page more quickly and get a higher score on the major speed testing services
85
  * Added option to inline and minify all CSS styles and move them to the header or to the footer, to eliminate external render-blocking CSS and optimize CSS delivery.
speed-booster-pack.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Speed Booster Pack
4
  * Plugin URI: http://wordpress.org/plugins/speed-booster-pack/
5
  * Description: Speed Booster Pack allows you to improve your page loading speed and get a higher score on the major speed testing services such as <a href="http://gtmetrix.com/">GTmetrix</a>, <a href="http://developers.google.com/speed/pagespeed/insights/">Google PageSpeed</a> or other speed testing tools.
6
- * Version: 1.8
7
  * Author: Tiguan
8
  * Author URI: http://tiguandesign.com
9
  * License: GPLv2
@@ -38,7 +38,7 @@ $sbp_options = get_option( 'sbp_settings', 'checked' ); // retrieve the plugin s
38
 
39
  define( 'SPEED_BOOSTER_PACK_RELEASE_DATE', date_i18n( 'F j, Y', '1400569200' ) ); // Defining plugin release date
40
  define( 'SPEED_BOOSTER_PACK_PATH', plugin_dir_path( __FILE__ ) ); // Defining plugin dir path
41
- define( 'SPEED_BOOSTER_PACK_VERSION', 'v1.8'); // Defining plugin version
42
  define( 'SPEED_BOOSTER_PACK_NAME', 'Speed Booster Pack Plugin'); // Defining plugin name
43
  define( 'SBP_FOOTER', 9999999 ); // Defining css position
44
 
@@ -156,7 +156,6 @@ function sbp_admin_enqueue_scripts() {
156
  if ( is_admin() ) {
157
  // Enqueue scripts for image compression slider
158
  wp_enqueue_script( 'jquery-ui-slider' );
159
- wp_enqueue_script( 'sbp-jquery-ui', plugin_dir_url( __FILE__ ) . 'js/sbp-slider.js', array( 'jquery' ), SPEED_BOOSTER_PACK_VERSION, true );
160
  }
161
  }
162
 
3
  * Plugin Name: Speed Booster Pack
4
  * Plugin URI: http://wordpress.org/plugins/speed-booster-pack/
5
  * Description: Speed Booster Pack allows you to improve your page loading speed and get a higher score on the major speed testing services such as <a href="http://gtmetrix.com/">GTmetrix</a>, <a href="http://developers.google.com/speed/pagespeed/insights/">Google PageSpeed</a> or other speed testing tools.
6
+ * Version: 1.9
7
  * Author: Tiguan
8
  * Author URI: http://tiguandesign.com
9
  * License: GPLv2
38
 
39
  define( 'SPEED_BOOSTER_PACK_RELEASE_DATE', date_i18n( 'F j, Y', '1400569200' ) ); // Defining plugin release date
40
  define( 'SPEED_BOOSTER_PACK_PATH', plugin_dir_path( __FILE__ ) ); // Defining plugin dir path
41
+ define( 'SPEED_BOOSTER_PACK_VERSION', 'v1.9'); // Defining plugin version
42
  define( 'SPEED_BOOSTER_PACK_NAME', 'Speed Booster Pack Plugin'); // Defining plugin name
43
  define( 'SBP_FOOTER', 9999999 ); // Defining css position
44
 
156
  if ( is_admin() ) {
157
  // Enqueue scripts for image compression slider
158
  wp_enqueue_script( 'jquery-ui-slider' );
 
159
  }
160
  }
161