WP Fastest Cache - Version 1.0.8

Version Description

  • to stop showing the "DONOTCACHEPAGE is defined as TRUE" comment in the footer for the ajax requests
  • [FEATURE] Clearing Specific Pages [Details]
  • to fix the site url on the exclude page
  • to fix PHP Notice: Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook
Download this release

Release Info

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

Code changes from version 1.0.7 to 1.0.8

inc/admin.php CHANGED
@@ -1623,27 +1623,26 @@
1623
  </script>
1624
 
1625
 
1626
- <?php if(defined("WPFC_ENABLE_CLEARING_SPECIFIC_PAGES") && WPFC_ENABLE_CLEARING_SPECIFIC_PAGES){ ?>
1627
 
1628
- <div class="exclude_section_clear" style=" margin-left: 3%; width: 95%; margin-bottom: 12px; margin-top: 0;"><div></div></div>
1629
 
1630
- <h2 style="padding-bottom:10px;padding-left:20px;float:left;"><?php _e("Clearing Specific Pages", "wp-fastest-cache"); ?></h2>
1631
 
1632
- <div style="float:left;margin-top:-37px;padding-left:628px;">
1633
- <button type="button" <?php echo $disable_wp_cron;?> class="wpfc-add-new-csp-button wpfc-dialog-buttons" style="display: inline-block;padding: 4px 10px;">
1634
- <span><?php _e("Add New Rule", "wp-fastest-cache"); ?></span>
1635
- </button>
1636
- </div>
1637
 
1638
- <div class="wpfc-csp-list" style="display: block;width:98%;float:left;">
1639
 
1640
- </div>
 
 
 
 
1641
 
1642
- <?php
1643
- include(WPFC_MAIN_PATH."templates/clearing_specific_pages.php");
1644
- ?>
1645
 
1646
- <?php } ?>
1647
 
1648
 
1649
 
@@ -1725,31 +1724,24 @@
1725
  <h1 style="float:left;" id="just-h1"><?php _e("Just", "wp-fastest-cache"); ?></h1><h1><span style="margin-left:5px;" id="wpfc-premium-price"><?php echo $premium_price; ?></span></h1>
1726
  <p><?php _e("The download button will be available after paid. You can buy the premium version now.", "wp-fastest-cache"); ?></p>
1727
 
1728
- <?php if(!preg_match("/Caiu\s*Na/i", get_bloginfo("name")) && !preg_match("/(caiuna|escort|porn)/i", $_SERVER["HTTP_HOST"])){ ?>
1729
- <?php if(class_exists("WpFastestCachePowerfulHtml")){ ?>
1730
- <button id="wpfc-buy-premium-button" type="submit" class="wpfc-btn primaryDisableCta" style="width:200px;">
1731
- <span><?php _e("Purchased", "wp-fastest-cache"); ?></span>
 
 
 
 
 
 
 
 
 
 
1732
  </button>
1733
- <?php }else{ ?>
1734
-
1735
- <?php //if(is_multisite()){ ?>
1736
- <?php if(false){ ?>
1737
- <button id="wpfc-buy-premium-button" type="submit" class="wpfc-btn primaryCta" style="width:200px;background-color:red;border-color:red;">
1738
- <span>Not Available<br>for<br>Multi-Site</span>
1739
- </button>
1740
- <?php }else{ ?>
1741
- <form action="<?php echo $premium_buy_link; ?>" method="post">
1742
- <input type="hidden" name="ip" value="<?php echo $_SERVER["REMOTE_ADDR"]; ?>">
1743
- <input type="hidden" name="wpfclang" value="<?php echo isset($this->options->wpFastestCacheLanguage) ? esc_attr($this->options->wpFastestCacheLanguage) : ""; ?>">
1744
- <input type="hidden" name="bloglang" value="<?php echo get_bloginfo('language'); ?>">
1745
- <input type="hidden" name="hostname" value="<?php echo str_replace(array("http://", "www."), "", $_SERVER["HTTP_HOST"]); ?>">
1746
- <button id="wpfc-buy-premium-button" type="submit" class="wpfc-btn primaryCta" style="width:200px;">
1747
- <span><?php _e("Buy", "wp-fastest-cache"); ?></span>
1748
- </button>
1749
- </form>
1750
- <?php } ?>
1751
-
1752
- <?php } ?>
1753
  <?php } ?>
1754
 
1755
 
1623
  </script>
1624
 
1625
 
 
1626
 
1627
+ <div class="exclude_section_clear" style=" margin-left: 3%; width: 95%; margin-bottom: 12px; margin-top: 0;"><div></div></div>
1628
 
1629
+ <h2 style="padding-bottom:10px;padding-left:20px;float:left;"><?php _e("Clearing Specific Pages", "wp-fastest-cache"); ?></h2>
1630
 
1631
+ <div style="float:left;margin-top:-37px;padding-left:628px;">
1632
+ <button type="button" <?php echo $disable_wp_cron;?> class="wpfc-add-new-csp-button wpfc-dialog-buttons" style="display: inline-block;padding: 4px 10px;">
1633
+ <span><?php _e("Add New Rule", "wp-fastest-cache"); ?></span>
1634
+ </button>
1635
+ </div>
1636
 
1637
+ <div class="wpfc-csp-list" style="display: block;width:98%;float:left;">
1638
 
1639
+ </div>
1640
+
1641
+ <?php
1642
+ include(WPFC_MAIN_PATH."templates/clearing_specific_pages.php");
1643
+ ?>
1644
 
 
 
 
1645
 
 
1646
 
1647
 
1648
 
1724
  <h1 style="float:left;" id="just-h1"><?php _e("Just", "wp-fastest-cache"); ?></h1><h1><span style="margin-left:5px;" id="wpfc-premium-price"><?php echo $premium_price; ?></span></h1>
1725
  <p><?php _e("The download button will be available after paid. You can buy the premium version now.", "wp-fastest-cache"); ?></p>
1726
 
1727
+ <?php if(class_exists("WpFastestCachePowerfulHtml")){ ?>
1728
+ <button id="wpfc-buy-premium-button" type="submit" class="wpfc-btn primaryDisableCta" style="width:200px;">
1729
+ <span><?php _e("Purchased", "wp-fastest-cache"); ?></span>
1730
+ </button>
1731
+ <?php }else{ ?>
1732
+
1733
+
1734
+ <form action="<?php echo $premium_buy_link; ?>" method="post">
1735
+ <input type="hidden" name="ip" value="<?php echo $_SERVER["REMOTE_ADDR"]; ?>">
1736
+ <input type="hidden" name="wpfclang" value="<?php echo isset($this->options->wpFastestCacheLanguage) ? esc_attr($this->options->wpFastestCacheLanguage) : ""; ?>">
1737
+ <input type="hidden" name="bloglang" value="<?php echo get_bloginfo('language'); ?>">
1738
+ <input type="hidden" name="hostname" value="<?php echo str_replace(array("http://", "www."), "", $_SERVER["HTTP_HOST"]); ?>">
1739
+ <button id="wpfc-buy-premium-button" type="submit" class="wpfc-btn primaryCta" style="width:200px;">
1740
+ <span><?php _e("Buy", "wp-fastest-cache"); ?></span>
1741
  </button>
1742
+ </form>
1743
+
1744
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1745
  <?php } ?>
1746
 
1747
 
inc/cache.php CHANGED
@@ -244,18 +244,8 @@
244
  }
245
 
246
  // to exclude admin users
247
- foreach ((array)$_COOKIE as $cookie_key => $cookie_value){
248
- if(preg_match("/wordpress_logged_in/i", $cookie_key)){
249
- $users_groups = get_users(array("role" => "administrator", "fields" => array("user_login")));
250
-
251
- foreach ($users_groups as $user_key => $user_value) {
252
- if(preg_match("/^".preg_quote($user_value->user_login, "/")."/", $cookie_value)){
253
- ob_start(array($this, "cdn_rewrite"));
254
-
255
- return 0;
256
- }
257
- }
258
- }
259
  }
260
 
261
  // to check comment author
@@ -454,6 +444,32 @@
454
  }
455
  }
456
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
457
  public function exclude_current_page($some = true){
458
  $via = debug_backtrace();
459
 
@@ -697,6 +713,11 @@
697
 
698
  // for Divi Theme
699
  if(defined('DONOTCACHEPAGE') && (get_template() == "Divi")){
 
 
 
 
 
700
  return $buffer."<!-- DONOTCACHEPAGE is defined as TRUE -->";
701
  }
702
 
244
  }
245
 
246
  // to exclude admin users
247
+ if($this->is_user_admin()){
248
+ return 0;
 
 
 
 
 
 
 
 
 
 
249
  }
250
 
251
  // to check comment author
444
  }
445
  }
446
 
447
+ public function is_user_admin(){
448
+ global $wpdb;
449
+
450
+ foreach ((array)$_COOKIE as $cookie_key => $cookie_value){
451
+ if(preg_match("/wordpress_logged_in/i", $cookie_key)){
452
+ $username = preg_replace("/^([^\|]+)\|.+/", "$1", $cookie_value);
453
+ break;
454
+ }
455
+ }
456
+
457
+ if(isset($username) && $username){
458
+ $res = $wpdb->get_var("SELECT `$wpdb->users`.`ID`, `$wpdb->users`.`user_login`, `$wpdb->usermeta`.`meta_key`, `$wpdb->usermeta`.`meta_value`
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
+ );
466
+
467
+ return $res;
468
+ }
469
+
470
+ return false;
471
+ }
472
+
473
  public function exclude_current_page($some = true){
474
  $via = debug_backtrace();
475
 
713
 
714
  // for Divi Theme
715
  if(defined('DONOTCACHEPAGE') && (get_template() == "Divi")){
716
+ if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'){
717
+ // /?wc-ajax=dgwt_wcas_ajax_search&s=keyword&l=en
718
+ return $buffer;
719
+ }
720
+
721
  return $buffer."<!-- DONOTCACHEPAGE is defined as TRUE -->";
722
  }
723
 
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.7
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.7 =
135
  * <strong>[FEATURE]</strong> Clearing Specific Pages (BETA) [<a target="_blank" href="https://www.wpfastestcache.com/features/clear-cache-of-specific-urls-when-updating-or-posting/">Details</a>]
136
  * to add last-modified header when cache is served via php
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
 
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>]
137
+ * to fix the site url on the exclude page
138
+ * to fix PHP Notice: Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook
139
+
140
  = 1.0.7 =
141
  * <strong>[FEATURE]</strong> Clearing Specific Pages (BETA) [<a target="_blank" href="https://www.wpfastestcache.com/features/clear-cache-of-specific-urls-when-updating-or-posting/">Details</a>]
142
  * to add last-modified header when cache is served via php
templates/clearing_specific_pages.php CHANGED
@@ -90,6 +90,8 @@
90
  <label class="wiz-error-msg"></label>
91
  </div>
92
 
 
 
93
 
94
 
95
  </div>
90
  <label class="wiz-error-msg"></label>
91
  </div>
92
 
93
+ <p class="wpfc-bottom-note" style="margin-bottom:-10px;"><a target="_blank" href="https://www.wpfastestcache.com/features/clear-cache-of-specific-urls-when-updating-or-posting/">Note: Please read this article to learn about this feature.</a></p>
94
+
95
 
96
 
97
  </div>
templates/exclude.php CHANGED
@@ -346,6 +346,10 @@
346
  return "All" + " " + b_start + this.create_title(prefix).toLowerCase() + b_end + " " + "have been excluded";
347
  }
348
  }else{
 
 
 
 
349
  return "<?php echo preg_replace("/(https?\:\/\/[^\/]+).*/", "$1", site_url());?>" + "/" + request_uri;
350
  }
351
  }else if(type == "useragent"){
346
  return "All" + " " + b_start + this.create_title(prefix).toLowerCase() + b_end + " " + "have been excluded";
347
  }
348
  }else{
349
+ if(content == "wp-login.php" || content == "wp-admin"){
350
+ return "<?php echo home_url(); ?>" + "/" + request_uri;
351
+ }
352
+
353
  return "<?php echo preg_replace("/(https?\:\/\/[^\/]+).*/", "$1", site_url());?>" + "/" + request_uri;
354
  }
355
  }else if(type == "useragent"){
templates/preload.php CHANGED
@@ -96,12 +96,15 @@
96
  <label style="float:left;margin-left:8px;padding-top:4px;"><?php _e('pages per minute', 'wp-fastest-cache'); ?></label>
97
  </div>
98
 
99
- <div class="wiz-input-cont" style="width: 94% !important;margin-bottom: 0px !important;">
100
  <label class="mc-input-label" style="margin-right: 5px;"><input type="checkbox" <?php echo $wpFastestCachePreload_restart; ?> id="wpFastestCachePreload_restart" name="wpFastestCachePreload_restart"></label>
101
  <label for="wpFastestCachePreload_restart"><?php _e('Restart After Completed', 'wp-fastest-cache'); ?></label>
102
  <a style="margin-left:5px;" target="_blank" href="http://www.wpfastestcache.com/features/restart-preload-after-completed/"><img src="<?php echo plugins_url("wp-fastest-cache/images/info.png"); ?>"></a>
103
  </div>
104
 
 
 
 
105
  <input type="hidden" value="<?php echo $wpFastestCachePreload_order; ?>" id="wpFastestCachePreload_order" name="wpFastestCachePreload_order">
106
 
107
  </div>
96
  <label style="float:left;margin-left:8px;padding-top:4px;"><?php _e('pages per minute', 'wp-fastest-cache'); ?></label>
97
  </div>
98
 
99
+ <div class="wiz-input-cont" style="width: 94% !important;margin-bottom: 15px !important;">
100
  <label class="mc-input-label" style="margin-right: 5px;"><input type="checkbox" <?php echo $wpFastestCachePreload_restart; ?> id="wpFastestCachePreload_restart" name="wpFastestCachePreload_restart"></label>
101
  <label for="wpFastestCachePreload_restart"><?php _e('Restart After Completed', 'wp-fastest-cache'); ?></label>
102
  <a style="margin-left:5px;" target="_blank" href="http://www.wpfastestcache.com/features/restart-preload-after-completed/"><img src="<?php echo plugins_url("wp-fastest-cache/images/info.png"); ?>"></a>
103
  </div>
104
 
105
+ <p class="wpfc-bottom-note" style="margin-bottom: 5px;"><a target="_blank" href="https://www.wpfastestcache.com/features/manually-preload-with-cron-jobs/">Please Read: How to Speed Up The Preload Feature</a></p>
106
+
107
+
108
  <input type="hidden" value="<?php echo $wpFastestCachePreload_order; ?>" id="wpFastestCachePreload_order" name="wpFastestCachePreload_order">
109
 
110
  </div>
uninstall.php CHANGED
@@ -37,10 +37,14 @@
37
  delete_option("WpFastestCacheWOFFSIZE");
38
  delete_option("WpFastestCacheToolbarSettings");
39
  delete_option("wpfc_server_location");
 
 
 
40
  delete_option("wpfc-group");
41
  delete_option("WpFc_credit");
42
  delete_option("WpFc_api_key");
43
  delete_transient("wpfc_premium_update_info");
 
44
 
45
  wp_clear_scheduled_hook("wpfc_db_auto_cleanup");
46
 
37
  delete_option("WpFastestCacheWOFFSIZE");
38
  delete_option("WpFastestCacheToolbarSettings");
39
  delete_option("wpfc_server_location");
40
+ delete_option("WpFcServerUrl");
41
+ delete_option("WpFcLastImageId");
42
+ delete_option("WpFcImgOptNonce");
43
  delete_option("wpfc-group");
44
  delete_option("WpFc_credit");
45
  delete_option("WpFc_api_key");
46
  delete_transient("wpfc_premium_update_info");
47
+ delete_option("wpfc_premium_update_info");
48
 
49
  wp_clear_scheduled_hook("wpfc_db_auto_cleanup");
50
 
wpFastestCache.php CHANGED
@@ -3,9 +3,9 @@
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.7
7
  Author: Emre Vona
8
- Author URI: http://tr.linkedin.com/in/emrevona
9
  Text Domain: wp-fastest-cache
10
  Domain Path: /languages/
11
 
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
10
  Domain Path: /languages/
11