WP Super Cache - Version 1.7.0

Version Description

Download this release

Release Info

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

Code changes from version 1.6.9 to 1.7.0

Files changed (4) hide show
  1. ossdl-cdn.php +2 -0
  2. readme.txt +16 -8
  3. wp-cache-phase2.php +22 -18
  4. wp-cache.php +21 -23
ossdl-cdn.php CHANGED
@@ -202,6 +202,8 @@ function scossdl_off_filter( $content ) {
202
  $ossdl_arr_of_cnames = array_merge( array( $ossdl_off_cdn_url ), (array) $ossdl_arr_of_cnames );
203
  }
204
 
 
 
205
  $dirs = scossdl_off_additional_directories();
206
  $regex = '`(?<=[(\"\'])' . preg_quote( $ossdl_off_blog_url, '`' ) . '/(?:((?:' . $dirs . ')[^\"\')]+)|([^/\"\']+\.[^/\"\')]+))(?=[\"\')])`';
207
  return preg_replace_callback( $regex, 'scossdl_off_rewriter', $content );
202
  $ossdl_arr_of_cnames = array_merge( array( $ossdl_off_cdn_url ), (array) $ossdl_arr_of_cnames );
203
  }
204
 
205
+ $ossdl_arr_of_cnames = apply_filters( 'wpsc_cdn_urls', $ossdl_arr_of_cnames );
206
+
207
  $dirs = scossdl_off_additional_directories();
208
  $regex = '`(?<=[(\"\'])' . preg_quote( $ossdl_off_blog_url, '`' ) . '/(?:((?:' . $dirs . ')[^\"\')]+)|([^/\"\']+\.[^/\"\')]+))(?=[\"\')])`';
209
  return preg_replace_callback( $regex, 'scossdl_off_rewriter', $content );
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.2
5
- * Stable tag: 1.6.9
6
  * Requires at least: 3.1
7
  * Requires PHP: 5.2.4
8
  * License: GPLv2 or later
@@ -266,6 +266,14 @@ Your theme is probably responsive which means it resizes the page to suit whatev
266
 
267
  ## Changelog ##
268
 
 
 
 
 
 
 
 
 
269
  ### 1.6.9 ###
270
  * Improve the variables and messaging used by advanced-cache.php code. #687
271
  * Add a warning message to the debug log viewer. #688
@@ -293,7 +301,7 @@ Your theme is probably responsive which means it resizes the page to suit whatev
293
  * Check advanced-cache.php was created by the plugin before modifying/deleting it. (#666)
294
  * When saving settings, save blank lines. Fixes problems with WP_CACHE and WPCACHEHOME in wp-config.php. Related to #652. (#667)
295
  * Update outdated code and use is_multisite() (#600)
296
- * Fix the delete cache button in the admin bar. (#603)
297
  * Code cleanup in #602
298
  * Use get_post_status instead of post_status (#623)
299
  * Fixes button - Update Direct Pages (#622)
@@ -316,7 +324,7 @@ Your theme is probably responsive which means it resizes the page to suit whatev
316
  * Fixes for WP-CLI (#587) (#592)
317
  * Bumped the minimum WordPress version to 3.1 to use functions introduced then. (#591)
318
  * Fixes to wpsc_post_transition to avoid a fatal error using get_sample_permalink. (#595)
319
- * Fixed the admin bar "Delete Cache" link. (#589)
320
  * Fixed the headings used in the settings page. (#597)
321
 
322
  ### 1.6.3 ###
@@ -329,7 +337,7 @@ Your theme is probably responsive which means it resizes the page to suit whatev
329
  * Don't clean expired cache files after preload if garbage collection is disabled (#572)
330
  * On preload, if deleting a post don't delete the sub directories if it's the homepage. (#573)
331
  * Fix generation of semaphores when using WP CLI (#576)
332
- * Fix deleting from the admin bar (#578)
333
  * Avoid a strpos() warning. (#579)
334
  * Improve deleting of cache in edit/delete/publish actions (#577)
335
  * Fixes to headers code (#496)
@@ -403,7 +411,7 @@ Your theme is probably responsive which means it resizes the page to suit whatev
403
  * Minor changes to indentaion and spaces to tabs conversion (#371) (#395)
404
  * Don't set $wp_super_cache_comments here as it's not saved. (#379)
405
  * realpath() only works on directories. The cache_file wasn't set correctly. (#377)
406
- * Fix problem deleting cache from admin bar because of realpath() (#381)
407
  * Use trigger_error() instead of echoing to the screen if a config file isn't writeable. (#394)
408
  * Added the "wpsc_enable_wp_config_edit" filter to disable editing the wp-config.php (#392)
409
  * Fix some PHP notices when comments are edited/published/maintained. (#386)
@@ -546,7 +554,7 @@ Your theme is probably responsive which means it resizes the page to suit whatev
546
 
547
  ### 1.2 ###
548
  * Garbage collection of old cache files is significantly improved. I added a scheduled job that keeps an eye on things and restarts the job if necessary. Also, if you enable caching from the Easy page garbage collection will be enabled too.
549
- * Editors can delete single cached files from the admin bar now.
550
  * Fixed the cached page counter on the settings page.
551
  * Some sites that updated to 1.0 experienced too much garbage collection. There are still stragglers out there who haven't upgraded but that's fixed now!
552
  * Supercached mobile files are now used as there was a tiny little typo that needed fixing.
@@ -588,7 +596,7 @@ Your theme is probably responsive which means it resizes the page to suit whatev
588
  * Removed AddDefaultCharset .htaccess rule
589
  * Fixed problem with blogs in a folder and don't have a trailing slash
590
  * New scheduling of garbage collection
591
- * Added a "Delete cache" link to admin bar to delete cache of current page.
592
  * Updated documentation
593
  * Sorry Digg, Stephen Fry power now!
594
  * Updated translations
@@ -736,4 +744,4 @@ Your theme is probably responsive which means it resizes the page to suit whatev
736
 
737
 
738
  ## Upgrade Notice ##
739
- Fix security issue with debug log.
2
  * Contributors: donncha, automattic, kraftbj
3
  * Tags: performance, caching, wp-cache, wp-super-cache, cache
4
  * Tested up to: 5.2.2
5
+ * Stable tag: 1.7.0
6
  * Requires at least: 3.1
7
  * Requires PHP: 5.2.4
8
  * License: GPLv2 or later
266
 
267
  ## Changelog ##
268
 
269
+ ### 1.7.0 ###
270
+ * Added "wpsc_cdn_urls" filter to modify the URLs used to rewrite URLs. #697
271
+ * Fixed CDN functionality for logged in users. #698
272
+ * Disable settings that don't work in Expert mode. #699
273
+ * Don't enable mobile support by default, but it can still be enabled manually. #700
274
+ * Change "admin bar" to "Toolbar". Props @garrett-eclipse. #701
275
+ * Show settings enabled by "easy" settings page. #703
276
+
277
  ### 1.6.9 ###
278
  * Improve the variables and messaging used by advanced-cache.php code. #687
279
  * Add a warning message to the debug log viewer. #688
301
  * Check advanced-cache.php was created by the plugin before modifying/deleting it. (#666)
302
  * When saving settings, save blank lines. Fixes problems with WP_CACHE and WPCACHEHOME in wp-config.php. Related to #652. (#667)
303
  * Update outdated code and use is_multisite() (#600)
304
+ * Fix the delete cache button in the Toolbar. (#603)
305
  * Code cleanup in #602
306
  * Use get_post_status instead of post_status (#623)
307
  * Fixes button - Update Direct Pages (#622)
324
  * Fixes for WP-CLI (#587) (#592)
325
  * Bumped the minimum WordPress version to 3.1 to use functions introduced then. (#591)
326
  * Fixes to wpsc_post_transition to avoid a fatal error using get_sample_permalink. (#595)
327
+ * Fixed the Toolbar "Delete Cache" link. (#589)
328
  * Fixed the headings used in the settings page. (#597)
329
 
330
  ### 1.6.3 ###
337
  * Don't clean expired cache files after preload if garbage collection is disabled (#572)
338
  * On preload, if deleting a post don't delete the sub directories if it's the homepage. (#573)
339
  * Fix generation of semaphores when using WP CLI (#576)
340
+ * Fix deleting from the Toolbar (#578)
341
  * Avoid a strpos() warning. (#579)
342
  * Improve deleting of cache in edit/delete/publish actions (#577)
343
  * Fixes to headers code (#496)
411
  * Minor changes to indentaion and spaces to tabs conversion (#371) (#395)
412
  * Don't set $wp_super_cache_comments here as it's not saved. (#379)
413
  * realpath() only works on directories. The cache_file wasn't set correctly. (#377)
414
+ * Fix problem deleting cache from Toolbar because of realpath() (#381)
415
  * Use trigger_error() instead of echoing to the screen if a config file isn't writeable. (#394)
416
  * Added the "wpsc_enable_wp_config_edit" filter to disable editing the wp-config.php (#392)
417
  * Fix some PHP notices when comments are edited/published/maintained. (#386)
554
 
555
  ### 1.2 ###
556
  * Garbage collection of old cache files is significantly improved. I added a scheduled job that keeps an eye on things and restarts the job if necessary. Also, if you enable caching from the Easy page garbage collection will be enabled too.
557
+ * Editors can delete single cached files from the Toolbar now.
558
  * Fixed the cached page counter on the settings page.
559
  * Some sites that updated to 1.0 experienced too much garbage collection. There are still stragglers out there who haven't upgraded but that's fixed now!
560
  * Supercached mobile files are now used as there was a tiny little typo that needed fixing.
596
  * Removed AddDefaultCharset .htaccess rule
597
  * Fixed problem with blogs in a folder and don't have a trailing slash
598
  * New scheduling of garbage collection
599
+ * Added a "Delete cache" link to Toolbar to delete cache of current page.
600
  * Updated documentation
601
  * Sorry Digg, Stephen Fry power now!
602
  * Updated translations
744
 
745
 
746
  ## Upgrade Notice ##
747
+ Bugfix release.
wp-cache-phase2.php CHANGED
@@ -759,6 +759,7 @@ function wpsc_delete_files( $dir, $delete = true ) {
759
  wp_cache_debug( 'wpsc_delete_files: directory is blank' );
760
  return false;
761
  }
 
762
 
763
  // only do this once, this function will be called many times
764
  if ( $protected == '' ) {
@@ -778,24 +779,35 @@ function wpsc_delete_files( $dir, $delete = true ) {
778
  $dir = trailingslashit( $dir );
779
 
780
  if ( ! wpsc_is_in_cache_directory( $dir ) ) {
 
781
  return false;
782
  }
783
 
784
- if ( in_array( $dir, $protected ) )
 
785
  return false;
 
786
 
787
  if ( is_dir( $dir ) && $dh = @opendir( $dir ) ) {
788
  while ( ( $file = readdir( $dh ) ) !== false ) {
 
789
  if ( $file != '.' && $file != '..' && $file != '.htaccess' && is_file( $dir . $file ) )
790
- if ( $delete )
 
791
  @unlink( $dir . $file );
792
- else
 
793
  @wp_cache_rebuild_or_delete( $dir . $file );
 
794
  }
795
  closedir( $dh );
796
 
797
- if ( $delete )
 
798
  @rmdir( $dir );
 
 
 
799
  }
800
  return true;
801
  }
@@ -1326,20 +1338,6 @@ function wp_cache_phase2() {
1326
  header( 'Vary: Accept-Encoding, Cookie' );
1327
  }
1328
 
1329
- if ( wpsc_is_caching_user_disabled() ) {
1330
- wp_cache_debug( 'wp_cache_phase2: Caching disabled for known user! Exit.' );
1331
- define( 'WPSCSHUTDOWNMESSAGE', __( 'Caching disabled for known user. User logged in or cookie found.', 'wp-super-cache' ) );
1332
- add_action( 'wp_footer', 'wpsc_shutdown_message' );
1333
- return false;
1334
- }
1335
-
1336
- if ( wp_cache_user_agent_is_rejected() ) {
1337
- define( 'WPSCSHUTDOWNMESSAGE', __( 'Caching disabled because user agent was rejected.', 'wp-super-cache' ) );
1338
- wp_cache_debug( 'wp_cache_phase2: No caching to do as user agent rejected.' );
1339
- add_action( 'wp_footer', 'wpsc_shutdown_message' );
1340
- return false;
1341
- }
1342
-
1343
  ob_start( 'wp_cache_ob_callback' );
1344
  wp_cache_debug( 'Created output buffer', 4 );
1345
 
@@ -1859,6 +1857,12 @@ function wp_cache_ob_callback( $buffer ) {
1859
  } elseif ( empty( $wp_super_cache_query ) && !empty( $buffer ) && apply_filters( 'wpsc_only_cache_known_pages', 1 ) ) {
1860
  wp_cache_debug( 'wp_cache_ob_callback: wp_super_cache_query is empty. Not caching unknown page type. Return 0 to the wpsc_only_cache_known_pages filter to cache this page.' );
1861
  $cache_this_page = false;
 
 
 
 
 
 
1862
  }
1863
 
1864
  if ( isset( $wpsc_save_headers ) && $wpsc_save_headers )
759
  wp_cache_debug( 'wpsc_delete_files: directory is blank' );
760
  return false;
761
  }
762
+ wp_cache_debug( 'wpsc_delete_files: deleting ' . $dir );
763
 
764
  // only do this once, this function will be called many times
765
  if ( $protected == '' ) {
779
  $dir = trailingslashit( $dir );
780
 
781
  if ( ! wpsc_is_in_cache_directory( $dir ) ) {
782
+ wp_cache_debug( 'wpsc_delete_files: directory is not in cache directory: ' . $dir );
783
  return false;
784
  }
785
 
786
+ if ( in_array( $dir, $protected ) ) {
787
+ wp_cache_debug( 'wpsc_delete_files: directory is protected ' . $dir );
788
  return false;
789
+ }
790
 
791
  if ( is_dir( $dir ) && $dh = @opendir( $dir ) ) {
792
  while ( ( $file = readdir( $dh ) ) !== false ) {
793
+ wp_cache_debug( 'wpsc_delete_files: reading files: ' . $file );
794
  if ( $file != '.' && $file != '..' && $file != '.htaccess' && is_file( $dir . $file ) )
795
+ if ( $delete ) {
796
+ wp_cache_debug( 'wpsc_delete_files: deleting ' . $dir . $file );
797
  @unlink( $dir . $file );
798
+ } else {
799
+ wp_cache_debug( 'wpsc_delete_files: rebuild or delete ' . $dir . $file );
800
  @wp_cache_rebuild_or_delete( $dir . $file );
801
+ }
802
  }
803
  closedir( $dh );
804
 
805
+ if ( $delete ) {
806
+ wp_cache_debug( 'wpsc_delete_files: remove directory ' . $dir );
807
  @rmdir( $dir );
808
+ }
809
+ } else {
810
+ wp_cache_debug( 'wpsc_delete_files: could not open directory ' . $dir );
811
  }
812
  return true;
813
  }
1338
  header( 'Vary: Accept-Encoding, Cookie' );
1339
  }
1340
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1341
  ob_start( 'wp_cache_ob_callback' );
1342
  wp_cache_debug( 'Created output buffer', 4 );
1343
 
1857
  } elseif ( empty( $wp_super_cache_query ) && !empty( $buffer ) && apply_filters( 'wpsc_only_cache_known_pages', 1 ) ) {
1858
  wp_cache_debug( 'wp_cache_ob_callback: wp_super_cache_query is empty. Not caching unknown page type. Return 0 to the wpsc_only_cache_known_pages filter to cache this page.' );
1859
  $cache_this_page = false;
1860
+ } elseif ( wpsc_is_caching_user_disabled() ) {
1861
+ wp_cache_debug( 'wp_cache_ob_callback: Caching disabled for known user. User logged in or cookie found.' );
1862
+ $cache_this_page = false;
1863
+ } elseif ( wp_cache_user_agent_is_rejected() ) {
1864
+ wp_cache_debug( 'wp_cache_ob_callback: Caching disabled because user agent was rejected.' );
1865
+ $cache_this_page = false;
1866
  }
1867
 
1868
  if ( isset( $wpsc_save_headers ) && $wpsc_save_headers )
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.9
7
  Author: Automattic
8
  Author URI: https://automattic.com/
9
  License: GPL2+
@@ -548,7 +548,6 @@ function wp_cache_manager_updates() {
548
  if ( isset( $_POST[ 'action' ] ) && $_POST[ 'action' ] == 'easysetup' ) {
549
  $_POST[ 'action' ] = 'scupdates';
550
  if( isset( $_POST[ 'wp_cache_easy_on' ] ) && $_POST[ 'wp_cache_easy_on' ] == 1 ) {
551
- $_POST[ 'wp_cache_mobile_enabled' ] = 1;
552
  $_POST[ 'wp_cache_enabled' ] = 1;
553
  $_POST[ 'super_cache_enabled' ] = 1;
554
  $_POST[ 'cache_rebuild_files' ] = 1;
@@ -575,7 +574,7 @@ function wp_cache_manager_updates() {
575
  wp_clear_scheduled_hook( 'wp_cache_gc' );
576
  wp_clear_scheduled_hook( 'wp_cache_gc_watcher' );
577
  }
578
- $advanced_settings = array( 'wp_super_cache_late_init', 'wp_cache_disable_utf8', 'wp_cache_no_cache_for_get', 'wp_supercache_304', 'wp_cache_mfunc_enabled', 'wp_cache_mobile_enabled', 'wp_cache_front_page_checks', 'wp_supercache_cache_list', 'wp_cache_clear_on_post_edit', 'wp_cache_make_known_anon', 'wp_cache_refresh_single_only', 'cache_compression' );
579
  foreach( $advanced_settings as $setting ) {
580
  if ( isset( $GLOBALS[ $setting ] ) && $GLOBALS[ $setting ] == 1 ) {
581
  $_POST[ $setting ] = 1;
@@ -1098,25 +1097,16 @@ table.wpsc-settings-table {
1098
  <em><?php esc_html_e( 'Compression is disabled by default because some hosts have problems with compressed files. Switching it on and off clears the cache.', 'wp-super-cache' ); ?></em><br />
1099
  <?php endif; ?>
1100
  <?php endif; ?>
1101
- <label><input type='checkbox' name='wpsc_save_headers' <?php checked( $wpsc_save_headers ); ?> value='1' /> <?php esc_html_e( 'Cache HTTP headers with page content.', 'wp-super-cache' ); ?></label><br />
1102
  <label><input type='checkbox' name='cache_rebuild_files' <?php checked( $cache_rebuild_files ); ?> value='1'> <?php echo esc_html__( 'Cache rebuild. Serve a supercache file to anonymous users while a new file is being generated.', 'wp-super-cache' ) . ' <em>(' . esc_html__( 'Recommended', 'wp-super-cache' ) . ')</em>'; ?></label><br />
1103
- <?php
1104
- $disable_304 = true;
1105
- if ( 0 == $wp_cache_mod_rewrite )
1106
- $disable_304 = false;
1107
- if ( $disable_304 )
1108
- echo "<strike>";
1109
- ?>
1110
- <label><input <?php disabled( $disable_304 ); ?> type='checkbox' name='wp_supercache_304' <?php checked( $wp_supercache_304 ); ?> value='1'> <?php echo esc_html__( '304 Not Modified browser caching. Indicate when a page has not been modified since it was last requested.', 'wp-super-cache' ) . ' <em>(' . esc_html__( 'Recommended', 'wp-super-cache' ) . ')</em>'; ?></label><br />
1111
- <?php
1112
- if ( $disable_304 ) {
1113
- echo '</strike>';
1114
- echo '<p><strong>' . esc_html__( 'Warning! 304 browser caching is only supported when mod_rewrite caching is not used.', 'wp-super-cache' ) . '</strong></p>';
1115
- } else {
1116
- echo '<em>' . esc_html__( '304 support is disabled by default because some hosts have had problems with the headers used in the past.', 'wp-super-cache' ) . '</em><br />';
1117
- }
1118
- ?>
1119
- <label><input type='checkbox' name='wp_cache_make_known_anon' <?php checked( $wp_cache_make_known_anon ); ?> value='1'> <?php _e( 'Make known users anonymous so they&#8217;re served supercached static files.', 'wp-super-cache' ); ?></label><br />
1120
  </legend>
1121
  </fieldset>
1122
  </td>
@@ -1126,7 +1116,7 @@ table.wpsc-settings-table {
1126
  <td>
1127
  <fieldset>
1128
  <legend class="hidden">Advanced</legend>
1129
- <label><input type='checkbox' name='wp_cache_mfunc_enabled' <?php if( $wp_cache_mfunc_enabled ) echo "checked"; ?> value='1' <?php if ( $wp_cache_mod_rewrite ) { echo "disabled='disabled'"; } ?>> <?php _e( 'Enable dynamic caching. (See <a href="https://wordpress.org/plugins/wp-super-cache/faq/">FAQ</a> or wp-super-cache/plugins/dynamic-cache-test.php for example code.)', 'wp-super-cache' ); ?></label><br />
1130
  <label><input type='checkbox' name='wp_cache_mobile_enabled' <?php if( $wp_cache_mobile_enabled ) echo "checked"; ?> value='1'> <?php _e( 'Mobile device support. (External plugin or theme required. See the <a href="https://wordpress.org/plugins/wp-super-cache/faq/">FAQ</a> for further details.)', 'wp-super-cache' ); ?></label><br />
1131
  <?php if ( $wp_cache_mobile_enabled ) {
1132
  echo '<blockquote><h5>' . __( 'Mobile Browsers', 'wp-super-cache' ) . '</h5>' . esc_html( $wp_cache_mobile_browsers ) . "<br /><h5>" . __( 'Mobile Prefixes', 'wp-super-cache' ) . "</h5>" . esc_html( $wp_cache_mobile_prefixes ) . "<br /></blockquote>";
@@ -1225,6 +1215,14 @@ table.wpsc-settings-table {
1225
  </td>
1226
  </tr>
1227
  </table>
 
 
 
 
 
 
 
 
1228
  <?php
1229
  if ( ! $is_nginx && $cache_enabled && ! $wp_cache_mod_rewrite ) {
1230
  $scrules = trim( implode( "\n", extract_from_markers( trailingslashit( get_home_path() ) . '.htaccess', 'WPSuperCache' ) ) );
@@ -3832,7 +3830,7 @@ function supercache_admin_bar_render() {
3832
  }
3833
 
3834
  /**
3835
- * Adds "Delete Cache" button in WP Admin Bar.
3836
  */
3837
  function wpsc_admin_bar_render( $wp_admin_bar ) {
3838
 
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.7.0
7
  Author: Automattic
8
  Author URI: https://automattic.com/
9
  License: GPL2+
548
  if ( isset( $_POST[ 'action' ] ) && $_POST[ 'action' ] == 'easysetup' ) {
549
  $_POST[ 'action' ] = 'scupdates';
550
  if( isset( $_POST[ 'wp_cache_easy_on' ] ) && $_POST[ 'wp_cache_easy_on' ] == 1 ) {
 
551
  $_POST[ 'wp_cache_enabled' ] = 1;
552
  $_POST[ 'super_cache_enabled' ] = 1;
553
  $_POST[ 'cache_rebuild_files' ] = 1;
574
  wp_clear_scheduled_hook( 'wp_cache_gc' );
575
  wp_clear_scheduled_hook( 'wp_cache_gc_watcher' );
576
  }
577
+ $advanced_settings = array( 'wp_super_cache_late_init', 'wp_cache_disable_utf8', 'wp_cache_no_cache_for_get', 'wp_supercache_304', 'wp_cache_mfunc_enabled', 'wp_cache_front_page_checks', 'wp_supercache_cache_list', 'wp_cache_clear_on_post_edit', 'wp_cache_make_known_anon', 'wp_cache_refresh_single_only', 'cache_compression' );
578
  foreach( $advanced_settings as $setting ) {
579
  if ( isset( $GLOBALS[ $setting ] ) && $GLOBALS[ $setting ] == 1 ) {
580
  $_POST[ $setting ] = 1;
1097
  <em><?php esc_html_e( 'Compression is disabled by default because some hosts have problems with compressed files. Switching it on and off clears the cache.', 'wp-super-cache' ); ?></em><br />
1098
  <?php endif; ?>
1099
  <?php endif; ?>
 
1100
  <label><input type='checkbox' name='cache_rebuild_files' <?php checked( $cache_rebuild_files ); ?> value='1'> <?php echo esc_html__( 'Cache rebuild. Serve a supercache file to anonymous users while a new file is being generated.', 'wp-super-cache' ) . ' <em>(' . esc_html__( 'Recommended', 'wp-super-cache' ) . ')</em>'; ?></label><br />
1101
+ <?php if ( $wp_cache_mod_rewrite ) { ?>
1102
+ <br />
1103
+ <p><strong><?php esc_html_e( 'Warning! The following settings are disabled because Expert caching is enabled.', 'wp-super-cache' ); ?></strong></p>
1104
+ <br />
1105
+ <?php } ?>
1106
+ <label><input <?php disabled( $wp_cache_mod_rewrite ); ?> type='checkbox' name='wpsc_save_headers' <?php checked( $wpsc_save_headers ); ?> value='1' /> <?php esc_html_e( 'Cache HTTP headers with page content.', 'wp-super-cache' ); ?></label><br />
1107
+ <label><input <?php disabled( $wp_cache_mod_rewrite ); ?> type='checkbox' name='wp_supercache_304' <?php checked( $wp_supercache_304 ); ?> value='1'> <?php echo esc_html__( '304 Browser caching. Improves site performance by checking if the page has changed since the browser last requested it.', 'wp-super-cache' ) . ' <em>(' . esc_html__( 'Recommended', 'wp-super-cache' ) . ')</em>'; ?></label><br />
1108
+ <?php echo '<em>' . esc_html__( '304 support is disabled by default because some hosts have had problems with the headers used in the past.', 'wp-super-cache' ) . '</em><br />'; ?>
1109
+ <label><input <?php disabled( $wp_cache_mod_rewrite ); ?> type='checkbox' name='wp_cache_make_known_anon' <?php checked( $wp_cache_make_known_anon ); ?> value='1'> <?php _e( 'Make known users anonymous so they&#8217;re served supercached static files.', 'wp-super-cache' ); ?></label><br />
 
 
 
 
 
 
 
 
1110
  </legend>
1111
  </fieldset>
1112
  </td>
1116
  <td>
1117
  <fieldset>
1118
  <legend class="hidden">Advanced</legend>
1119
+ <label><input <?php disabled( $wp_cache_mod_rewrite ); ?> type='checkbox' name='wp_cache_mfunc_enabled' <?php if( $wp_cache_mfunc_enabled ) echo "checked"; ?> value='1'> <?php _e( 'Enable dynamic caching. (See <a href="https://wordpress.org/plugins/wp-super-cache/faq/">FAQ</a> or wp-super-cache/plugins/dynamic-cache-test.php for example code.)', 'wp-super-cache' ); ?></label><br />
1120
  <label><input type='checkbox' name='wp_cache_mobile_enabled' <?php if( $wp_cache_mobile_enabled ) echo "checked"; ?> value='1'> <?php _e( 'Mobile device support. (External plugin or theme required. See the <a href="https://wordpress.org/plugins/wp-super-cache/faq/">FAQ</a> for further details.)', 'wp-super-cache' ); ?></label><br />
1121
  <?php if ( $wp_cache_mobile_enabled ) {
1122
  echo '<blockquote><h5>' . __( 'Mobile Browsers', 'wp-super-cache' ) . '</h5>' . esc_html( $wp_cache_mobile_browsers ) . "<br /><h5>" . __( 'Mobile Prefixes', 'wp-super-cache' ) . "</h5>" . esc_html( $wp_cache_mobile_prefixes ) . "<br /></blockquote>";
1215
  </td>
1216
  </tr>
1217
  </table>
1218
+ <p><?php _e( 'The following recommended settings will be enabled:', 'wp-super-cache' ); ?></p>
1219
+ <ol>
1220
+ <li><?php _e( 'Caching disabled for logged in visitors.', 'wp-super-cache' ); ?></li>
1221
+ <li><?php _e( 'Simple caching.', 'wp-super-cache' ); ?></li>
1222
+ <li><?php _e( 'Cache Rebuild.', 'wp-super-cache' ); ?></li>
1223
+ <li><?php _e( 'Interval garbage collection every 10 minutes with a cache lifetime of 30 minutes (if not configured already).', 'wp-super-cache' ); ?></li>
1224
+ </ol>
1225
+ <p><?php _e( 'These settings can be modified on the Advanced Settings page.', 'wp-super-cache' ); ?></p>
1226
  <?php
1227
  if ( ! $is_nginx && $cache_enabled && ! $wp_cache_mod_rewrite ) {
1228
  $scrules = trim( implode( "\n", extract_from_markers( trailingslashit( get_home_path() ) . '.htaccess', 'WPSuperCache' ) ) );
3830
  }
3831
 
3832
  /**
3833
+ * Adds "Delete Cache" button in WP Toolbar.
3834
  */
3835
  function wpsc_admin_bar_render( $wp_admin_bar ) {
3836