Version Description
- Added a new recommended features that can make your site load faster
Download this release
Release Info
Developer | tiguan |
Plugin | Speed Booster Pack |
Version | 2.9 |
Comparing to | |
See all releases |
Code changes from version 2.8 to 2.9
- css/style.dev.css +12 -1
- img/sp.png +0 -0
- inc/settings.php +2 -1
- inc/template/notice.php +17 -0
- inc/template/options.php +16 -6
- nbproject/private/private.properties +6 -0
- nbproject/project.properties +7 -0
- nbproject/project.xml +9 -0
- readme.txt +5 -2
- speed-booster-pack.php +24 -3
css/style.dev.css
CHANGED
@@ -1,3 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
.wrap .sb-pack .welcome-panel .welcome-panel-column:first-child {
|
2 |
display: block !important;
|
3 |
}
|
@@ -571,4 +582,4 @@
|
|
571 |
.wrap .sb-pack input.regular-text {
|
572 |
width: 45em;
|
573 |
}
|
574 |
-
}
|
1 |
+
h3.sbp-emphasize {
|
2 |
+
color: #FA5148;
|
3 |
+
}
|
4 |
+
img.sbp-sp {
|
5 |
+
float: left;
|
6 |
+
margin-right: 20px;
|
7 |
+
}
|
8 |
+
p.description-link {
|
9 |
+
margin-top: -5px;
|
10 |
+
}
|
11 |
+
|
12 |
.wrap .sb-pack .welcome-panel .welcome-panel-column:first-child {
|
13 |
display: block !important;
|
14 |
}
|
582 |
.wrap .sb-pack input.regular-text {
|
583 |
width: 45em;
|
584 |
}
|
585 |
+
}
|
img/sp.png
ADDED
Binary file
|
inc/settings.php
CHANGED
@@ -220,6 +220,7 @@ if( !class_exists( 'Speed_Booster_Pack_Options' ) ) {
|
|
220 |
} else {
|
221 |
$this->image_compression = 90;
|
222 |
}
|
|
|
223 |
|
224 |
// fallback for stylesheets exception handle
|
225 |
if ( get_option( 'sbp_css_exceptions' ) ) {
|
@@ -320,4 +321,4 @@ if( !class_exists( 'Speed_Booster_Pack_Options' ) ) {
|
|
320 |
|
321 |
} // END class Speed_Booster_Pack_Options
|
322 |
|
323 |
-
} // END if(!class_exists('Speed_Booster_Pack_Options'))
|
220 |
} else {
|
221 |
$this->image_compression = 90;
|
222 |
}
|
223 |
+
$this->plugin_url = plugin_dir_url(dirname(__FILE__));
|
224 |
|
225 |
// fallback for stylesheets exception handle
|
226 |
if ( get_option( 'sbp_css_exceptions' ) ) {
|
321 |
|
322 |
} // END class Speed_Booster_Pack_Options
|
323 |
|
324 |
+
} // END if(!class_exists('Speed_Booster_Pack_Options'))
|
inc/template/notice.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class='notice notice-warning' id='sbp-news' style="padding-top: 7px">
|
2 |
+
<div style="float:right;"><a href="javascript:dismissNews()" class="button" style="margin-top:10px;"><?php _e('Dismiss','sb-pack');?></a></div>
|
3 |
+
<strong><?php _e('Speed Booster Pack','sb-pack');?></strong>
|
4 |
+
<p><?php printf(__('Check out the %s Plugin settings %s for new features that can make your site load faster.','sb-pack'), '<a href="options-general.php?page=sbp-options">', '</a>');?></p>
|
5 |
+
</div>
|
6 |
+
<script>
|
7 |
+
function dismissNews() {
|
8 |
+
jQuery("#sbp-news").hide();
|
9 |
+
var data = { action : 'sbp_dismiss_notices'};
|
10 |
+
jQuery.get('<?php echo admin_url('admin-ajax.php'); ?>', data, function(response) {
|
11 |
+
data = JSON.parse(response);
|
12 |
+
if(data["Status"] == 0) {
|
13 |
+
console.log("dismissed");
|
14 |
+
}
|
15 |
+
});
|
16 |
+
}
|
17 |
+
</script>
|
inc/template/options.php
CHANGED
@@ -262,7 +262,7 @@
|
|
262 |
|
263 |
|
264 |
<div style="display: block;" class="postbox closed" id="tiguan4">
|
265 |
-
<div title="Click to toggle" class="handlediv"><br></div><h3 class="hndle"><?php _e( 'Change the default image compression level', 'sb-pack' ); ?></h3>
|
266 |
<div class="inside">
|
267 |
|
268 |
|
@@ -283,12 +283,22 @@ var jpegCompression = '<?php echo $this->image_compression; ?>';
|
|
283 |
</p>
|
284 |
|
285 |
<p class="description">
|
286 |
-
<?php _e( 'The default image compression setting in WordPress is 90%. Compressing your images further than the default will make your file sizes even smaller and will boost your site performance.', 'sb-pack' ); ?><br />
|
287 |
-
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
288 |
<p class="description">
|
289 |
-
<?php _e( '
|
|
|
|
|
|
|
290 |
</p>
|
291 |
-
|
292 |
</div>
|
293 |
|
294 |
</div>
|
@@ -431,4 +441,4 @@ var jpegCompression = '<?php echo $this->image_compression; ?>';
|
|
431 |
</div>
|
432 |
</div> <!-- END sb-pack-->
|
433 |
|
434 |
-
</div> <!-- end wrap div -->
|
262 |
|
263 |
|
264 |
<div style="display: block;" class="postbox closed" id="tiguan4">
|
265 |
+
<div title="Click to toggle" class="handlediv"><br></div><h3 class="hndle sbp-emphasize"><?php _e( 'Change the default image compression level', 'sb-pack' ); ?></h3>
|
266 |
<div class="inside">
|
267 |
|
268 |
|
283 |
</p>
|
284 |
|
285 |
<p class="description">
|
286 |
+
<?php _e( 'The default image compression setting in WordPress is 90%. Compressing your images further than the default will make your file sizes even smaller and will boost your site performance. As a reference, a lower level of compression means more performance but might induce quality loss. We recommend you choose a compression level between 50 and 75.', 'sb-pack' ); ?><br />
|
287 |
+
</p>
|
288 |
+
<p class="description"><strong>
|
289 |
+
<?php _e( 'Note that any changes you make will only affect new images uploaded to your site. A specialized plugin can optimize all your present images and will also optimize new ones as they are added. ', 'sb-pack' ); ?>
|
290 |
+
</strong></p>
|
291 |
+
<br>
|
292 |
+
<p class="description"><strong>
|
293 |
+
<?php _e( 'We recommend using ShortPixel Plugin to optimize your images.', 'sb-pack' ); ?>
|
294 |
+
</strong></p>
|
295 |
+
<a href="https://shortpixel.com/booster/af/KQD2XAB28044" target="_blank"><img src="<?php echo $this->plugin_url . "img/sp.png"; ?>" class="sbp-sp"/></a>
|
296 |
<p class="description">
|
297 |
+
<?php _e( 'ShortPixel is an easy to use, comprehensive, stable and frequently updated image optimization plugin supported by the friendly team that created it. Using a powerful set of specially tuned algorithms, it squeezes the most of each image striking the best balance between image size and quality. Current images can be all optimized with a single click. Newly added images are automatically resized/rescaled and optimized on the fly, in the background.', 'sb-pack' ); ?>
|
298 |
+
</p>
|
299 |
+
<p class="description-link">
|
300 |
+
<a href="https://shortpixel.com/booster/af/KQD2XAB28044" target="_blank">>> <?php _e( 'More info', 'sb-pack' ); ?></a>
|
301 |
</p>
|
|
|
302 |
</div>
|
303 |
|
304 |
</div>
|
441 |
</div>
|
442 |
</div> <!-- END sb-pack-->
|
443 |
|
444 |
+
</div> <!-- end wrap div -->
|
nbproject/private/private.properties
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
copy.src.files=false
|
2 |
+
copy.src.on.open=false
|
3 |
+
copy.src.target=/var/www/PhpProject1
|
4 |
+
index.file=index.php
|
5 |
+
run.as=LOCAL
|
6 |
+
url=http://localhost/SpeedBooster/
|
nbproject/project.properties
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
include.path=${php.global.include.path}
|
2 |
+
php.version=PHP_56
|
3 |
+
source.encoding=UTF-8
|
4 |
+
src.dir=.
|
5 |
+
tags.asp=false
|
6 |
+
tags.short=false
|
7 |
+
web.root=.
|
nbproject/project.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<project xmlns="http://www.netbeans.org/ns/project/1">
|
3 |
+
<type>org.netbeans.modules.php.project</type>
|
4 |
+
<configuration>
|
5 |
+
<data xmlns="http://www.netbeans.org/ns/php-project/1">
|
6 |
+
<name>PhpProject1</name>
|
7 |
+
</data>
|
8 |
+
</configuration>
|
9 |
+
</project>
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: tiguan
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EH65WAWPEYPXU
|
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: 4.
|
7 |
-
Stable tag: 2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -72,6 +72,9 @@ The following are other recommended plugins by the author of Speed Booster Pack:
|
|
72 |
|
73 |
== Changelog ==
|
74 |
|
|
|
|
|
|
|
75 |
= 2.8 =
|
76 |
* Fixed plugin options visibility issue
|
77 |
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EH65WAWPEYPXU
|
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: 4.7.2
|
7 |
+
Stable tag: 2.9
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
72 |
|
73 |
== Changelog ==
|
74 |
|
75 |
+
= 2.9 =
|
76 |
+
* Added a new recommended features that can make your site load faster
|
77 |
+
|
78 |
= 2.8 =
|
79 |
* Fixed plugin options visibility issue
|
80 |
|
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: 2.
|
7 |
* Author: Tiguan
|
8 |
* Author URI: http://tiguandesign.com
|
9 |
* License: GPLv2
|
@@ -66,6 +66,9 @@ define( 'SBP_FOOTER_LAST', 99999 ); // Defining css last position
|
|
66 |
// load plugin textdomain
|
67 |
add_action('plugins_loaded', array( $this, 'sbp_load_translation' ) );
|
68 |
|
|
|
|
|
|
|
69 |
// Load plugin settings page
|
70 |
require_once( SPEED_BOOSTER_PACK_PATH . 'inc/settings.php' );
|
71 |
$Speed_Booster_Pack_Options = new Speed_Booster_Pack_Options();
|
@@ -99,6 +102,24 @@ define( 'SBP_FOOTER_LAST', 99999 ); // Defining css last position
|
|
99 |
}
|
100 |
|
101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
/*----------------------------------------------------------------------------------------------------------
|
103 |
Activate the plugin
|
104 |
-----------------------------------------------------------------------------------------------------------*/
|
@@ -166,7 +187,7 @@ define( 'SBP_FOOTER_LAST', 99999 ); // Defining css last position
|
|
166 |
global $sbp_settings_page;
|
167 |
if ( $hook != $sbp_settings_page )
|
168 |
return;
|
169 |
-
wp_enqueue_style( 'sbp-styles', plugin_dir_url( __FILE__ ) . 'css/
|
170 |
wp_enqueue_style( 'jquery-ui', plugin_dir_url( __FILE__ ) . 'css/jquery-ui.min.css' );
|
171 |
|
172 |
} // End function sbp_enqueue_styles
|
@@ -275,4 +296,4 @@ if( class_exists( 'Speed_Booster_Pack' ) ) {
|
|
275 |
// instantiate the plugin class
|
276 |
$speed_booster_pack = new Speed_Booster_Pack();
|
277 |
|
278 |
-
} // End if (!class_exists("Speed_Booster_Pack")) (2)
|
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: 2.9
|
7 |
* Author: Tiguan
|
8 |
* Author URI: http://tiguandesign.com
|
9 |
* License: GPLv2
|
66 |
// load plugin textdomain
|
67 |
add_action('plugins_loaded', array( $this, 'sbp_load_translation' ) );
|
68 |
|
69 |
+
add_action('admin_notices', array( &$this, 'sbp_display_notices'));
|
70 |
+
add_action('wp_ajax_sbp_dismiss_notices', array(&$this, 'sbp_dismiss_notices'));
|
71 |
+
|
72 |
// Load plugin settings page
|
73 |
require_once( SPEED_BOOSTER_PACK_PATH . 'inc/settings.php' );
|
74 |
$Speed_Booster_Pack_Options = new Speed_Booster_Pack_Options();
|
102 |
}
|
103 |
|
104 |
|
105 |
+
/*----------------------------------------------------------------------------------------------------------
|
106 |
+
Display/dismiss admin notices if needed
|
107 |
+
-----------------------------------------------------------------------------------------------------------*/
|
108 |
+
|
109 |
+
function sbp_display_notices() {
|
110 |
+
if(!get_option( 'sbp_news')) {
|
111 |
+
global $sbp_settings_page;
|
112 |
+
$screen = get_current_screen();
|
113 |
+
if ( $screen->id != $sbp_settings_page ) {
|
114 |
+
require_once( SPEED_BOOSTER_PACK_PATH . 'inc/template/notice.php' );
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
+
function sbp_dismiss_notices() {
|
120 |
+
update_option( 'sbp_news', true);
|
121 |
+
}
|
122 |
+
|
123 |
/*----------------------------------------------------------------------------------------------------------
|
124 |
Activate the plugin
|
125 |
-----------------------------------------------------------------------------------------------------------*/
|
187 |
global $sbp_settings_page;
|
188 |
if ( $hook != $sbp_settings_page )
|
189 |
return;
|
190 |
+
wp_enqueue_style( 'sbp-styles', plugin_dir_url( __FILE__ ) . 'css/style.dev.css' ); // change to style.dev.css to debug the plugin style sbp_style.min
|
191 |
wp_enqueue_style( 'jquery-ui', plugin_dir_url( __FILE__ ) . 'css/jquery-ui.min.css' );
|
192 |
|
193 |
} // End function sbp_enqueue_styles
|
296 |
// instantiate the plugin class
|
297 |
$speed_booster_pack = new Speed_Booster_Pack();
|
298 |
|
299 |
+
} // End if (!class_exists("Speed_Booster_Pack")) (2)
|