Version Description
- to fix replacing urls on the json source with cdn url
- to fix clearing cache on sites using Polylang plugin
- to prevent creating cache for feed of nonexistent content
Download this release
Release Info
Developer | emrevona |
Plugin | WP Fastest Cache |
Version | 0.9.0.5 |
Comparing to | |
See all releases |
Code changes from version 0.9.0.4 to 0.9.0.5
- inc/admin.php +5 -70
- inc/cache.php +12 -4
- readme.txt +11 -6
- wpFastestCache.php +13 -4
inc/admin.php
CHANGED
@@ -385,9 +385,9 @@
|
|
385 |
}else if($res = $this->checkSuperCache($path, $htaccess)){
|
386 |
return $res;
|
387 |
}else if($this->isPluginActive('fast-velocity-minify/fvm.php')){
|
388 |
-
return array("Fast Velocity Minify", "error");
|
389 |
}else if($this->isPluginActive('far-future-expiration/far-future-expiration.php')){
|
390 |
-
return array("Far Future Expiration Plugin", "error");
|
391 |
}else if($this->isPluginActive('sg-cachepress/sg-cachepress.php')){
|
392 |
return array("SG Optimizer needs to be deactived", "error");
|
393 |
}else if($this->isPluginActive('adrotate/adrotate.php') || $this->isPluginActive('adrotate-pro/adrotate.php')){
|
@@ -916,71 +916,6 @@
|
|
916 |
}
|
917 |
}
|
918 |
|
919 |
-
public function get_translation_json(){
|
920 |
-
if(file_exists(WPFC_MAIN_PATH. "languages/wp-fastest-cache-".get_locale().".po")){
|
921 |
-
$files = glob(WPFC_MAIN_PATH. "languages/wp-fastest-cache-".get_locale().".po");
|
922 |
-
if(isset($files) && isset($files[0])){
|
923 |
-
$current_translation = $this->po_to_js($files[0]);
|
924 |
-
}
|
925 |
-
}
|
926 |
-
|
927 |
-
if(isset($this->options->wpFastestCacheLanguage) && $this->options->wpFastestCacheLanguage == "eng"){
|
928 |
-
foreach ($current_translation as $c_key => $c_value){
|
929 |
-
if((strlen($c_value) > 2) && (strlen($c_key) > 2)){
|
930 |
-
echo $c_value.":".$c_key.",\n";
|
931 |
-
}
|
932 |
-
}
|
933 |
-
}else{
|
934 |
-
$translation_file_name = $this->options->wpFastestCacheLanguage;
|
935 |
-
|
936 |
-
if(preg_match("/^(de|es|fr|it|tr)$/", $translation_file_name)){
|
937 |
-
$translation_file_name = $translation_file_name."_".strtoupper($translation_file_name);
|
938 |
-
}else if($translation_file_name == "sv"){
|
939 |
-
$translation_file_name = "sv_SE";
|
940 |
-
}
|
941 |
-
|
942 |
-
if(file_exists(WPFC_MAIN_PATH. "languages/wp-fastest-cache-".$translation_file_name.".po")){
|
943 |
-
$files = glob(WPFC_MAIN_PATH. "languages/wp-fastest-cache-".$translation_file_name.".po");
|
944 |
-
|
945 |
-
if(isset($files) && isset($files[0])){
|
946 |
-
$to = $this->po_to_js($files[0]);
|
947 |
-
|
948 |
-
foreach ($to as $to_key => $to_value){
|
949 |
-
if((strlen($current_translation[$to_key]) > 2) && (strlen($to_value) > 2)){
|
950 |
-
echo $current_translation[$to_key].":".$to_value.",\n";
|
951 |
-
}
|
952 |
-
}
|
953 |
-
|
954 |
-
}
|
955 |
-
}
|
956 |
-
}
|
957 |
-
}
|
958 |
-
|
959 |
-
public function po_to_js($file_path){
|
960 |
-
$translation = array();
|
961 |
-
|
962 |
-
$tmp_data = $this->read_file($file_path);
|
963 |
-
|
964 |
-
preg_match_all("/^msgid(\s+\"[^\"]*\")+\s+msgstr(\s+\"[^\"]*\")+/m", $tmp_data, $out, PREG_SET_ORDER);
|
965 |
-
|
966 |
-
foreach ($out as $key => $value) {
|
967 |
-
$value[0] = preg_replace("/\"\s+\"/", "", $value[0]);
|
968 |
-
|
969 |
-
$tmp = explode("\n", $value[0]);
|
970 |
-
|
971 |
-
if($key > 0){
|
972 |
-
$tmp[0] = preg_replace("/msgid\s(.+)/", "$1", $tmp[0]);
|
973 |
-
$tmp[1] = preg_replace("/msgstr\s(.+)/", "$1", $tmp[1]);
|
974 |
-
$tmp[0] = trim($tmp[0]);
|
975 |
-
$tmp[1] = trim($tmp[1]);
|
976 |
-
|
977 |
-
$translation[$tmp[0]] = $tmp[1];
|
978 |
-
}
|
979 |
-
}
|
980 |
-
|
981 |
-
return $translation;
|
982 |
-
}
|
983 |
-
|
984 |
public function optionsPage(){
|
985 |
$wpFastestCacheCombineCss = isset($this->options->wpFastestCacheCombineCss) ? 'checked="checked"' : "";
|
986 |
$wpFastestCacheGoogleFonts = isset($this->options->wpFastestCacheGoogleFonts) ? 'checked="checked"' : "";
|
@@ -1364,7 +1299,7 @@
|
|
1364 |
<?php if(class_exists("WpFastestCachePowerfulHtml")){ ?>
|
1365 |
<?php if(method_exists("WpFastestCachePowerfulHtml", "lazy_load")){ ?>
|
1366 |
<div class="questionCon">
|
1367 |
-
<div class="question"
|
1368 |
<div class="inputCon">
|
1369 |
<input type="hidden" value="<?php echo $wpFastestCacheLazyLoad_placeholder; ?>" id="wpFastestCacheLazyLoad_placeholder" name="wpFastestCacheLazyLoad_placeholder">
|
1370 |
<input type="hidden" value="<?php echo $wpFastestCacheLazyLoad_keywords; ?>" id="wpFastestCacheLazyLoad_keywords" name="wpFastestCacheLazyLoad_keywords">
|
@@ -1383,14 +1318,14 @@
|
|
1383 |
|
1384 |
<?php }else{ ?>
|
1385 |
<div class="questionCon update-needed">
|
1386 |
-
<div class="question"
|
1387 |
<div class="inputCon"><input type="checkbox" id="wpFastestCacheLazyLoad" name="wpFastestCacheLazyLoad"><label for="wpFastestCacheLazyLoad"><?php _e("Load images and iframes when they enter the browsers viewport", "wp-fastest-cache"); ?></label></div>
|
1388 |
<div class="get-info"><a target="_blank" href="http://www.wpfastestcache.com/premium/lazy-load-reduce-http-request-and-page-load-time/"><img src="<?php echo plugins_url("wp-fastest-cache/images/info.png"); ?>" /></a></div>
|
1389 |
</div>
|
1390 |
<?php } ?>
|
1391 |
<?php }else{ ?>
|
1392 |
<div class="questionCon disabled">
|
1393 |
-
<div class="question"
|
1394 |
<div class="inputCon"><input type="checkbox" id="wpFastestCacheLazyLoad" name="wpFastestCacheLazyLoad"><label for="wpFastestCacheLazyLoad"><?php _e("Load images and iframes when they enter the browsers viewport", "wp-fastest-cache"); ?></label></div>
|
1395 |
<div class="get-info"><a target="_blank" href="http://www.wpfastestcache.com/premium/lazy-load-reduce-http-request-and-page-load-time/"><img src="<?php echo plugins_url("wp-fastest-cache/images/info.png"); ?>" /></a></div>
|
1396 |
</div>
|
385 |
}else if($res = $this->checkSuperCache($path, $htaccess)){
|
386 |
return $res;
|
387 |
}else if($this->isPluginActive('fast-velocity-minify/fvm.php')){
|
388 |
+
return array("Fast Velocity Minify needs to be deactivated", "error");
|
389 |
}else if($this->isPluginActive('far-future-expiration/far-future-expiration.php')){
|
390 |
+
return array("Far Future Expiration Plugin needs to be deactivated", "error");
|
391 |
}else if($this->isPluginActive('sg-cachepress/sg-cachepress.php')){
|
392 |
return array("SG Optimizer needs to be deactived", "error");
|
393 |
}else if($this->isPluginActive('adrotate/adrotate.php') || $this->isPluginActive('adrotate-pro/adrotate.php')){
|
916 |
}
|
917 |
}
|
918 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
919 |
public function optionsPage(){
|
920 |
$wpFastestCacheCombineCss = isset($this->options->wpFastestCacheCombineCss) ? 'checked="checked"' : "";
|
921 |
$wpFastestCacheGoogleFonts = isset($this->options->wpFastestCacheGoogleFonts) ? 'checked="checked"' : "";
|
1299 |
<?php if(class_exists("WpFastestCachePowerfulHtml")){ ?>
|
1300 |
<?php if(method_exists("WpFastestCachePowerfulHtml", "lazy_load")){ ?>
|
1301 |
<div class="questionCon">
|
1302 |
+
<div class="question">Lazy Load</div>
|
1303 |
<div class="inputCon">
|
1304 |
<input type="hidden" value="<?php echo $wpFastestCacheLazyLoad_placeholder; ?>" id="wpFastestCacheLazyLoad_placeholder" name="wpFastestCacheLazyLoad_placeholder">
|
1305 |
<input type="hidden" value="<?php echo $wpFastestCacheLazyLoad_keywords; ?>" id="wpFastestCacheLazyLoad_keywords" name="wpFastestCacheLazyLoad_keywords">
|
1318 |
|
1319 |
<?php }else{ ?>
|
1320 |
<div class="questionCon update-needed">
|
1321 |
+
<div class="question">Lazy Load</div>
|
1322 |
<div class="inputCon"><input type="checkbox" id="wpFastestCacheLazyLoad" name="wpFastestCacheLazyLoad"><label for="wpFastestCacheLazyLoad"><?php _e("Load images and iframes when they enter the browsers viewport", "wp-fastest-cache"); ?></label></div>
|
1323 |
<div class="get-info"><a target="_blank" href="http://www.wpfastestcache.com/premium/lazy-load-reduce-http-request-and-page-load-time/"><img src="<?php echo plugins_url("wp-fastest-cache/images/info.png"); ?>" /></a></div>
|
1324 |
</div>
|
1325 |
<?php } ?>
|
1326 |
<?php }else{ ?>
|
1327 |
<div class="questionCon disabled">
|
1328 |
+
<div class="question">Lazy Load</div>
|
1329 |
<div class="inputCon"><input type="checkbox" id="wpFastestCacheLazyLoad" name="wpFastestCacheLazyLoad"><label for="wpFastestCacheLazyLoad"><?php _e("Load images and iframes when they enter the browsers viewport", "wp-fastest-cache"); ?></label></div>
|
1330 |
<div class="get-info"><a target="_blank" href="http://www.wpfastestcache.com/premium/lazy-load-reduce-http-request-and-page-load-time/"><img src="<?php echo plugins_url("wp-fastest-cache/images/info.png"); ?>" /></a></div>
|
1331 |
</div>
|
inc/cache.php
CHANGED
@@ -326,10 +326,12 @@
|
|
326 |
//must be normal connection
|
327 |
if(!$this->isPluginActive('really-simple-ssl/rlrsssl-really-simple-ssl.php')){
|
328 |
if(!$this->isPluginActive('really-simple-ssl-pro/really-simple-ssl-pro.php')){
|
329 |
-
if(!$this->isPluginActive('ssl-
|
330 |
-
if(!$this->isPluginActive('
|
331 |
-
if(!$this->isPluginActive('
|
332 |
-
|
|
|
|
|
333 |
}
|
334 |
}
|
335 |
}
|
@@ -828,6 +830,12 @@
|
|
828 |
$this->createFolder($this->cacheFilePath, $content);
|
829 |
do_action('wpfc_is_cacheable_action');
|
830 |
}else if($this->is_xml()){
|
|
|
|
|
|
|
|
|
|
|
|
|
831 |
$this->createFolder($this->cacheFilePath, $buffer, "xml");
|
832 |
do_action('wpfc_is_cacheable_action');
|
833 |
|
326 |
//must be normal connection
|
327 |
if(!$this->isPluginActive('really-simple-ssl/rlrsssl-really-simple-ssl.php')){
|
328 |
if(!$this->isPluginActive('really-simple-ssl-pro/really-simple-ssl-pro.php')){
|
329 |
+
if(!$this->isPluginActive('really-simple-ssl-on-specific-pages/really-simple-ssl-on-specific-pages.php')){
|
330 |
+
if(!$this->isPluginActive('ssl-insecure-content-fixer/ssl-insecure-content-fixer.php')){
|
331 |
+
if(!$this->isPluginActive('https-redirection/https-redirection.php')){
|
332 |
+
if(!$this->isPluginActive('better-wp-security/better-wp-security.php')){
|
333 |
+
return 0;
|
334 |
+
}
|
335 |
}
|
336 |
}
|
337 |
}
|
830 |
$this->createFolder($this->cacheFilePath, $content);
|
831 |
do_action('wpfc_is_cacheable_action');
|
832 |
}else if($this->is_xml()){
|
833 |
+
if(preg_match("/<link><\/link>/", $buffer)){
|
834 |
+
if(preg_match("/\/feed$/", $_SERVER["REQUEST_URI"])){
|
835 |
+
return $buffer.time();
|
836 |
+
}
|
837 |
+
}
|
838 |
+
|
839 |
$this->createFolder($this->cacheFilePath, $buffer, "xml");
|
840 |
do_action('wpfc_is_cacheable_action');
|
841 |
|
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: 5.4
|
7 |
-
Stable tag: 0.9.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -42,7 +42,7 @@ Setup of this plugin is so easy. You don't need to modify the .htacces file. It
|
|
42 |
|
43 |
<h4>Performance Optimization</h4>
|
44 |
|
45 |
-
In the premium version there are many features such as Minify Html, Minify Css, Enable Gzip Compression, Leverage
|
46 |
|
47 |
1. Generating static html files from your dynamic WordPress blog
|
48 |
2. Minify Html - You can decrease the size of page
|
@@ -124,20 +124,25 @@ The free version is enough to speed up your site but in the premium version ther
|
|
124 |
|
125 |
== Changelog ==
|
126 |
|
|
|
|
|
|
|
|
|
|
|
127 |
= 0.9.0.4 =
|
128 |
* to fix PHP Fatal error: Call to a member function lazy_load() on null in cache.php on line 798
|
129 |
* to clear sitemap cache after updating or publishing post
|
130 |
* to clear cache of the static posts page
|
131 |
* to replace urls on data-siteorigin-parallax attribute with cdn-url
|
132 |
* to fix the problem abour "Mobile" option
|
133 |
-
* [FEATURE] Clear cache after theme or plugin update [<a target="_blank" href="https://www.wpfastestcache.com/features/clear-cache-after-theme-or-plugin-update/">Details</a>]
|
134 |
|
135 |
= 0.9.0.3 =
|
136 |
-
* [FEATURE] Compatible with Multiple Domain Mapping on single site
|
137 |
-
* [BETA FEATURE] to create cache after publishing new post or updating a post [<a target="_blank" href="https://www.wpfastestcache.com/features/automatic-cache/">Details</a>]
|
138 |
* to fix clearing search (/?s=) result cache
|
139 |
* to add settings link on the plugin list
|
140 |
-
* [FEATURE] Compatible with Polylang with one different subdomain or domain per language
|
141 |
* to exclude url which ends with slash if the permalink does not end with slush
|
142 |
* to exclude images for cdn if the url contains brizy_media=
|
143 |
|
4 |
Tags: cache, caching, performance, wp-cache, total cache, super cache, cdn
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 5.4
|
7 |
+
Stable tag: 0.9.0.5
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
42 |
|
43 |
<h4>Performance Optimization</h4>
|
44 |
|
45 |
+
In the premium version there are many features such as Minify Html, Minify Css, Enable Gzip Compression, Leverage Browser Caching, Add Expires Headers, Combine CSS, Combine JS, Disable Emoji.
|
46 |
|
47 |
1. Generating static html files from your dynamic WordPress blog
|
48 |
2. Minify Html - You can decrease the size of page
|
124 |
|
125 |
== Changelog ==
|
126 |
|
127 |
+
= 0.9.0.5 =
|
128 |
+
* to fix replacing urls on the json source with cdn url
|
129 |
+
* to fix clearing cache on sites using Polylang plugin
|
130 |
+
* to prevent creating cache for feed of nonexistent content
|
131 |
+
|
132 |
= 0.9.0.4 =
|
133 |
* to fix PHP Fatal error: Call to a member function lazy_load() on null in cache.php on line 798
|
134 |
* to clear sitemap cache after updating or publishing post
|
135 |
* to clear cache of the static posts page
|
136 |
* to replace urls on data-siteorigin-parallax attribute with cdn-url
|
137 |
* to fix the problem abour "Mobile" option
|
138 |
+
* <strong>[FEATURE]</strong> Clear cache after theme or plugin update [<a target="_blank" href="https://www.wpfastestcache.com/features/clear-cache-after-theme-or-plugin-update/">Details</a>]
|
139 |
|
140 |
= 0.9.0.3 =
|
141 |
+
* <strong>[FEATURE]</strong> Compatible with Multiple Domain Mapping on single site
|
142 |
+
* <strong>[BETA FEATURE]</strong> to create cache after publishing new post or updating a post [<a target="_blank" href="https://www.wpfastestcache.com/features/automatic-cache/">Details</a>]
|
143 |
* to fix clearing search (/?s=) result cache
|
144 |
* to add settings link on the plugin list
|
145 |
+
* <strong>[FEATURE]</strong> Compatible with Polylang with one different subdomain or domain per language
|
146 |
* to exclude url which ends with slash if the permalink does not end with slush
|
147 |
* to exclude images for cdn if the url contains brizy_media=
|
148 |
|
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.9.0.
|
7 |
Author: Emre Vona
|
8 |
Author URI: http://tr.linkedin.com/in/emrevona
|
9 |
Text Domain: wp-fastest-cache
|
@@ -312,7 +312,7 @@ GNU General Public License for more details.
|
|
312 |
public function clear_cache_after_update_plugin($upgrader_object, $options){
|
313 |
if($options['action'] == 'update'){
|
314 |
if($options['type'] == 'plugin' && isset($options['plugins'])){
|
315 |
-
$this->deleteCache();
|
316 |
}
|
317 |
}
|
318 |
}
|
@@ -320,7 +320,7 @@ GNU General Public License for more details.
|
|
320 |
public function clear_cache_after_update_theme($upgrader_object, $options){
|
321 |
if($options['action'] == 'update'){
|
322 |
if($options['type'] == 'theme' && isset($options['themes'])){
|
323 |
-
$this->deleteCache();
|
324 |
}
|
325 |
}
|
326 |
}
|
@@ -1850,7 +1850,16 @@ GNU General Public License for more details.
|
|
1850 |
|
1851 |
if(preg_match("/(data-product_variations|data-siteorigin-parallax)\=[\"\'][^\"\']+[\"\']/i", $matches[0])){
|
1852 |
$cdnurl = preg_replace("/(https?\:)?(\/\/)(www\.)?/", "", $cdnurl);
|
1853 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1854 |
}else if(preg_match("/\{\"concatemoji\"\:\"[^\"]+\"\}/i", $matches[0])){
|
1855 |
$matches[0] = preg_replace("/(http(s?)\:)?".preg_quote("\/\/", "/")."(www\.)?/i", "", $matches[0]);
|
1856 |
$matches[0] = preg_replace("/".preg_quote($cdn->originurl, "/")."/i", $cdnurl, $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: 0.9.0.5
|
7 |
Author: Emre Vona
|
8 |
Author URI: http://tr.linkedin.com/in/emrevona
|
9 |
Text Domain: wp-fastest-cache
|
312 |
public function clear_cache_after_update_plugin($upgrader_object, $options){
|
313 |
if($options['action'] == 'update'){
|
314 |
if($options['type'] == 'plugin' && isset($options['plugins'])){
|
315 |
+
$this->deleteCache(true);
|
316 |
}
|
317 |
}
|
318 |
}
|
320 |
public function clear_cache_after_update_theme($upgrader_object, $options){
|
321 |
if($options['action'] == 'update'){
|
322 |
if($options['type'] == 'theme' && isset($options['themes'])){
|
323 |
+
$this->deleteCache(true);
|
324 |
}
|
325 |
}
|
326 |
}
|
1850 |
|
1851 |
if(preg_match("/(data-product_variations|data-siteorigin-parallax)\=[\"\'][^\"\']+[\"\']/i", $matches[0])){
|
1852 |
$cdnurl = preg_replace("/(https?\:)?(\/\/)(www\.)?/", "", $cdnurl);
|
1853 |
+
|
1854 |
+
// if(preg_match("/i\d\.wp\.com/i", $cdnurl)){
|
1855 |
+
// $matches[0] = preg_replace("/(quot\;|\s)(https?\:)?(\\\\\/\\\\\/|\/\/)(www\.)?".$cdn->originurl."/i", "$1$2$3".$cdnurl, $matches[0]);
|
1856 |
+
// }else{
|
1857 |
+
// $matches[0] = preg_replace("/(quot\;|\s)(https?\:)?(\\\\\/\\\\\/|\/\/)(www\.)?".$cdn->originurl."/i", "$1$2$3$4".$cdnurl, $matches[0]);
|
1858 |
+
// }
|
1859 |
+
|
1860 |
+
$matches[0] = preg_replace("/(quot\;|\s)(https?\:)?(\\\\\/\\\\\/|\/\/)(www\.)?".$cdn->originurl."/i", "$1$2$3".$cdnurl, $matches[0]);
|
1861 |
+
|
1862 |
+
|
1863 |
}else if(preg_match("/\{\"concatemoji\"\:\"[^\"]+\"\}/i", $matches[0])){
|
1864 |
$matches[0] = preg_replace("/(http(s?)\:)?".preg_quote("\/\/", "/")."(www\.)?/i", "", $matches[0]);
|
1865 |
$matches[0] = preg_replace("/".preg_quote($cdn->originurl, "/")."/i", $cdnurl, $matches[0]);
|