Breeze – WordPress Cache Plugin - Version 1.1.7

Version Description

  • Fix: Add HTTP and HTTPS for validation of CDN integration.
  • Fix: Custom settings for multisite will be reapplied after Breeze reactivation.
  • Fix: General improvements to improve support for the WooCommerce Booking Calendar plugin.
  • Fix: Improved handling of minification for Wildcard based exclusion in Never Cache These URLs option.
Download this release

Release Info

Developer adeelkhan
Plugin Icon 128x128 Breeze – WordPress Cache Plugin
Version 1.1.7
Comparing to
See all releases

Code changes from version 1.1.6 to 1.1.7

breeze.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Breeze
4
  * Description: Breeze is a WordPress cache plugin with extensive options to speed up your website. All the options including Varnish Cache are compatible with Cloudways hosting.
5
- * Version: 1.1.6
6
  * Text Domain: breeze
7
  * Domain Path: /languages
8
  * Author: Cloudways
2
  /**
3
  * Plugin Name: Breeze
4
  * Description: Breeze is a WordPress cache plugin with extensive options to speed up your website. All the options including Varnish Cache are compatible with Cloudways hosting.
5
+ * Version: 1.1.7
6
  * Text Domain: breeze
7
  * Domain Path: /languages
8
  * Author: Cloudways
inc/breeze-admin.php CHANGED
@@ -335,10 +335,25 @@ class Breeze_Admin {
335
  if ( is_multisite() ) {
336
  $blogs = get_sites();
337
  foreach ( $blogs as $blog ) {
338
- update_blog_option( (int) $blog->blog_id, 'breeze_basic_settings', $basic );
339
- update_blog_option( (int) $blog->blog_id, 'breeze_advanced_settings', $advanced );
340
- update_blog_option( (int) $blog->blog_id, 'breeze_cdn_integration', $cdn );
341
- update_blog_option( (int) $blog->blog_id, 'breeze_varnish_cache', $varnish );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
342
  }
343
  } else {
344
  update_option( 'breeze_basic_settings', $basic );
335
  if ( is_multisite() ) {
336
  $blogs = get_sites();
337
  foreach ( $blogs as $blog ) {
338
+ $blog_basic = get_blog_option( (int) $blog->blog_id, 'breeze_basic_settings', '' );
339
+ if ( empty( $blog_basic ) ) {
340
+ update_blog_option( (int) $blog->blog_id, 'breeze_basic_settings', $basic );
341
+ }
342
+
343
+ $blog_advanced = get_blog_option( (int) $blog->blog_id, 'breeze_advanced_settings', '' );
344
+ if ( empty( $blog_advanced ) ) {
345
+ update_blog_option( (int) $blog->blog_id, 'breeze_advanced_settings', $advanced );
346
+ }
347
+
348
+ $blog_cdn = get_blog_option( (int) $blog->blog_id, 'breeze_cdn_integration', '' );
349
+ if ( empty( $blog_cdn ) ) {
350
+ update_blog_option( (int) $blog->blog_id, 'breeze_cdn_integration', $cdn );
351
+ }
352
+
353
+ $blog_varnish = get_blog_option( (int) $blog->blog_id, 'breeze_varnish_cache', '' );
354
+ if ( empty( $blog_varnish ) ) {
355
+ update_blog_option( (int) $blog->blog_id, 'breeze_varnish_cache', $varnish );
356
+ }
357
  }
358
  } else {
359
  update_option( 'breeze_basic_settings', $basic );
inc/breeze-configuration.php CHANGED
@@ -184,8 +184,14 @@ class Breeze_Configuration{
184
 
185
  $cdn_url = ( isset( $_POST['cdn-url'] ) ? sanitize_text_field( $_POST['cdn-url'] ) : '' );
186
  if ( ! empty( $cdn_url ) ) {
 
 
187
  $cdn_url = ltrim( $cdn_url, 'https:' );
188
  $cdn_url = '//' . ltrim( $cdn_url, '//' );
 
 
 
 
189
  }
190
 
191
  $cdn = array(
184
 
185
  $cdn_url = ( isset( $_POST['cdn-url'] ) ? sanitize_text_field( $_POST['cdn-url'] ) : '' );
186
  if ( ! empty( $cdn_url ) ) {
187
+ $http_schema = parse_url( $cdn_url, PHP_URL_SCHEME );
188
+
189
  $cdn_url = ltrim( $cdn_url, 'https:' );
190
  $cdn_url = '//' . ltrim( $cdn_url, '//' );
191
+
192
+ if ( ! empty( $http_schema ) ) {
193
+ $cdn_url = $http_schema . ':' . $cdn_url;
194
+ }
195
  }
196
 
197
  $cdn = array(
inc/cache/execute-cache.php CHANGED
@@ -38,7 +38,13 @@ if ( isset( $_GET['debug_config'] ) ) {
38
 
39
  $url_path = breeze_get_url_path();
40
  $user_logged = false;
41
- $filename = $url_path . 'guest';
 
 
 
 
 
 
42
  // Don't cache
43
  if ( ! empty( $_COOKIE ) ) {
44
  $wp_cookies = array( 'wordpressuser_', 'wordpresspass_', 'wordpress_sec_', 'wordpress_logged_in_' );
38
 
39
  $url_path = breeze_get_url_path();
40
  $user_logged = false;
41
+
42
+ if ( substr_count( $url_path, '?' ) > 0 ) {
43
+ $filename = $url_path . '&guest';
44
+ } else {
45
+ $filename = $url_path . '?guest';
46
+ }
47
+
48
  // Don't cache
49
  if ( ! empty( $_COOKIE ) ) {
50
  $wp_cookies = array( 'wordpressuser_', 'wordpresspass_', 'wordpress_sec_', 'wordpress_logged_in_' );
inc/helpers.php CHANGED
@@ -237,6 +237,37 @@ function breeze_is_string_in_array_values( $needle = '', $haystack = array() ) {
237
  return $is_string_in_array;
238
  }
239
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
240
  /**
241
  * Will return true for Google fonts and other type of CDN link
242
  * that are missing the Scheme from the url
237
  return $is_string_in_array;
238
  }
239
 
240
+ /**
241
+ * Used to check for regexp exclude pages
242
+ *
243
+ * @param string $needle
244
+ * @param array $haystack
245
+ *
246
+ * @return array
247
+ * @since 1.1.7
248
+ *
249
+ */
250
+ function breeze_check_for_exclude_values( $needle = '', $haystack = array() ) {
251
+ if ( empty( $needle ) || empty( $haystack ) ) {
252
+ return array();
253
+ }
254
+ $needle = trim( $needle );
255
+ $is_string_in_array = array_filter(
256
+ $haystack,
257
+ function ( $var ) use ( $needle ) {
258
+ #return false;
259
+ if ( breeze_string_contains_exclude_regexp( $var ) ) {
260
+ return breeze_file_match_pattern( $needle, $var );
261
+ } else {
262
+ return false;
263
+ }
264
+
265
+ }
266
+ );
267
+
268
+ return $is_string_in_array;
269
+ }
270
+
271
  /**
272
  * Will return true for Google fonts and other type of CDN link
273
  * that are missing the Scheme from the url
inc/minification/breeze-minify-main.php CHANGED
@@ -260,7 +260,7 @@ class Breeze_Minify {
260
  public function check_exclude_url( $current_url ) {
261
  $opts_config = breeze_get_option( 'advanced_settings' );
262
 
263
- $is_exclude = breeze_is_string_in_array_values( $current_url, $opts_config['breeze-exclude-urls'] );
264
  if ( ! empty( $is_exclude ) ) {
265
  return true;
266
  }
260
  public function check_exclude_url( $current_url ) {
261
  $opts_config = breeze_get_option( 'advanced_settings' );
262
 
263
+ $is_exclude = breeze_check_for_exclude_values( $current_url, $opts_config['breeze-exclude-urls'] );
264
  if ( ! empty( $is_exclude ) ) {
265
  return true;
266
  }
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: Cloudways
3
  Tags: cache,caching, performance, wp-cache, cdn, combine, compress, speed plugin, database cache,gzip, http compression, js cache, minify, optimize, page cache, performance, speed, expire headers
4
  Requires at least: 4.5
5
- Tested up to: 5.3
6
- Stable tag: 1.1.6
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -145,6 +145,13 @@ Using Gzip, Breeze compresses the request files, further reducing the size of th
145
 
146
  == Changelog ==
147
 
 
 
 
 
 
 
 
148
  = 1.1.6 =
149
  * Add: Wildcard (.*) based exclusion of pattern URL strings in Never Cache These URLs option.
150
  * Fix: Improved validation for CDN integration.
2
  Contributors: Cloudways
3
  Tags: cache,caching, performance, wp-cache, cdn, combine, compress, speed plugin, database cache,gzip, http compression, js cache, minify, optimize, page cache, performance, speed, expire headers
4
  Requires at least: 4.5
5
+ Tested up to: 5.4.2
6
+ Stable tag: 1.1.7
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
145
 
146
  == Changelog ==
147
 
148
+ = 1.1.7 =
149
+ * Fix: Add HTTP and HTTPS for validation of CDN integration.
150
+ * Fix: Custom settings for multisite will be reapplied after Breeze reactivation.
151
+ * Fix: General improvements to improve support for the WooCommerce Booking Calendar plugin.
152
+ * Fix: Improved handling of minification for Wildcard based exclusion in Never Cache These URLs option.
153
+
154
+
155
  = 1.1.6 =
156
  * Add: Wildcard (.*) based exclusion of pattern URL strings in Never Cache These URLs option.
157
  * Fix: Improved validation for CDN integration.