WP Fastest Cache - Version 0.8.7.4

Version Description

  • to exclude the renamed my-account page of woocommerce
  • to add AddType x-font/ttf for gzip
  • to fix the errors of Undefined property: stdClass::$post, stdClass::$page, stdClass::$category
  • [FEATURE] exclude attachments
Download this release

Release Info

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

Code changes from version 0.8.7.3 to 0.8.7.4

images/inmotion-ads.png ADDED
Binary file
inc/admin.php CHANGED
@@ -334,6 +334,8 @@
334
  return array("You have to set <strong><u><a href='".admin_url()."options-permalink.php"."'>permalinks</a></u></strong>", "error");
335
  }else if($res = $this->checkSuperCache($path, $htaccess)){
336
  return $res;
 
 
337
  }else if($this->isPluginActive('fast-velocity-minify/fvm.php')){
338
  return array("Fast Velocity Minify needs to be deactived", "error");
339
  }else if($this->isPluginActive('sg-cachepress/sg-cachepress.php')){
@@ -498,6 +500,7 @@
498
  $data = "# BEGIN GzipWpFastestCache"."\n".
499
  "<IfModule mod_deflate.c>"."\n".
500
  "AddType x-font/woff .woff"."\n".
 
501
  "AddOutputFilterByType DEFLATE image/svg+xml"."\n".
502
  "AddOutputFilterByType DEFLATE text/plain"."\n".
503
  "AddOutputFilterByType DEFLATE text/html"."\n".
@@ -1690,6 +1693,7 @@
1690
  <option value="tag">Tags</option>
1691
  <option value="post">Posts</option>
1692
  <option value="page">Pages</option>
 
1693
  <option value="startwith">Start With</option>
1694
  <option value="contain">Contain</option>
1695
  <option value="exact">Exact</option>
@@ -2033,6 +2037,11 @@
2033
  </div>
2034
 
2035
  <div class="omni_admin_sidebar">
 
 
 
 
 
2036
  <div class="omni_admin_sidebar_section" id="vote-us">
2037
  <h3 style="color: antiquewhite;">Rate Us</h3>
2038
  <ul>
334
  return array("You have to set <strong><u><a href='".admin_url()."options-permalink.php"."'>permalinks</a></u></strong>", "error");
335
  }else if($res = $this->checkSuperCache($path, $htaccess)){
336
  return $res;
337
+ }else if($this->isPluginActive('far-future-expiration/far-future-expiration.php')){
338
+ return array("Far Future Expiration Plugin", "error");
339
  }else if($this->isPluginActive('fast-velocity-minify/fvm.php')){
340
  return array("Fast Velocity Minify needs to be deactived", "error");
341
  }else if($this->isPluginActive('sg-cachepress/sg-cachepress.php')){
500
  $data = "# BEGIN GzipWpFastestCache"."\n".
501
  "<IfModule mod_deflate.c>"."\n".
502
  "AddType x-font/woff .woff"."\n".
503
+ "AddType x-font/ttf .ttf"."\n".
504
  "AddOutputFilterByType DEFLATE image/svg+xml"."\n".
505
  "AddOutputFilterByType DEFLATE text/plain"."\n".
506
  "AddOutputFilterByType DEFLATE text/html"."\n".
1693
  <option value="tag">Tags</option>
1694
  <option value="post">Posts</option>
1695
  <option value="page">Pages</option>
1696
+ <option value="attachment">Attachments</option>
1697
  <option value="startwith">Start With</option>
1698
  <option value="contain">Contain</option>
1699
  <option value="exact">Exact</option>
2037
  </div>
2038
 
2039
  <div class="omni_admin_sidebar">
2040
+ <div class="omni_admin_sidebar_section" style="padding:0 !important;border:none !important;background:none !important;">
2041
+ <a href="//inmotion-hosting.evyy.net/c/149801/353727/4222" target="_blank">
2042
+ <img style="width: 273px; margin-left: -27px;" src="<?php echo plugins_url("wp-fastest-cache/images/inmotion-ads.png"); ?>">
2043
+ </a>
2044
+ </div>
2045
  <div class="omni_admin_sidebar_section" id="vote-us">
2046
  <h3 style="color: antiquewhite;">Rate Us</h3>
2047
  <ul>
inc/cache.php CHANGED
@@ -42,6 +42,8 @@
42
  echo "<!--WPFC_PAGE_TYPE_post-->";
43
  }else if(is_page()){
44
  echo "<!--WPFC_PAGE_TYPE_page-->";
 
 
45
  }
46
  }
47
 
@@ -357,7 +359,7 @@
357
  //wc_get_page_id('product')
358
  //wc_get_page_id('product-category')
359
 
360
- array_push($woocommerce_ids, wc_get_page_id('cart'), wc_get_page_id('checkout'), wc_get_page_id('receipt'), wc_get_page_id('confirmation'));
361
 
362
  if (in_array($page_id[1], $woocommerce_ids)) {
363
  return true;
@@ -630,7 +632,7 @@
630
  $lazy_load_js = WpFastestCacheLazyLoad::get_js_source();
631
  }
632
 
633
- $content = preg_replace("/\s*<\/head>/i", $lazy_load_js."</head>", $content, 1);
634
  }
635
  }
636
 
42
  echo "<!--WPFC_PAGE_TYPE_post-->";
43
  }else if(is_page()){
44
  echo "<!--WPFC_PAGE_TYPE_page-->";
45
+ }else if(is_attachment()){
46
+ echo "<!--WPFC_PAGE_TYPE_attachment-->";
47
  }
48
  }
49
 
359
  //wc_get_page_id('product')
360
  //wc_get_page_id('product-category')
361
 
362
+ array_push($woocommerce_ids, wc_get_page_id('cart'), wc_get_page_id('checkout'), wc_get_page_id('receipt'), wc_get_page_id('confirmation'), wc_get_page_id('myaccount'));
363
 
364
  if (in_array($page_id[1], $woocommerce_ids)) {
365
  return true;
632
  $lazy_load_js = WpFastestCacheLazyLoad::get_js_source();
633
  }
634
 
635
+ $content = preg_replace("/\s*<\/head\s*>/i", $lazy_load_js."</head>", $content, 1);
636
  }
637
  }
638
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://profiles.wordpress.org/emrevona/
4
  Tags: cache, performance, wp-cache, total cache, super cache
5
  Requires at least: 3.3
6
  Tested up to: 4.8
7
- Stable tag: 0.8.7.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -101,6 +101,12 @@ Wpfc does not support Wordpress Multisite yet.
101
 
102
  == Changelog ==
103
 
 
 
 
 
 
 
104
  = 0.8.7.3 =
105
  * to espace empty spaces for webp rules
106
  * to clear cache after new Woocommerce orders
4
  Tags: cache, performance, wp-cache, total cache, super cache
5
  Requires at least: 3.3
6
  Tested up to: 4.8
7
+ Stable tag: 0.8.7.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
101
 
102
  == Changelog ==
103
 
104
+ = 0.8.7.4 =
105
+ * to exclude the renamed my-account page of woocommerce
106
+ * to add AddType x-font/ttf for gzip
107
+ * to fix the errors of Undefined property: stdClass::$post, stdClass::$page, stdClass::$category
108
+ * <strong>[FEATURE]</strong> exclude attachments
109
+
110
  = 0.8.7.3 =
111
  * to espace empty spaces for webp rules
112
  * to clear cache after new Woocommerce orders
templates/exclude.php CHANGED
@@ -95,6 +95,7 @@
95
  <option value="tag">Tags</option>
96
  <option value="post">Posts</option>
97
  <option value="page">Pages</option>
 
98
  <option value="startwith">Starts With</option>
99
  <option value="contain">Contains</option>
100
  <option value="exact">Is Equal To</option>
@@ -178,7 +179,7 @@
178
  var clone_modal_id = "wpfc-modal-exclude-" + new Date().getTime();
179
 
180
  clone_modal.find("select").change(function(e){
181
- if(jQuery(this).val().match(/^(homepage|category|tag|post|page)$/)){
182
  clone_modal.find("input[name='wpfc-exclude-rule-content']").hide();
183
  clone_modal.find("input[name='wpfc-exclude-rule-content']").val(jQuery(this).val());
184
  }else{
@@ -187,7 +188,7 @@
187
  }
188
  });
189
 
190
- if(e.prefix.match(/^(homepage|category|tag|post|page)$/)){
191
  clone_modal.find("input[name='wpfc-exclude-rule-content']").hide();
192
  }
193
 
@@ -279,6 +280,8 @@
279
  title = "Posts";
280
  }else if(prefix == "page"){
281
  title = "Pages";
 
 
282
  }
283
 
284
  return title;
@@ -299,7 +302,7 @@
299
  }
300
 
301
  if(type == "page" || type == "css" || type == "js"){
302
- if(prefix.match(/^(homepage|category|tag|post|page)$/)){
303
  if(prefix == "homepage"){
304
  return "The " + b_start + "homepage" + b_end + " has been excluded";
305
  }else{
@@ -363,7 +366,7 @@
363
 
364
 
365
  clone_modal.find("select").change(function(){
366
- if(jQuery(this).val().match(/^(homepage|category|tag|post|page)$/)){
367
  clone_modal.find("input[name='wpfc-exclude-rule-content']").hide();
368
  clone_modal.find("input[name='wpfc-exclude-rule-content']").val(jQuery(this).val());
369
  }else{
95
  <option value="tag">Tags</option>
96
  <option value="post">Posts</option>
97
  <option value="page">Pages</option>
98
+ <option value="attachment">Attachments</option>
99
  <option value="startwith">Starts With</option>
100
  <option value="contain">Contains</option>
101
  <option value="exact">Is Equal To</option>
179
  var clone_modal_id = "wpfc-modal-exclude-" + new Date().getTime();
180
 
181
  clone_modal.find("select").change(function(e){
182
+ if(jQuery(this).val().match(/^(homepage|category|tag|post|page|attachment)$/)){
183
  clone_modal.find("input[name='wpfc-exclude-rule-content']").hide();
184
  clone_modal.find("input[name='wpfc-exclude-rule-content']").val(jQuery(this).val());
185
  }else{
188
  }
189
  });
190
 
191
+ if(e.prefix.match(/^(homepage|category|tag|post|page|attachment)$/)){
192
  clone_modal.find("input[name='wpfc-exclude-rule-content']").hide();
193
  }
194
 
280
  title = "Posts";
281
  }else if(prefix == "page"){
282
  title = "Pages";
283
+ }else if(prefix == "attachment"){
284
+ title = "Attachments";
285
  }
286
 
287
  return title;
302
  }
303
 
304
  if(type == "page" || type == "css" || type == "js"){
305
+ if(prefix.match(/^(homepage|category|tag|post|page|attachment)$/)){
306
  if(prefix == "homepage"){
307
  return "The " + b_start + "homepage" + b_end + " has been excluded";
308
  }else{
366
 
367
 
368
  clone_modal.find("select").change(function(){
369
+ if(jQuery(this).val().match(/^(homepage|category|tag|post|page|attachment)$/)){
370
  clone_modal.find("input[name='wpfc-exclude-rule-content']").hide();
371
  clone_modal.find("input[name='wpfc-exclude-rule-content']").val(jQuery(this).val());
372
  }else{
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.8.7.3
7
  Author: Emre Vona
8
  Author URI: http://tr.linkedin.com/in/emrevona
9
  Text Domain: wp-fastest-cache
@@ -1243,7 +1243,7 @@ GNU General Public License for more details.
1243
  }
1244
 
1245
  // POST
1246
- if($number > 0 && $pre_load->post > -1){
1247
  // $recent_posts = wp_get_recent_posts(array(
1248
  // 'numberposts' => $number,
1249
  // 'offset' => $pre_load->post,
@@ -1297,7 +1297,7 @@ GNU General Public License for more details.
1297
  }
1298
 
1299
  // PAGE
1300
- if($number > 0 && $pre_load->page > -1){
1301
  $pages = get_pages(array(
1302
  'sort_order' => 'DESC',
1303
  'sort_column' => 'ID',
@@ -1329,7 +1329,7 @@ GNU General Public License for more details.
1329
  }
1330
 
1331
  // CATEGORY
1332
- if($number > 0 && $pre_load->category > -1){
1333
  // $categories = get_terms(array(
1334
  // 'taxonomy' => array('category', 'product_cat'),
1335
  // 'orderby' => 'id',
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.8.7.4
7
  Author: Emre Vona
8
  Author URI: http://tr.linkedin.com/in/emrevona
9
  Text Domain: wp-fastest-cache
1243
  }
1244
 
1245
  // POST
1246
+ if($number > 0 && isset($pre_load->post) && $pre_load->post > -1){
1247
  // $recent_posts = wp_get_recent_posts(array(
1248
  // 'numberposts' => $number,
1249
  // 'offset' => $pre_load->post,
1297
  }
1298
 
1299
  // PAGE
1300
+ if($number > 0 && isset($pre_load->page) && $pre_load->page > -1){
1301
  $pages = get_pages(array(
1302
  'sort_order' => 'DESC',
1303
  'sort_column' => 'ID',
1329
  }
1330
 
1331
  // CATEGORY
1332
+ if($number > 0 && isset($pre_load->category) && $pre_load->category > -1){
1333
  // $categories = get_terms(array(
1334
  // 'taxonomy' => array('category', 'product_cat'),
1335
  // 'orderby' => 'id',