WP Fastest Cache - Version 1.0.3

Version Description

  • Photon will no longer be supported [Details]
  • to exclude category url for preload if any error occurs
Download this release

Release Info

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

Code changes from version 1.0.2 to 1.0.3

images/photoncdn.png DELETED
Binary file
inc/admin.php CHANGED
@@ -1948,15 +1948,6 @@
1948
  <div class="meta"></div>
1949
  </div>
1950
 
1951
- <div wpfc-cdn-name="photon" class="int-item int-item-left">
1952
- <img src="<?php echo plugins_url("wp-fastest-cache/images/photoncdn.png"); ?>" />
1953
- <div class="app">
1954
- <div style="font-weight:bold;font-size:14px;">CDN by Photon</div>
1955
- <p>Wordpress Content Delivery Network Services</p>
1956
- </div>
1957
- <div class="meta"></div>
1958
- </div>
1959
-
1960
 
1961
  <div wpfc-cdn-name="cloudflare" class="int-item">
1962
  <img style="border-radius:50px;" src="<?php echo plugins_url("wp-fastest-cache/images/cloudflare.png"); ?>" />
1948
  <div class="meta"></div>
1949
  </div>
1950
 
 
 
 
 
 
 
 
 
 
1951
 
1952
  <div wpfc-cdn-name="cloudflare" class="int-item">
1953
  <img style="border-radius:50px;" src="<?php echo plugins_url("wp-fastest-cache/images/cloudflare.png"); ?>" />
inc/cdn.php CHANGED
@@ -536,8 +536,6 @@
536
  $path = WPFC_MAIN_PATH."templates/cdn/maxcdn.php";
537
  }else if($_POST["id"] == "other"){
538
  $path = WPFC_MAIN_PATH."templates/cdn/other.php";
539
- }else if($_POST["id"] == "photon"){
540
- $path = WPFC_MAIN_PATH."templates/cdn/photon.php";
541
  }else if($_POST["id"] == "cloudflare"){
542
  $path = WPFC_MAIN_PATH."templates/cdn/cloudflare.php";
543
  }else{
536
  $path = WPFC_MAIN_PATH."templates/cdn/maxcdn.php";
537
  }else if($_POST["id"] == "other"){
538
  $path = WPFC_MAIN_PATH."templates/cdn/other.php";
 
 
539
  }else if($_POST["id"] == "cloudflare"){
540
  $path = WPFC_MAIN_PATH."templates/cdn/cloudflare.php";
541
  }else{
inc/preload.php CHANGED
@@ -359,17 +359,23 @@
359
 
360
  if(count($categories) > 0){
361
  foreach ($categories as $key => $category) {
 
 
 
 
 
 
362
  if($mobile_theme){
363
- array_push($urls, array("url" => get_term_link($category->slug, $category->taxonomy), "user-agent" => "mobile"));
364
  $number--;
365
  }
366
 
367
- array_push($urls, array("url" => get_term_link($category->slug, $category->taxonomy), "user-agent" => "desktop"));
368
  $number--;
369
 
370
  $pre_load->category = $pre_load->category + 1;
371
-
372
  }
 
373
  }else{
374
  $pre_load->category = -1;
375
  }
359
 
360
  if(count($categories) > 0){
361
  foreach ($categories as $key => $category) {
362
+ $term_link = get_term_link($category->slug, $category->taxonomy);
363
+
364
+ if(isset($term_link->errors)){
365
+ continue;
366
+ }
367
+
368
  if($mobile_theme){
369
+ array_push($urls, array("url" => $term_link, "user-agent" => "mobile"));
370
  $number--;
371
  }
372
 
373
+ array_push($urls, array("url" => $term_link, "user-agent" => "desktop"));
374
  $number--;
375
 
376
  $pre_load->category = $pre_load->category + 1;
 
377
  }
378
+
379
  }else{
380
  $pre_load->category = -1;
381
  }
js/cdn/cdn.js CHANGED
@@ -38,17 +38,10 @@ var WpfcCDN = {
38
  self.click_event_add_new_keyword_button();
39
  self.add_new_keyword_keypress();
40
 
41
- if(self.id == "other" || self.id == "photon" || self.id == "cloudflare"){
42
  self.show_page("next");
43
  self.hide_button("back");
44
 
45
- if(self.id == "photon"){
46
- jQuery("div.wpfc-checkbox-list label[for^='file-type']").each(function(i, e){
47
- if(!jQuery(e).attr("for").match(/jpg|jpeg|gif|png/i)){
48
- jQuery(e).remove();
49
- }
50
- })
51
- }
52
  }
53
 
54
  });
38
  self.click_event_add_new_keyword_button();
39
  self.add_new_keyword_keypress();
40
 
41
+ if(self.id == "other" || self.id == "cloudflare"){
42
  self.show_page("next");
43
  self.hide_button("back");
44
 
 
 
 
 
 
 
 
45
  }
46
 
47
  });
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: 6.0
7
- Stable tag: 1.0.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -125,6 +125,10 @@ The free version is enough to speed up your site but in the premium version ther
125
 
126
  == Changelog ==
127
 
 
 
 
 
128
  = 1.0.2 =
129
  * to add WP-CLI command for clearing cache of a post [<a target="_blank" href="https://www.wpfastestcache.com/features/wp-cli-commands/">Details</a>]
130
  * to fix Warning scandir() at wpFastestCache.php:302
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.3
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.3 =
129
+ * Photon will no longer be supported [<a target="_blank" href="https://www.wpfastestcache.com/blog/photon-will-no-longer-be-supported/">Details</a>]
130
+ * to exclude category url for preload if any error occurs
131
+
132
  = 1.0.2 =
133
  * to add WP-CLI command for clearing cache of a post [<a target="_blank" href="https://www.wpfastestcache.com/features/wp-cli-commands/">Details</a>]
134
  * to fix Warning scandir() at wpFastestCache.php:302
templates/cdn/photon.php DELETED
@@ -1,88 +0,0 @@
1
- <div id="wpfc-modal-photon" style="top: 10.5px; left: 226px; position: absolute; padding: 6px; height: auto; width: 560px; z-index: 10001;">
2
- <div style="height: 100%; width: 100%; background: none repeat scroll 0% 0% rgb(0, 0, 0); position: absolute; top: 0px; left: 0px; z-index: -1; opacity: 0.5; border-radius: 8px;">
3
- </div>
4
- <div style="z-index: 600; border-radius: 3px;">
5
- <div style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background: none repeat scroll 0px 0px rgb(255, 161, 0); z-index: 1000; position: relative; padding: 2px; border-bottom: 1px solid rgb(194, 122, 0); height: 35px; border-radius: 3px 3px 0px 0px;">
6
- <table width="100%" height="100%">
7
- <tbody>
8
- <tr>
9
- <td valign="middle" style="vertical-align: middle; font-weight: bold; color: rgb(255, 255, 255); text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.5); padding-left: 10px; font-size: 13px; cursor: move;">Photon Settings</td>
10
- <td width="20" align="center" style="vertical-align: middle;"></td>
11
- <td width="20" align="center" style="vertical-align: middle; font-family: Arial,Helvetica,sans-serif; color: rgb(170, 170, 170); cursor: default;">
12
- <div title="Close Window" class="close-wiz"></div>
13
- </td>
14
- </tr>
15
- </tbody>
16
- </table>
17
- </div>
18
- <div class="window-content-wrapper" style="padding: 8px;">
19
- <div style="z-index: 1000; height: auto; position: relative; display: inline-block; width: 100%;" class="window-content">
20
-
21
-
22
- <div id="wpfc-wizard-photon" class="wpfc-cdn-pages-container">
23
- <div wpfc-cdn-page="1" class="wiz-cont">
24
- <h1>Let's Get Started</h1>
25
- <p>Hi! If you don't have a <strong>MaxCDN</strong> account, you can create one. If you already have, please continue...</p>
26
- <div class="wiz-input-cont" style="text-align:center;">
27
- <a href="http://tracking.maxcdn.com/c/149801/3982/378" target="_blank">
28
- <button class="wpfc-green-button">Create a MaxCDN Account</button>
29
- </a>
30
- </div>
31
- <p class="wpfc-bottom-note" style="margin-bottom:-10px;"><a target="_blank" href="https://www.maxcdn.com/one/tutorial/implementing-cdn-on-wordpress-with-wp-fastest-cache/">Note: Please read How to Integrate MaxCDN into WP Fastest Cache</a></p>
32
- </div>
33
- <div wpfc-cdn-page="2" class="wiz-cont" style="display:none">
34
- <h1>Enter CDN Url</h1>
35
- <p>Please enter your <strong>CDN Url</strong> below to deliver your contents via CDN.</p>
36
- <div class="wiz-input-cont">
37
- <label class="mc-input-label" for="cdn-url" style="padding-right: 12px;">CDN Url:</label><select id="cdn-url">
38
- <option value="http://i0.wp.com/<?php echo str_replace("www.", "", $_SERVER["HTTP_HOST"]); ?>">i0.wp.com</option>
39
- <option value="http://i1.wp.com/<?php echo str_replace("www.", "", $_SERVER["HTTP_HOST"]); ?>">i1.wp.com</option>
40
- <option value="http://i2.wp.com/<?php echo str_replace("www.", "", $_SERVER["HTTP_HOST"]); ?>">i2.wp.com</option>
41
- <option value="http://i3.wp.com/<?php echo str_replace("www.", "", $_SERVER["HTTP_HOST"]); ?>">i3.wp.com</option>
42
- <option value="random">Random</option>
43
- </select>
44
- <div id="cdn-url-loading"></div>
45
- <label class="wiz-error-msg"></label>
46
- </div>
47
- <div class="wiz-input-cont" style="display:none;">
48
- <label class="mc-input-label" for="origin-url">Origin Url:</label><input type="text" name="" value="<?php echo str_replace("www.", "", $_SERVER["HTTP_HOST"]); ?>" class="api-key" id="origin-url">
49
- </div>
50
- </div>
51
- <div wpfc-cdn-page="3" class="wiz-cont" style="display:none">
52
- <h1>File Types</h1>
53
- <p>Specify the file types within the to host with the CDN.</p>
54
-
55
- <?php include WPFC_MAIN_PATH."templates/cdn/file_types.php"; ?>
56
- </div>
57
- <div wpfc-cdn-page="4" class="wiz-cont" style="display:none">
58
- <?php include WPFC_MAIN_PATH."templates/cdn/specify_sources.php"; ?>
59
- </div>
60
-
61
-
62
-
63
- <div wpfc-cdn-page="5" class="wiz-cont" style="display:none">
64
- <?php include WPFC_MAIN_PATH."templates/cdn/exclude_sources.php"; ?>
65
- </div>
66
-
67
-
68
-
69
- <div wpfc-cdn-page="6" class="wiz-cont" style="display:none">
70
- <h1>Ready to Go!</h1>
71
- <p>You're all set! Click the finish button below and that's it.</p>
72
- </div>
73
- <div wpfc-cdn-page="7" class="wiz-cont" style="display:none">
74
- <h1>Integration Ready!</h1>
75
- <p>Your static contents will be delivered via CDN.</p>
76
- </div>
77
-
78
-
79
- <img class="wiz-bg-img" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAErBAMAAACWVqP+AAAAElBMVEVMaXGFu1GJv1SKwFaLwVaMwliZjsJhAAAABXRSTlMANGeZ0jjkNkkAAAgQSURBVGje3ZvNVuM4EIVlktkrEPYiwN5AsrebeD/68fu/ykAz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KUWsPLeVh4zTWwK0hXsXI6T2w58WoXIqEaSx0Xow6JeQZKnR1E3Xjpp/DAjdAUadPP4u1h7HuuabFsK6oync7j4WJPqquQFZQYaKPGnvoa7Agp4+a/+6rsPYQVmMheNTpo8IeQh0Wso+N0OH0dFwgWIOFO6AeETdmyULSFcUC6Oqx9OmKJwsrhS0121gp/3rLTLK8WyRdpsmiXszjJYt7GZUzDJdLVxZTLZKuVo4Frp6NksVppXKWDsumKzldnNZlDst4au+0cb82vdurPuixDMvYOySsypg9hGVVxuCwuFphCV/jbl2j8L2MfFMtAccyWEo8OEaw5fXDceJuTd5gJK/CoqK6F0Xu77If1iV39uTYO25crWoQcrn4VAwuCyqcy4YK5bKieuEa1uIMJP8qllQvfn/8fm//lEszbz97Zx6X0kKWR7dECAv5HNxCIRiRC6Xq34TdDutRlRjs+cYtHnNg5TugfoIdvhb/+dG774vd4Th8kqfHnfvuaHaHp+P5/EpXzufz0+HGu/XE7jVYH/sH7AKbqlgkOnYAAAAASUVORK5CYII="/>
80
- </div>
81
- </div>
82
- </div>
83
- <?php include WPFC_MAIN_PATH."templates/buttons.html"; ?>
84
- </div>
85
- </div>
86
-
87
-
88
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.2
7
  Author: Emre Vona
8
  Author URI: http://tr.linkedin.com/in/emrevona
9
  Text Domain: wp-fastest-cache
@@ -2050,28 +2050,14 @@ GNU General Public License for more details.
2050
  return $matches[0];
2051
  }
2052
 
2053
- //https://i0.wp.com/i0.wp.com/wpfc.com/stories.png
2054
- if(preg_match("/i\d\.wp\.com/i", $matches[0])){
2055
- return $matches[0];
2056
- }
2057
-
2058
 
2059
  if(preg_match("/^\/\/random/", $cdn->cdnurl) || preg_match("/\/\/i\d\.wp\.com/", $cdn->cdnurl)){
2060
- if(preg_match("/^\/\/random/", $cdn->cdnurl)){
2061
- $cdnurl = "//i".rand(0,3).".wp.com/".str_replace("www.", "", $_SERVER["HTTP_HOST"]);
2062
- $cdnurl = preg_replace("/\/\/i\d\.wp\.com/", "//i".rand(0,3).".wp.com", $cdnurl);
2063
- }else{
2064
- $cdnurl = $cdn->cdnurl;
2065
- }
2066
-
2067
- //to add www. if exists
2068
- if(preg_match("/\/\/www\./", $matches[0])){
2069
- $cdnurl = preg_replace("/(\/\/i\d\.wp\.com\/)(www\.)?/", "$1www.", $cdnurl);
2070
- }
2071
- }else{
2072
- $cdnurl = $cdn->cdnurl;
2073
  }
2074
 
 
 
2075
  $cdn->file_types = str_replace(",", "|", $cdn->file_types);
2076
 
2077
  if(preg_match("/\.(".$cdn->file_types.")(\"|\'|\?|\)|\s|\&quot\;)/i", $matches[0])){
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.3
7
  Author: Emre Vona
8
  Author URI: http://tr.linkedin.com/in/emrevona
9
  Text Domain: wp-fastest-cache
2050
  return $matches[0];
2051
  }
2052
 
 
 
 
 
 
2053
 
2054
  if(preg_match("/^\/\/random/", $cdn->cdnurl) || preg_match("/\/\/i\d\.wp\.com/", $cdn->cdnurl)){
2055
+ // Photon will no longer be supported
2056
+ continue;
 
 
 
 
 
 
 
 
 
 
 
2057
  }
2058
 
2059
+ $cdnurl = $cdn->cdnurl;
2060
+
2061
  $cdn->file_types = str_replace(",", "|", $cdn->file_types);
2062
 
2063
  if(preg_match("/\.(".$cdn->file_types.")(\"|\'|\?|\)|\s|\&quot\;)/i", $matches[0])){