Version Description
Download this release
Release Info
Developer | dipakcg |
Plugin | WP Performance Score Booster |
Version | 1.9.2.2 |
Comparing to | |
See all releases |
Code changes from version 1.9.2.1 to 1.9.2.2
- admin-page.php +8 -8
- readme.txt +5 -2
- wp-performance-score-booster.php +20 -17
admin-page.php
CHANGED
@@ -28,7 +28,7 @@ function wppsb_admin_options() {
|
|
28 |
if ( isset($_GET['update-applied']) && $_GET['update-applied'] == 'true' ) {
|
29 |
?>
|
30 |
<div class="updated"><p><strong><?php _e('<strong>Update applied successfully!</strong>', 'wp-performance-score-booster'); ?></strong></p></div>
|
31 |
-
<?php
|
32 |
}
|
33 |
|
34 |
// See if the user has posted us some information
|
@@ -113,12 +113,12 @@ function wppsb_admin_options() {
|
|
113 |
</td> <td>
|
114 |
<label for="<?php echo $expire_caching; ?>" class="wppsb_settings" style="display: inline;"> <?php _e('Leverage Browser Caching <i>(set expire caching)</i>', 'wp-performance-score-booster'); ?> </label>
|
115 |
</td> </tr>
|
116 |
-
|
117 |
<!-- Extra Options - must be added in the future version -->
|
118 |
-
|
119 |
-
<!--
|
120 |
<tr> <td colspan="2"> <h2> <?php _e('More settings <i>(optional)</i>', 'wp-performance-score-booster'); ?> </h2> </td> </tr>
|
121 |
-
|
122 |
<tr> <td class="wppsb_onoff">
|
123 |
<div class="wppsb_onoffswitch">
|
124 |
<input type="checkbox" name="<?php echo $expire_caching; ?>" <?php checked( $expire_caching_val == 'on',true); ?> class="wppsb_onoffswitch-checkbox" id="<?php echo $expire_caching; ?>" />
|
@@ -130,7 +130,7 @@ function wppsb_admin_options() {
|
|
130 |
</td> <td>
|
131 |
<label for="<?php echo $expire_caching; ?>" class="wppsb_settings" style="display: inline;"> <?php _e('Disable Heartbeat API completely', 'wp-performance-score-booster'); ?> </label>
|
132 |
</td> </tr>
|
133 |
-
|
134 |
<tr> <td class="wppsb_onoff">
|
135 |
<div class="wppsb_onoffswitch">
|
136 |
<input type="checkbox" name="<?php echo $expire_caching; ?>" <?php checked( $expire_caching_val == 'on',true); ?> class="wppsb_onoffswitch-checkbox" id="<?php echo $expire_caching; ?>" />
|
@@ -143,12 +143,12 @@ function wppsb_admin_options() {
|
|
143 |
<label for="<?php echo $expire_caching; ?>" class="wppsb_settings" style="display: inline;"> <?php _e('Remove WordPress Emoji scripts', 'wp-performance-score-booster'); ?> </label>
|
144 |
</td> </tr>
|
145 |
-->
|
146 |
-
|
147 |
</table>
|
148 |
<p><input style="font-size: 15px; color: white; font-weight: bold;" type="submit" value="<?php esc_attr_e('Save Changes', 'wp-performance-score-booster'); ?>" class="button button-primary" name="submit" /></p>
|
149 |
</form>
|
150 |
</td>
|
151 |
-
<td style="text-align: left;">
|
152 |
<div class="wppsb_admin_dev_sidebar_div">
|
153 |
<!-- <img src="//www.gravatar.com/avatar/38b380cf488d8f8c4007cf2015dc16ac.jpg" width="100px" height="100px" /> <br /> -->
|
154 |
<br />
|
28 |
if ( isset($_GET['update-applied']) && $_GET['update-applied'] == 'true' ) {
|
29 |
?>
|
30 |
<div class="updated"><p><strong><?php _e('<strong>Update applied successfully!</strong>', 'wp-performance-score-booster'); ?></strong></p></div>
|
31 |
+
<?php
|
32 |
}
|
33 |
|
34 |
// See if the user has posted us some information
|
113 |
</td> <td>
|
114 |
<label for="<?php echo $expire_caching; ?>" class="wppsb_settings" style="display: inline;"> <?php _e('Leverage Browser Caching <i>(set expire caching)</i>', 'wp-performance-score-booster'); ?> </label>
|
115 |
</td> </tr>
|
116 |
+
|
117 |
<!-- Extra Options - must be added in the future version -->
|
118 |
+
|
119 |
+
<!--
|
120 |
<tr> <td colspan="2"> <h2> <?php _e('More settings <i>(optional)</i>', 'wp-performance-score-booster'); ?> </h2> </td> </tr>
|
121 |
+
|
122 |
<tr> <td class="wppsb_onoff">
|
123 |
<div class="wppsb_onoffswitch">
|
124 |
<input type="checkbox" name="<?php echo $expire_caching; ?>" <?php checked( $expire_caching_val == 'on',true); ?> class="wppsb_onoffswitch-checkbox" id="<?php echo $expire_caching; ?>" />
|
130 |
</td> <td>
|
131 |
<label for="<?php echo $expire_caching; ?>" class="wppsb_settings" style="display: inline;"> <?php _e('Disable Heartbeat API completely', 'wp-performance-score-booster'); ?> </label>
|
132 |
</td> </tr>
|
133 |
+
|
134 |
<tr> <td class="wppsb_onoff">
|
135 |
<div class="wppsb_onoffswitch">
|
136 |
<input type="checkbox" name="<?php echo $expire_caching; ?>" <?php checked( $expire_caching_val == 'on',true); ?> class="wppsb_onoffswitch-checkbox" id="<?php echo $expire_caching; ?>" />
|
143 |
<label for="<?php echo $expire_caching; ?>" class="wppsb_settings" style="display: inline;"> <?php _e('Remove WordPress Emoji scripts', 'wp-performance-score-booster'); ?> </label>
|
144 |
</td> </tr>
|
145 |
-->
|
146 |
+
|
147 |
</table>
|
148 |
<p><input style="font-size: 15px; color: white; font-weight: bold;" type="submit" value="<?php esc_attr_e('Save Changes', 'wp-performance-score-booster'); ?>" class="button button-primary" name="submit" /></p>
|
149 |
</form>
|
150 |
</td>
|
151 |
+
<td width="25%" valign="bottom" style="text-align: left;">
|
152 |
<div class="wppsb_admin_dev_sidebar_div">
|
153 |
<!-- <img src="//www.gravatar.com/avatar/38b380cf488d8f8c4007cf2015dc16ac.jpg" width="100px" height="100px" /> <br /> -->
|
154 |
<br />
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: dipakcg
|
|
3 |
Tags: performance, speed, gzip, booster, query string
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3S8BRPLWLNQ38
|
5 |
Requires at least: 3.5
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 1.9.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -58,6 +58,9 @@ Alternatively, you can open a [support thread](http://wordpress.org/support/plug
|
|
58 |
1. Admin Settings
|
59 |
|
60 |
== Changelog ==
|
|
|
|
|
|
|
61 |
= 1.9.2.1, May 26, 2018 =
|
62 |
* Fixed jQuery conflict with Review Plugin notice.
|
63 |
* Fixed minor typo
|
3 |
Tags: performance, speed, gzip, booster, query string
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3S8BRPLWLNQ38
|
5 |
Requires at least: 3.5
|
6 |
+
Tested up to: 5.0
|
7 |
+
Stable tag: 1.9.2.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
58 |
1. Admin Settings
|
59 |
|
60 |
== Changelog ==
|
61 |
+
= 1.9.2.2, December 19, 2018 =
|
62 |
+
* Fixed "Remove any query strings from static resources" conflict in admin
|
63 |
+
|
64 |
= 1.9.2.1, May 26, 2018 =
|
65 |
* Fixed jQuery conflict with Review Plugin notice.
|
66 |
* Fixed minor typo
|
wp-performance-score-booster.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WP Performance Score Booster
|
4 |
Plugin URI: https://github.com/dipakcg/wp-performance-score-booster
|
5 |
Description: Speed-up page load times and improve website scores in services like PageSpeed, YSlow, Pingdom and GTmetrix.
|
6 |
-
Version: 1.9.2.
|
7 |
Author: Dipak C. Gajjar
|
8 |
Author URI: https://dipakgajjar.com
|
9 |
Text Domain: wp-performance-score-booster
|
@@ -16,7 +16,7 @@ include_once ( ABSPATH . 'wp-admin/includes/plugin.php' ); // to is_plugin_activ
|
|
16 |
|
17 |
// Define plugin version for future releases
|
18 |
if (!defined('WPPSB_PLUGIN_VERSION')) {
|
19 |
-
define('WPPSB_PLUGIN_VERSION', '1.9.2.
|
20 |
}
|
21 |
|
22 |
define( 'WPPSB_PATH', WP_PLUGIN_DIR . '/' . basename( dirname( __FILE__ ) ) ); // plugin Path
|
@@ -56,7 +56,7 @@ add_action( 'init', 'wppsb_master_init' );
|
|
56 |
function wppsb_master_admin_init () {
|
57 |
wppsb_add_stylesheet(); // adds plugin stylesheet
|
58 |
wppsb_update_processor(); // Reload the config (rewrite rules) after applying plugin updates
|
59 |
-
|
60 |
/* BEGIN : Rate this plugin on wordpress */
|
61 |
// check for admin notice dismissal
|
62 |
if ( isset( $_POST['wppsb-already-reviewed'] ) ) {
|
@@ -65,13 +65,13 @@ function wppsb_master_admin_init () {
|
|
65 |
delete_option( 'wppsb_activation_date' );
|
66 |
}
|
67 |
}
|
68 |
-
|
69 |
// display admin notice after 30 days if clicked 'May be later'
|
70 |
if ( isset( $_POST['wppsb-review-later'] ) ) {
|
71 |
update_option( 'wppsb_review_notice', "" );
|
72 |
update_option( 'wppsb_activation_date', strtotime( "now" ) );
|
73 |
}
|
74 |
-
|
75 |
$install_date = get_option( 'wppsb_activation_date' );
|
76 |
$past_date = strtotime( '-30 days' );
|
77 |
|
@@ -127,8 +127,11 @@ add_action('wp_head', 'wppsb_add_header', 1);
|
|
127 |
|
128 |
// If 'Remove query strings" checkbox ticked, add filter otherwise remove filter
|
129 |
if ( $wppsb_remove_query_strings == 'on') {
|
130 |
-
|
131 |
-
|
|
|
|
|
|
|
132 |
}
|
133 |
else {
|
134 |
remove_filter( 'script_loader_src', 'wppsb_remove_query_strings_q');
|
@@ -173,10 +176,10 @@ function wppsb_activate_plugin() {
|
|
173 |
|
174 |
global $wppsb_remove_query_strings, $wppsb_enable_gzip, $wppsb_expire_caching;
|
175 |
wppsb_htaccess_bakup(); // Backup .htacces before appending any rules
|
176 |
-
|
177 |
/* Create transient data for submit review admin notice */
|
178 |
// set_transient( 'wppsb_submit_review_transient', true, 360 );
|
179 |
-
|
180 |
// Rate this plugin on wordpress - check for admin notice dismissal
|
181 |
if ( FALSE === get_option( 'wppsb_review_notice' ) ) {
|
182 |
add_option( 'wppsb_review_notice', "on" );
|
@@ -210,7 +213,7 @@ register_activation_hook( __FILE__, 'wppsb_activate_plugin' );
|
|
210 |
add_action( 'admin_notices', 'wppsb_submit_review_notice' );
|
211 |
function wppsb_submit_review_notice() {
|
212 |
global $wppsb_plugin_version;
|
213 |
-
|
214 |
/* Display review plugin notice if plugin updated */
|
215 |
// only applies to older versions of the plugin (older than 1.9.1) where option isn't set
|
216 |
if ( isset( $_GET['update-applied'] ) && $_GET['update-applied'] == 'true' ) {
|
@@ -218,11 +221,11 @@ function wppsb_submit_review_notice() {
|
|
218 |
update_option( 'wppsb_review_notice', "on" );
|
219 |
}
|
220 |
}
|
221 |
-
|
222 |
/* Check transient that's been set on plugin activation or check if user has already submitted review */
|
223 |
// if( get_transient( 'wppsb_submit_review_transient' ) || !get_user_meta( $user_id, 'wppsb_submit_review_dismissed' ) ) {
|
224 |
if( get_option( 'wppsb_review_notice') && get_option( 'wppsb_review_notice' ) == "on" ) {
|
225 |
-
|
226 |
$notice_contents = "<p> Thank you for using <strong>WP Performance Score Booster</strong>. </p>";
|
227 |
$notice_contents .= "<p> Could you please do me a BIG favour and give this plugin a 5-star rating on WordPress? It will help me spread the word and boost my motivation. — Dipak C. Gajjar </p>";
|
228 |
$notice_contents .= "<p> <a href=\"#\"id=\"letMeReview\" class=\"button button-primary\">Yes, you deserve it</a> <a href=\"#\" id=\"willReviewLater\" class=\"button button-primary\">Maybe later</a> <a href=\"#\" id=\"alredyReviewed\" class=\"button button-primary\">I already did it</a> </p>";
|
@@ -231,10 +234,10 @@ function wppsb_submit_review_notice() {
|
|
231 |
<script type="text/javascript">
|
232 |
// set jQuery in noConflict mode. This helps to mitigate conflicts between jQuery scripts. jQuery conflicts are all too common with themes and plugins.
|
233 |
var $j = jQuery.noConflict();
|
234 |
-
$j(document).ready( function() {
|
235 |
var loc = location.href;
|
236 |
// loc += loc.indexOf("?") === -1 ? "?" : "&";
|
237 |
-
|
238 |
$j("#letMeReview").on('click', function() {
|
239 |
/*jQuery('.notice').slideUp("slow", function(){;
|
240 |
window.open("//wordpress.org/support/plugin/wp-performance-score-booster/reviews/?rate=5#new-post", "_blank");
|
@@ -248,7 +251,7 @@ function wppsb_submit_review_notice() {
|
|
248 |
},
|
249 |
success: function(msg) {
|
250 |
window.open("//wordpress.org/support/plugin/wp-performance-score-booster/reviews/?rate=5#new-post", "_blank");
|
251 |
-
}
|
252 |
});
|
253 |
});
|
254 |
$j("#willReviewLater").on('click', function() {
|
@@ -271,7 +274,7 @@ function wppsb_submit_review_notice() {
|
|
271 |
type: 'POST',
|
272 |
data: {
|
273 |
"wppsb-already-reviewed": ''
|
274 |
-
}
|
275 |
});
|
276 |
});
|
277 |
/* If top-right X button clicked */
|
@@ -314,4 +317,4 @@ function wppsb_deactivate_plugin() {
|
|
314 |
wppsb_save_mod_rewrite_rules('', '');
|
315 |
}
|
316 |
register_deactivation_hook( __FILE__, 'wppsb_deactivate_plugin' );
|
317 |
-
?>
|
3 |
Plugin Name: WP Performance Score Booster
|
4 |
Plugin URI: https://github.com/dipakcg/wp-performance-score-booster
|
5 |
Description: Speed-up page load times and improve website scores in services like PageSpeed, YSlow, Pingdom and GTmetrix.
|
6 |
+
Version: 1.9.2.2
|
7 |
Author: Dipak C. Gajjar
|
8 |
Author URI: https://dipakgajjar.com
|
9 |
Text Domain: wp-performance-score-booster
|
16 |
|
17 |
// Define plugin version for future releases
|
18 |
if (!defined('WPPSB_PLUGIN_VERSION')) {
|
19 |
+
define('WPPSB_PLUGIN_VERSION', '1.9.2.2');
|
20 |
}
|
21 |
|
22 |
define( 'WPPSB_PATH', WP_PLUGIN_DIR . '/' . basename( dirname( __FILE__ ) ) ); // plugin Path
|
56 |
function wppsb_master_admin_init () {
|
57 |
wppsb_add_stylesheet(); // adds plugin stylesheet
|
58 |
wppsb_update_processor(); // Reload the config (rewrite rules) after applying plugin updates
|
59 |
+
|
60 |
/* BEGIN : Rate this plugin on wordpress */
|
61 |
// check for admin notice dismissal
|
62 |
if ( isset( $_POST['wppsb-already-reviewed'] ) ) {
|
65 |
delete_option( 'wppsb_activation_date' );
|
66 |
}
|
67 |
}
|
68 |
+
|
69 |
// display admin notice after 30 days if clicked 'May be later'
|
70 |
if ( isset( $_POST['wppsb-review-later'] ) ) {
|
71 |
update_option( 'wppsb_review_notice', "" );
|
72 |
update_option( 'wppsb_activation_date', strtotime( "now" ) );
|
73 |
}
|
74 |
+
|
75 |
$install_date = get_option( 'wppsb_activation_date' );
|
76 |
$past_date = strtotime( '-30 days' );
|
77 |
|
127 |
|
128 |
// If 'Remove query strings" checkbox ticked, add filter otherwise remove filter
|
129 |
if ( $wppsb_remove_query_strings == 'on') {
|
130 |
+
// Disable the functionality under Admin to avoid any conflicts
|
131 |
+
if ( ! is_admin() ) {
|
132 |
+
add_filter( 'script_loader_src', 'wppsb_remove_query_strings_q', 15, 1 );
|
133 |
+
add_filter( 'style_loader_src', 'wppsb_remove_query_strings_q', 15, 1 );
|
134 |
+
}
|
135 |
}
|
136 |
else {
|
137 |
remove_filter( 'script_loader_src', 'wppsb_remove_query_strings_q');
|
176 |
|
177 |
global $wppsb_remove_query_strings, $wppsb_enable_gzip, $wppsb_expire_caching;
|
178 |
wppsb_htaccess_bakup(); // Backup .htacces before appending any rules
|
179 |
+
|
180 |
/* Create transient data for submit review admin notice */
|
181 |
// set_transient( 'wppsb_submit_review_transient', true, 360 );
|
182 |
+
|
183 |
// Rate this plugin on wordpress - check for admin notice dismissal
|
184 |
if ( FALSE === get_option( 'wppsb_review_notice' ) ) {
|
185 |
add_option( 'wppsb_review_notice', "on" );
|
213 |
add_action( 'admin_notices', 'wppsb_submit_review_notice' );
|
214 |
function wppsb_submit_review_notice() {
|
215 |
global $wppsb_plugin_version;
|
216 |
+
|
217 |
/* Display review plugin notice if plugin updated */
|
218 |
// only applies to older versions of the plugin (older than 1.9.1) where option isn't set
|
219 |
if ( isset( $_GET['update-applied'] ) && $_GET['update-applied'] == 'true' ) {
|
221 |
update_option( 'wppsb_review_notice', "on" );
|
222 |
}
|
223 |
}
|
224 |
+
|
225 |
/* Check transient that's been set on plugin activation or check if user has already submitted review */
|
226 |
// if( get_transient( 'wppsb_submit_review_transient' ) || !get_user_meta( $user_id, 'wppsb_submit_review_dismissed' ) ) {
|
227 |
if( get_option( 'wppsb_review_notice') && get_option( 'wppsb_review_notice' ) == "on" ) {
|
228 |
+
|
229 |
$notice_contents = "<p> Thank you for using <strong>WP Performance Score Booster</strong>. </p>";
|
230 |
$notice_contents .= "<p> Could you please do me a BIG favour and give this plugin a 5-star rating on WordPress? It will help me spread the word and boost my motivation. — Dipak C. Gajjar </p>";
|
231 |
$notice_contents .= "<p> <a href=\"#\"id=\"letMeReview\" class=\"button button-primary\">Yes, you deserve it</a> <a href=\"#\" id=\"willReviewLater\" class=\"button button-primary\">Maybe later</a> <a href=\"#\" id=\"alredyReviewed\" class=\"button button-primary\">I already did it</a> </p>";
|
234 |
<script type="text/javascript">
|
235 |
// set jQuery in noConflict mode. This helps to mitigate conflicts between jQuery scripts. jQuery conflicts are all too common with themes and plugins.
|
236 |
var $j = jQuery.noConflict();
|
237 |
+
$j(document).ready( function() {
|
238 |
var loc = location.href;
|
239 |
// loc += loc.indexOf("?") === -1 ? "?" : "&";
|
240 |
+
|
241 |
$j("#letMeReview").on('click', function() {
|
242 |
/*jQuery('.notice').slideUp("slow", function(){;
|
243 |
window.open("//wordpress.org/support/plugin/wp-performance-score-booster/reviews/?rate=5#new-post", "_blank");
|
251 |
},
|
252 |
success: function(msg) {
|
253 |
window.open("//wordpress.org/support/plugin/wp-performance-score-booster/reviews/?rate=5#new-post", "_blank");
|
254 |
+
}
|
255 |
});
|
256 |
});
|
257 |
$j("#willReviewLater").on('click', function() {
|
274 |
type: 'POST',
|
275 |
data: {
|
276 |
"wppsb-already-reviewed": ''
|
277 |
+
}
|
278 |
});
|
279 |
});
|
280 |
/* If top-right X button clicked */
|
317 |
wppsb_save_mod_rewrite_rules('', '');
|
318 |
}
|
319 |
register_deactivation_hook( __FILE__, 'wppsb_deactivate_plugin' );
|
320 |
+
?>
|