WP Fastest Cache - Version 1.0.9

Version Description

  • to improve the style of exclude feature wizard
  • to fix hiding the toolbar when logged in
  • to fix PHP Notice: Undefined offset: -1 in js-utilities.php on line 67
  • to fix PHP Fatal error: Uncaught Error: Non-static method cannot be called statically in clearing-specific-pages.php on line 58
Download this release

Release Info

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

Code changes from version 1.0.8 to 1.0.9

inc/cache.php CHANGED
@@ -459,7 +459,7 @@
459
  FROM `$wpdb->users`
460
  INNER JOIN `$wpdb->usermeta`
461
  ON `$wpdb->users`.`user_login` = \"$username\" AND
462
- `$wpdb->usermeta`.`meta_key` = \"wp_user_level\" AND
463
  `$wpdb->usermeta`.`meta_value` = \"10\" AND
464
  `$wpdb->users`.`ID` = `$wpdb->usermeta`.user_id ;"
465
  );
459
  FROM `$wpdb->users`
460
  INNER JOIN `$wpdb->usermeta`
461
  ON `$wpdb->users`.`user_login` = \"$username\" AND
462
+ `$wpdb->usermeta`.`meta_key` LIKE \"%_user_level\" AND
463
  `$wpdb->usermeta`.`meta_value` = \"10\" AND
464
  `$wpdb->users`.`ID` = `$wpdb->usermeta`.user_id ;"
465
  );
inc/clearing-specific-pages.php CHANGED
@@ -27,7 +27,7 @@
27
  wp_send_json_success();
28
  }
29
 
30
- public function check_url(){
31
  $home_url = parse_url(get_option("home"), PHP_URL_HOST);
32
  $specific_url = parse_url($_POST["url"], PHP_URL_HOST);
33
 
@@ -38,7 +38,7 @@
38
  return false;
39
  }
40
 
41
- public function check_wild_card(){
42
  if(preg_match("/[^\/]\(\.\*\)/", $_POST["url"])){
43
  return false;
44
  }
27
  wp_send_json_success();
28
  }
29
 
30
+ public static function check_url(){
31
  $home_url = parse_url(get_option("home"), PHP_URL_HOST);
32
  $specific_url = parse_url($_POST["url"], PHP_URL_HOST);
33
 
38
  return false;
39
  }
40
 
41
+ public static function check_wild_card(){
42
  if(preg_match("/[^\/]\(\.\*\)/", $_POST["url"])){
43
  return false;
44
  }
inc/js-utilities.php CHANGED
@@ -63,7 +63,7 @@
63
 
64
  if($jsContent = $this->file_get_contents_curl($minifiedJs["url"]."/".$jsFiles[0]."?v=".time())){
65
 
66
- if(preg_match("/^[\"\']use strict[\"\']/i", $jsContent)){
67
  $this->mergeJs($prev_content, $this->jsLinks[$key - 1]);
68
  $prev_content = "";
69
  }else{
63
 
64
  if($jsContent = $this->file_get_contents_curl($minifiedJs["url"]."/".$jsFiles[0]."?v=".time())){
65
 
66
+ if($key > 0 && preg_match("/^[\"\']use strict[\"\']/i", $jsContent)){
67
  $this->mergeJs($prev_content, $this->jsLinks[$key - 1]);
68
  $prev_content = "";
69
  }else{
inc/preload.php CHANGED
@@ -507,7 +507,8 @@
507
  }else{
508
  if(isset($options->wpFastestCachePreload_restart)){
509
  foreach ($pre_load as $pre_load_key => &$pre_load_value) {
510
- if($pre_load_key != "number" && $pre_load_key != "order"){
 
511
  $pre_load_value = 0;
512
  }
513
  }
507
  }else{
508
  if(isset($options->wpFastestCachePreload_restart)){
509
  foreach ($pre_load as $pre_load_key => &$pre_load_value) {
510
+ //if($pre_load_key != "number" && $pre_load_key != "order"){
511
+ if($pre_load_key != "number"){
512
  $pre_load_value = 0;
513
  }
514
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://profiles.wordpress.org/emrevona/
4
  Tags: cache, Optimize, performance, wp-cache, core web vitals
5
  Requires at least: 3.3
6
  Tested up to: 6.1
7
- Stable tag: 1.0.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -131,6 +131,12 @@ WP Fastest Cache is compatible with most popular plugins such as Contact Form 7,
131
 
132
  == Changelog ==
133
 
 
 
 
 
 
 
134
  = 1.0.8 =
135
  * to stop showing the "DONOTCACHEPAGE is defined as TRUE" comment in the footer for the ajax requests
136
  * <strong>[FEATURE]</strong> Clearing Specific Pages [<a target="_blank" href="https://www.wpfastestcache.com/features/clear-cache-of-specific-urls-when-updating-or-posting/">Details</a>]
4
  Tags: cache, Optimize, performance, wp-cache, core web vitals
5
  Requires at least: 3.3
6
  Tested up to: 6.1
7
+ Stable tag: 1.0.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
131
 
132
  == Changelog ==
133
 
134
+ = 1.0.9 =
135
+ * to improve the style of exclude feature wizard
136
+ * to fix hiding the toolbar when logged in
137
+ * to fix PHP Notice: Undefined offset: -1 in js-utilities.php on line 67
138
+ * to fix PHP Fatal error: Uncaught Error: Non-static method cannot be called statically in clearing-specific-pages.php on line 58
139
+
140
  = 1.0.8 =
141
  * to stop showing the "DONOTCACHEPAGE is defined as TRUE" comment in the footer for the ajax requests
142
  * <strong>[FEATURE]</strong> Clearing Specific Pages [<a target="_blank" href="https://www.wpfastestcache.com/features/clear-cache-of-specific-urls-when-updating-or-posting/">Details</a>]
templates/exclude.php CHANGED
@@ -90,20 +90,28 @@
90
  <td class="" width="95">
91
  <select name="wpfc-exclude-rule-prefix" style="width: 98px !important;">
92
  <option selected="" value=""></option>
93
- <option value="homepage"><?php _e("Home Page", "wp-fastest-cache"); ?></option>
94
- <option value="category"><?php _e("Categories", "wp-fastest-cache"); ?></option>
95
- <option value="tag"><?php _e("Tags", "wp-fastest-cache"); ?></option>
96
- <option value="post"><?php _e("Posts", "wp-fastest-cache"); ?></option>
97
- <option value="page"><?php _e("Pages", "wp-fastest-cache"); ?></option>
98
-
99
- <option value="archive"><?php _e("Archives", "wp-fastest-cache"); ?></option>
100
-
101
- <option value="attachment"><?php _e("Attachments", "wp-fastest-cache"); ?></option>
102
- <option value="startwith"><?php _e("Starts With", "wp-fastest-cache"); ?></option>
103
- <option value="contain"><?php _e("Contains", "wp-fastest-cache"); ?></option>
104
- <option value="exact"><?php _e("Is Equal To", "wp-fastest-cache"); ?></option>
105
- <option value="googleanalytics"><?php _e("has Google Analytics Parameters", "wp-fastest-cache"); ?></option>
106
- <option value="woocommerce_items_in_cart"><?php _e("has Woocommerce Items in Cart", "wp-fastest-cache"); ?></option>
 
 
 
 
 
 
 
 
107
  </select>
108
  </td>
109
  <td width="300">
@@ -212,26 +220,7 @@
212
  clone_modal.find("input[name='wpfc-exclude-rule-content']").val(jQuery(this).attr("content"));
213
  clone_modal.find("input[name='wpfc-exclude-rule-type']").val(jQuery(this).attr("type"));
214
 
215
-
216
- clone_modal.find("select[name='wpfc-exclude-rule-prefix'] option").each(function(){
217
- if(this.value == "woocommerce_items_in_cart"){
218
- if(e.type == "cookie"){
219
- return;
220
- }else{
221
- jQuery(this).remove();
222
- }
223
- }else{
224
- if(e.type != "page"){
225
- if(this.value != "contain"){
226
- jQuery(this).remove();
227
-
228
- }
229
- }
230
-
231
- }
232
-
233
-
234
- });
235
 
236
 
237
  if(e.type != "page"){
@@ -292,6 +281,35 @@
292
 
293
  this.reorder();
294
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
295
  create_title: function(prefix, content){
296
  var title = "";
297
 
@@ -389,24 +407,9 @@
389
  clone_modal.attr("id", clone_modal_id);
390
  clone_modal.find("input[name='wpfc-exclude-rule-type']").val(clone_modal_type);
391
 
392
- clone_modal.find("select[name='wpfc-exclude-rule-prefix'] option").each(function(){
393
- if(this.value == "woocommerce_items_in_cart"){
394
- if(clone_modal_type == "cookie"){
395
- return;
396
- }else{
397
- jQuery(this).remove();
398
- }
399
- }else{
400
- if(clone_modal_type != "page"){
401
- if(this.value != "contain"){
402
- jQuery(this).remove();
403
-
404
- }
405
- }
406
- }
407
 
 
408
 
409
- });
410
 
411
  if(clone_modal_type != "page"){
412
  if(clone_modal_type == "useragent"){
90
  <td class="" width="95">
91
  <select name="wpfc-exclude-rule-prefix" style="width: 98px !important;">
92
  <option selected="" value=""></option>
93
+
94
+ <optgroup label="Content Types">
95
+ <option value="homepage"><?php _e("Home Page", "wp-fastest-cache"); ?></option>
96
+ <option value="category"><?php _e("Categories", "wp-fastest-cache"); ?></option>
97
+ <option value="tag"><?php _e("Tags", "wp-fastest-cache"); ?></option>
98
+ <option value="post"><?php _e("Posts", "wp-fastest-cache"); ?></option>
99
+ <option value="page"><?php _e("Pages", "wp-fastest-cache"); ?></option>
100
+ <option value="archive"><?php _e("Archives", "wp-fastest-cache"); ?></option>
101
+ <option value="attachment"><?php _e("Attachments", "wp-fastest-cache"); ?></option>
102
+ </optgroup>
103
+
104
+ <optgroup label="Methods">
105
+ <option value="startwith"><?php _e("Starts With", "wp-fastest-cache"); ?></option>
106
+ <option value="contain"><?php _e("Contains", "wp-fastest-cache"); ?></option>
107
+ <option value="exact"><?php _e("Is Equal To", "wp-fastest-cache"); ?></option>
108
+ </optgroup>
109
+
110
+ <optgroup label="Special">
111
+ <option value="googleanalytics"><?php _e("has Google Analytics Parameters", "wp-fastest-cache"); ?></option>
112
+ <option value="woocommerce_items_in_cart"><?php _e("has Woocommerce Items in Cart", "wp-fastest-cache"); ?></option>
113
+ </optgroup>
114
+
115
  </select>
116
  </td>
117
  <td width="300">
220
  clone_modal.find("input[name='wpfc-exclude-rule-content']").val(jQuery(this).attr("content"));
221
  clone_modal.find("input[name='wpfc-exclude-rule-type']").val(jQuery(this).attr("type"));
222
 
223
+ self.modify_select(clone_modal, e.type);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
224
 
225
 
226
  if(e.type != "page"){
281
 
282
  this.reorder();
283
  },
284
+ modify_select: function(clone_modal, type){
285
+ clone_modal.find("select[name='wpfc-exclude-rule-prefix'] option").each(function(){
286
+
287
+ if(this.value == "woocommerce_items_in_cart"){
288
+ if(type == "cookie"){
289
+ return;
290
+ }else{
291
+ jQuery(this).remove();
292
+ }
293
+ }else{
294
+ if(type != "page"){
295
+ if(this.value != "contain"){
296
+ jQuery(this).remove();
297
+
298
+ }
299
+ }
300
+
301
+ }
302
+
303
+ });
304
+
305
+ clone_modal.find("select[name='wpfc-exclude-rule-prefix'] optgroup").each(function(){
306
+ if(jQuery(this).find("option").length == 0){
307
+ jQuery(this).remove();
308
+ }
309
+
310
+ });
311
+
312
+ },
313
  create_title: function(prefix, content){
314
  var title = "";
315
 
407
  clone_modal.attr("id", clone_modal_id);
408
  clone_modal.find("input[name='wpfc-exclude-rule-type']").val(clone_modal_type);
409
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
410
 
411
+ self.modify_select(clone_modal, clone_modal_type);
412
 
 
413
 
414
  if(clone_modal_type != "page"){
415
  if(clone_modal_type == "useragent"){
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.8
7
  Author: Emre Vona
8
  Author URI: https://www.wpfastestcache.com/
9
  Text Domain: wp-fastest-cache
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.9
7
  Author: Emre Vona
8
  Author URI: https://www.wpfastestcache.com/
9
  Text Domain: wp-fastest-cache