WP Super Cache - Version 1.6.7

Version Description

Download this release

Release Info

Developer donncha
Plugin Icon 128x128 WP Super Cache
Version 1.6.7
Comparing to
See all releases

Code changes from version 1.6.6 to 1.6.7

Files changed (3) hide show
  1. readme.txt +5 -1
  2. wp-cache-phase2.php +3 -0
  3. wp-cache.php +2 -2
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  * Contributors: donncha, automattic, kraftbj
3
  * Tags: performance, caching, wp-cache, wp-super-cache, cache
4
  * Tested up to: 5.2.1
5
- * Stable tag: 1.6.6
6
  * Requires at least: 3.1
7
  * Requires PHP: 5.2.4
8
  * License: GPLv2 or later
@@ -266,6 +266,10 @@ Your theme is probably responsive which means it resizes the page to suit whatev
266
 
267
  ## Changelog ##
268
 
 
 
 
 
269
  ### 1.6.6 ###
270
  * Fix problems with saving settings. Returns false ONLY when there's an issue with the config file, not when the setting isn't changed. Change other code to cope with that, including updating WPCACHEHOME (#670)
271
  * When saving settings rename the temporary config file correctly, and delete wp-admin/.php if it exists. (#673)
2
  * Contributors: donncha, automattic, kraftbj
3
  * Tags: performance, caching, wp-cache, wp-super-cache, cache
4
  * Tested up to: 5.2.1
5
+ * Stable tag: 1.6.7
6
  * Requires at least: 3.1
7
  * Requires PHP: 5.2.4
8
  * License: GPLv2 or later
266
 
267
  ## Changelog ##
268
 
269
+ ### 1.6.7 ###
270
+ * wp_cache_setting() can now save boolean values since many of the settings are bools. #676
271
+ * Check if $super_cache_enabled is true in a less strict way because it might be '1' rather than true. #677
272
+
273
  ### 1.6.6 ###
274
  * Fix problems with saving settings. Returns false ONLY when there's an issue with the config file, not when the setting isn't changed. Change other code to cope with that, including updating WPCACHEHOME (#670)
275
  * When saving settings rename the temporary config file correctly, and delete wp-admin/.php if it exists. (#673)
wp-cache-phase2.php CHANGED
@@ -1061,6 +1061,9 @@ function wp_cache_setting( $field, $value ) {
1061
  $GLOBALS[ $field ] = $value;
1062
  if ( is_numeric( $value ) ) {
1063
  return wp_cache_replace_line( '^ *\$' . $field, "\$$field = $value;", $wp_cache_config_file );
 
 
 
1064
  } elseif ( is_object( $value ) || is_array( $value ) ) {
1065
  $text = var_export( $value, true );
1066
  $text = preg_replace( '/[\s]+/', ' ', $text );
1061
  $GLOBALS[ $field ] = $value;
1062
  if ( is_numeric( $value ) ) {
1063
  return wp_cache_replace_line( '^ *\$' . $field, "\$$field = $value;", $wp_cache_config_file );
1064
+ } elseif ( is_bool( $value ) ) {
1065
+ $output_value = $value === true ? 'true' : 'false';
1066
+ return wp_cache_replace_line( '^ *\$' . $field, "\$$field = $output_value;", $wp_cache_config_file );
1067
  } elseif ( is_object( $value ) || is_array( $value ) ) {
1068
  $text = var_export( $value, true );
1069
  $text = preg_replace( '/[\s]+/', ' ', $text );
wp-cache.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP Super Cache
4
  Plugin URI: https://wordpress.org/plugins/wp-super-cache/
5
  Description: Very fast caching plugin for WordPress.
6
- Version: 1.6.6
7
  Author: Automattic
8
  Author URI: https://automattic.com/
9
  License: GPL2+
@@ -878,7 +878,7 @@ table.wpsc-settings-table {
878
  }
879
 
880
  if ( 'preload' === $curr_tab ) {
881
- if ( true === $super_cache_enabled && ! defined( 'DISABLESUPERCACHEPRELOADING' ) ) {
882
  global $wp_cache_preload_interval, $wp_cache_preload_on, $wp_cache_preload_taxonomies, $wp_cache_preload_email_me, $wp_cache_preload_email_volume, $wp_cache_preload_posts, $wpdb;
883
  $count = wpsc_post_count();
884
  if ( $count > 1000 ) {
3
  Plugin Name: WP Super Cache
4
  Plugin URI: https://wordpress.org/plugins/wp-super-cache/
5
  Description: Very fast caching plugin for WordPress.
6
+ Version: 1.6.7
7
  Author: Automattic
8
  Author URI: https://automattic.com/
9
  License: GPL2+
878
  }
879
 
880
  if ( 'preload' === $curr_tab ) {
881
+ if ( true == $super_cache_enabled && ! defined( 'DISABLESUPERCACHEPRELOADING' ) ) {
882
  global $wp_cache_preload_interval, $wp_cache_preload_on, $wp_cache_preload_taxonomies, $wp_cache_preload_email_me, $wp_cache_preload_email_volume, $wp_cache_preload_posts, $wpdb;
883
  $count = wpsc_post_count();
884
  if ( $count > 1000 ) {