WP Fastest Cache - Version 1.0.1

Version Description

  • to clear only cache of post/page even if the "update post" option is disabled
Download this release

Release Info

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

Code changes from version 1.0.0 to 1.0.1

Files changed (2) hide show
  1. readme.txt +5 -2
  2. wpFastestCache.php +15 -6
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: emrevona
3
  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.9
7
- Stable tag: 1.0.0
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
  = 1.0.0 =
129
  * to define the save_settings() function of single preload feature as static function
130
 
3
  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: 6.0
7
+ Stable tag: 1.0.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
125
 
126
  == Changelog ==
127
 
128
+ = 1.0.1 =
129
+ * to clear only cache of post/page even if the "update post" option is disabled
130
+
131
  = 1.0.0 =
132
  * to define the save_settings() function of single preload feature as static function
133
 
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: 1.0.0
7
  Author: Emre Vona
8
  Author URI: http://tr.linkedin.com/in/emrevona
9
  Text Domain: wp-fastest-cache
@@ -1105,12 +1105,19 @@ GNU General Public License for more details.
1105
  }
1106
  }
1107
 
1108
- if($new_status == "publish" && $old_status == "publish"){
1109
-
1110
 
 
1111
 
 
 
 
 
 
 
 
1112
 
1113
- if(isset($this->options->wpFastestCacheUpdatePost) && isset($this->options->wpFastestCacheStatus)){
1114
 
1115
  if($this->options->wpFastestCacheUpdatePost_type == "post"){
1116
  $this->singleDeleteCache(false, $post->ID);
@@ -1118,6 +1125,9 @@ GNU General Public License for more details.
1118
  $this->deleteCache();
1119
  }
1120
 
 
 
 
1121
  }
1122
  }
1123
 
@@ -1153,12 +1163,11 @@ GNU General Public License for more details.
1153
  }
1154
  }
1155
 
1156
- public function singleDeleteCache($comment_id = false, $post_id = false){
1157
  include_once('inc/cdn.php');
1158
 
1159
  CdnWPFC::cloudflare_clear_cache();
1160
 
1161
- $to_clear_parents = true;
1162
  $to_clear_feed = true;
1163
 
1164
  // not to clear cache of homepage/cats/tags after ajax request by other 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: 1.0.1
7
  Author: Emre Vona
8
  Author URI: http://tr.linkedin.com/in/emrevona
9
  Text Domain: wp-fastest-cache
1105
  }
1106
  }
1107
 
1108
+ if(isset($this->options->wpFastestCacheStatus) && $new_status == "publish" && $old_status == "publish"){
 
1109
 
1110
+ // if(isset($this->options->wpFastestCacheUpdatePost) && isset($this->options->wpFastestCacheStatus)){
1111
 
1112
+ // if($this->options->wpFastestCacheUpdatePost_type == "post"){
1113
+ // $this->singleDeleteCache(false, $post->ID);
1114
+ // }else if($this->options->wpFastestCacheUpdatePost_type == "all"){
1115
+ // $this->deleteCache();
1116
+ // }
1117
+
1118
+ // }
1119
 
1120
+ if(isset($this->options->wpFastestCacheUpdatePost)){
1121
 
1122
  if($this->options->wpFastestCacheUpdatePost_type == "post"){
1123
  $this->singleDeleteCache(false, $post->ID);
1125
  $this->deleteCache();
1126
  }
1127
 
1128
+ }else{
1129
+ // to clear only cache of content even though the "update post" option is disabled
1130
+ $this->singleDeleteCache(false, $post->ID, false);
1131
  }
1132
  }
1133
 
1163
  }
1164
  }
1165
 
1166
+ public function singleDeleteCache($comment_id = false, $post_id = false, $to_clear_parents = true){
1167
  include_once('inc/cdn.php');
1168
 
1169
  CdnWPFC::cloudflare_clear_cache();
1170
 
 
1171
  $to_clear_feed = true;
1172
 
1173
  // not to clear cache of homepage/cats/tags after ajax request by other plugins