WP Fastest Cache - Version 0.9.1.9

Version Description

  • [FEATURE] Clear cache after switch theme [Details]
Download this release

Release Info

Developer emrevona
Plugin Icon 128x128 WP Fastest Cache
Version 0.9.1.9
Comparing to
See all releases

Code changes from version 0.9.1.8 to 0.9.1.9

Files changed (3) hide show
  1. inc/single-preload.php +4 -0
  2. readme.txt +4 -1
  3. wpFastestCache.php +9 -1
inc/single-preload.php CHANGED
@@ -254,6 +254,10 @@
254
 
255
 
256
  jQuery(document).ready(function(){
 
 
 
 
257
  if(jQuery("#message").find("a").attr("href")){
258
  WpfcSinglePreload.init();
259
 
254
 
255
 
256
  jQuery(document).ready(function(){
257
+ if(!jQuery("#auto_cache_custom_meta_box").is(":visible")){
258
+ return;
259
+ }
260
+
261
  if(jQuery("#message").find("a").attr("href")){
262
  WpfcSinglePreload.init();
263
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://profiles.wordpress.org/emrevona/
4
  Tags: cache, caching, performance, wp-cache, total cache, super cache, cdn
5
  Requires at least: 3.3
6
  Tested up to: 5.7
7
- Stable tag: 0.9.1.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -125,6 +125,9 @@ The free version is enough to speed up your site but in the premium version ther
125
 
126
  == Changelog ==
127
 
 
 
 
128
  = 0.9.1.8 =
129
  * to make compatible the preload feature with WPML
130
  * refactoring of clearing cache of content which is moved to trash
4
  Tags: cache, caching, performance, wp-cache, total cache, super cache, cdn
5
  Requires at least: 3.3
6
  Tested up to: 5.7
7
+ Stable tag: 0.9.1.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
125
 
126
  == Changelog ==
127
 
128
+ = 0.9.1.9 =
129
+ * <strong>[FEATURE]</strong> Clear cache after switch theme [<a target="_blank" href="https://www.wpfastestcache.com/features/clear-cache-after-switch-theme/">Details</a>]
130
+
131
  = 0.9.1.8 =
132
  * to make compatible the preload feature with WPML
133
  * refactoring of clearing cache of content which is moved to trash
wpFastestCache.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP Fastest Cache
4
  Plugin URI: http://wordpress.org/plugins/wp-fastest-cache/
5
  Description: The simplest and fastest WP Cache system
6
- Version: 0.9.1.8
7
  Author: Emre Vona
8
  Author URI: http://tr.linkedin.com/in/emrevona
9
  Text Domain: wp-fastest-cache
@@ -121,6 +121,10 @@ GNU General Public License for more details.
121
  add_action( 'profile_update', array($this, 'modify_htaccess_for_new_user'), 10, 1);
122
  add_action( 'edit_terms', array($this, 'delete_cache_of_term'), 10, 1);
123
 
 
 
 
 
124
  if(defined("WPFC_CLEAR_CACHE_AFTER_PLUGIN_UPDATE") && WPFC_CLEAR_CACHE_AFTER_PLUGIN_UPDATE){
125
  add_action('upgrader_process_complete', array($this, 'clear_cache_after_update_plugin'), 10, 2);
126
  }
@@ -332,6 +336,10 @@ GNU General Public License for more details.
332
  }
333
  }
334
 
 
 
 
 
335
  public function clear_cache_after_update_plugin($upgrader_object, $options){
336
  if($options['action'] == 'update'){
337
  if($options['type'] == 'plugin' && isset($options['plugins'])){
3
  Plugin Name: WP Fastest Cache
4
  Plugin URI: http://wordpress.org/plugins/wp-fastest-cache/
5
  Description: The simplest and fastest WP Cache system
6
+ Version: 0.9.1.9
7
  Author: Emre Vona
8
  Author URI: http://tr.linkedin.com/in/emrevona
9
  Text Domain: wp-fastest-cache
121
  add_action( 'profile_update', array($this, 'modify_htaccess_for_new_user'), 10, 1);
122
  add_action( 'edit_terms', array($this, 'delete_cache_of_term'), 10, 1);
123
 
124
+ if(defined("WPFC_CLEAR_CACHE_AFTER_SWITCH_THEME") && WPFC_CLEAR_CACHE_AFTER_SWITCH_THEME){
125
+ add_action('after_switch_theme', array($this, 'clear_cache_after_switch_theme'));
126
+ }
127
+
128
  if(defined("WPFC_CLEAR_CACHE_AFTER_PLUGIN_UPDATE") && WPFC_CLEAR_CACHE_AFTER_PLUGIN_UPDATE){
129
  add_action('upgrader_process_complete', array($this, 'clear_cache_after_update_plugin'), 10, 2);
130
  }
336
  }
337
  }
338
 
339
+ public function clear_cache_after_switch_theme(){
340
+ $this->deleteCache(true);
341
+ }
342
+
343
  public function clear_cache_after_update_plugin($upgrader_object, $options){
344
  if($options['action'] == 'update'){
345
  if($options['type'] == 'plugin' && isset($options['plugins'])){